REM CrypMem (c)2002,2008 Patrick GUEULLE Declare Binary ATR=&H3B,&HB2,&H11,&H00,&H10,&H80, _ &H00,&H02, _ &H01 Private S$ As String Public Z As Byte=&H00 Public SPY As Byte=1 EEPROM D$=String$(254,&HFF) EEPROM ZA$=String$(64,&HFF) EEPROM ZB$=String$(64,&HFF) EEPROM ZC$=String$(64,&HFF) EEPROM ZD$=String$(64,&HFF) Open "Card.Log" For Append As #1 If Spy=1 Then Write#1,"" Command &HC8 &H04 COPY(Lc=0,S$) Z$="(c)2001 Patrick GUEULLE" S$=MID$(Z$,P1P2+1,Le) End Command Command &HC8 &HA2 FLUSH(S$,Disable Le) Close Kill "Card.log" : S$=CHR$(FileError) End Command Command &HC8 &HA0 SPYONOFF(S$,Disable Le) SPY=P2 End Command Command &HC2 &HBA VERIF(S$,Disable Le) C$=CHR$(CLA)+CHR$(INS)+CHR$(P1)+CHR$(P2)+CHR$(Lc)+S$ If Spy=1 Then Write#1,C$ S$="" End Command Command &HC2 &HB4 SYSWR(S$,Disable Le) C$=CHR$(CLA)+CHR$(INS)+CHR$(P1)+CHR$(P2)+CHR$(Lc)+S$ If Spy=1 Then Write#1,C$ If P1=&H00 Then Mid$(D$,P2+1,Lc)=S$ If P1=&H0B Then Z=P2 S$="" End Command Command &HC2 &HB6 RDFUS(Lc=0,S$) C$=CHR$(CLA)+CHR$(INS)+CHR$(P1)+CHR$(P2)+Chr$(Le) If Spy=1 Then Write#1,C$ If P1=&H00 Then S$=Mid$(D$,P2+1,Le) If P1P2=&H0100 Then S$=Chr$(&H10) End Command Command &HC2 &HB2 RDUS(Lc=0,S$) C$=CHR$(CLA)+CHR$(INS)+CHR$(P1)+CHR$(P2)+Chr$(Le) If Spy=1 Then Write#1,C$ If Le=0 Then S$="" If Z=0 Then S$=Mid$(ZA$,P2+1,Le) If Z=1 Then S$=Mid$(ZB$,P2+1,Le) If Z=2 Then S$=Mid$(ZC$,P2+1,Le) If Z=3 Then S$=Mid$(ZD$,P2+1,Le) End Command Command &HC2 &HB0 USERWR(S$,Disable Le) C$=CHR$(CLA)+CHR$(INS)+CHR$(P1)+CHR$(P2)+CHR$(Lc)+S$ If Spy=1 Then Write#1,C$ If Z=0 Then Mid$(ZA$,P2+1,Lc)=S$ If Z=1 Then Mid$(ZB$,P2+1,Lc)=S$ If Z=2 Then Mid$(ZC$,P2+1,Lc)=S$ If Z=3 Then Mid$(ZD$,P2+1,Lc)=S$ S$="" End Command Command &H00 &HA4 SEL(S$,Disable Le) C$=CHR$(CLA)+CHR$(INS)+CHR$(P1)+CHR$(P2)+CHR$(Lc)+S$ If Spy=1 Then Write#1,C$ S$="" SW1SW2=&H6D00 End Command Command Else NOTOUT(Lc=0,S$) C$=CHR$(CLA)+CHR$(INS)+CHR$(P1)+CHR$(P2)+Chr$(Le) If Spy=1 Then Write#1,C$ If Le=0 Then S$="" If Le>0 Then S$=String$(Le,&HAB) End Command