Smart Card Reader Driver Program Reference Manual
rev 1.1 Sept, 2003
Advanced Card Systems Ltd.
Page 16 of 34
2.3.3 ACI
Commands
ACI Commands are provided to support the standard operation of a wide range of memory
cards. Because of the different nature of different memory cards and their capabilities, not all
the commands are available for every card type. Appendix B listed the available ACI
commands for different card types.
The ACI Commands described here are used in the AC_ExchangeAPDU function call. Proper
parameter values of different ACI commands should be initialized in the AC_APDU structure
before calling the AC_ExchangeAPDU function. Upon successful completion of the function,
the application program is required to check the card return status (SW1 SW2) in AC_APDU
and retrieve the output result from the DataOut buffer accordingly.
2.3.3.1 ACI_Read
The ACI_Read command is available for all types of memory card. The parameter structure is
defined as follows:
Field
Value
Description
CLA 0x00
Instruction
class
INS
ACI_Read
Instruction code for the read command
P1
Variable
MSB of the starting address to be read
P2
Variable
LSB of the starting address to be read
Lc
0x00
No input data is required for this command
DataIn -
Don't
care
Le
Variable <= 32
The number of bytes to be read from the card
For AM256 card, this value will rounded to the next even number
2.3.3.2 ACI_Write
The ACI_Write command is available for all types of memory cards. The parameter structure
is defined as follows:
Field
Value
Description
CLA 0x00
Instruction
class
INS
ACI_Write
Instruction code for the write command
P1
Variable
MSB of the starting address to be written
P2
Variable
LSB of the starting address to be written
Lc
variable <= 32
The number of bytes to be written into the card
DataIn
Variable
Lc bytes of data to be written into the card
Le
0x00
No response data expected from the card.
For AM256 card, this value will rounded to the next even number