g - 10 REM *** Program that reads/writes 2nd generation...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 10 REM *** Program that reads/writes 2nd generation smart-cards *** 20 REM *** through a direct connection with the parallel port. *** 30 REM *** L. Padilla (e-mail: padilla at domain "gae ucm es") *** 40 REM *** Madrid, 1996, Ver 2.1 (1997) *** 50 OPTION BASE 1 : DIM BYTE%(64) 60 OUT 888, 0 : REM *** 0v data pins *** 70 PRINT "Insert card and hit F5 (CONT)." : STOP 80 REM *** Reset card: *** 90 OUT 888, 2^0 : REM *** +5v pins 2(Vcc) *** 100 OUT 888, 2^1 + 2^0 : REM *** +5v 2,3(Reset) *** 110 OUT 888, 2^2 + 2^1 + 2^0 : REM *** +5v 2,3,4(Clock) *** 120 OUT 888, 2^1 + 2^0 : REM *** +5v 2,3 *** 130 OUT 888, 2^0 : REM *** +5v 2 *** 140 REM *** Go through all the addresses: *** 150 PRINT "By b7 b6 b5 b4 b3 b2 b1 b0 Dec Hex A |Byt b7 b6 b5 b4 b3 b2 b1 b0 Dec Hex A" 160 PRINT "-- -- -- -- -- -- -- -- -- --- --- - |--- -- -- -- -- -- -- -- -- --- --- -" 170 FOR I% = 1 TO 64 180 BYTE%(I%) = 0 190 IF (I% MOD 2 = 0) THEN PRINT " "; 200 PRINT USING "## "; I%; 210 FOR J% = 7 TO 0 STEP -1 220 BITCOUNT% = I% * 8 - J%...
View Full Document

This note was uploaded on 02/02/2011 for the course SECURITY 2354 taught by Professor Morganjones during the Spring '11 term at Ucla Venezuela.

Ask a homework question - tutors are online