#Include CARDUTIL.DEF #Include COMMERR.DEF ComPort=101 Declare Command &H00 &HB6 RDC(Lc=0,S$) Declare Command &H00 &HB2 RDU(Lc=0,S$) Declare Command &H00 &HB4 WRC(S$,Disable Le) Call WaitForCard ResetCard:Call CheckSW1SW2:Print CLS:Print"Carte No "; Call RDC(P1=0,P2=&H18,S$,Le=8) For F=4 To Len(S$) C$=MID$(S$,F,1):C=ASC(C$):C$=HEX$(C) IF LEN(C$)=1 then C$="0"+C$ Print C$; Next F:Print:Print Call WRC(P1P2=&H0B00,Lc=0,S$) Call RDU(P1P2=&H0000,S$,Le=4) E$="" For F=1 To Len(S$) C$=MID$(S$,F,1):C=ASC(C$):C$=HEX$(C) IF LEN(C$)=1 then C$="0"+C$ E$=E$+C$ Next F E=ValH(E$) Print"Il reste ";E;" centimes d'euro" Print:Print Call WaitForNoCard