ACR128 Dual Interface Smart Card Reader
7.5.3 Restore Value Block
The Restore Value Block command is used to copy a value from a value block to another value
block.
Table 28-a: Restore Value Block APDU Format (7 Bytes)
Command
Class
INS
P1
P2
Lc
Data In
Value
Block
Operation
FF D7
00
Source
Block
Number
02 03
Target
Block
Number
where:
Source Block Number:
1 Byte. The value of the source value block will be copied to the target value
block.
Target Block Number:
1 Byte. This is the value block to be restored. The source and target value
blocks must be in the same sector.
Table 28-b: Restore Value Block Response Format (2 Bytes)
Response
Data Out
Result SW1
SW2
Table 28-c: Restore Value Block Response Codes
Results
SW1
SW2
Meaning
Success
90
00
The operation is completed successfully.
Error
63
00
The operation failed.
Examples:
1. Store a value “1” into block 0x05
APDU = {FF D7 00 05 05 00 00 00 00 01}
Answer: 90 00 [$9000]
2. Read the value block 0x05
APDU = {FF B1 00 05 00}
Answer: 00 00 00 01 90 00 [$9000]
3. Copy the value from value block 0x05 to value block 0x06
APDU = {FF D7 00 05 02 03 06}
Answer: 90 00 [$9000]
4. Increment the value block 0x05 by “5”
APDU = {FF D7 00 05 05 01 00 00 00 05}
Answer: 90 00 [$9000]
Page
33 of 36
ACR128 API
Version 1.7 May 2008