VRS51L2070
________________________________________________________________________________________________
www.ramtron.com page 5 of 99
Instruction Set
The following table describes the instruction set of the
VRS51L2070. The instructions are binary code-compatible
and perform the same functions as industry standard
8051s.
TABLE 2: LEGEND FOR INSTRUCTION SET TABLE
Symbol Function
A Accumulator
Rn Register R0-R7
Direct Internal register address
@Ri Internal register pointed to by R0 or R1 (except MOVX)
rel Two's complement offset byte
bit Direct bit address
#data 8-bit constant
#data 16 16-bit constant
addr 16 16-bit destination address
addr 11 11-bit destination address
TABLE 3: VRS51L2070 INSTRUCTION SET
Mnemonic Description Size
(bytes) Instr.
Cycles Hex Code
Arithmetic instructions
ADD A, Rn Add register to A 1 2 28h-2Fh
ADD A, di r e ct Add direct byte to A 2 3 25h
ADD A, @R i Add data memory to A 1 3 26h-27h
ADD A, #data Add immediate to A 2 2 24h
ADDC A, Rn Add register to A with carry 1 2 38h-3Fh
ADDC A, direct Add direct byte to A with carry 2 3 35h
ADDC A, @Ri Add data memory to A with carry 1 3 36h-37h
ADDC A, #data Add immediate to A with carry 2 2 34h
SUBB A, Rn Subtract register from A with borrow 1 2 98h-9Fh
SUBB A, direct Subtract direct byte from A with borrow 2 3 95h
SUBB A, @Ri Subtract data mem from A with borrow 1 3 96h-97h
SUBB A, #data Subtract immediate from A with borrow 2 2 94h
INC A Increment A 1 2 04h
INC Rn Increment register 1 2 08h-0Fh
INC direct Increment direct byte 2 3 05h
INC @Ri Increment data memory 1 3 06h-07h
DEC A Decrement A 1 2 14h
DEC Rn Decrement register 1 2 18h-1Fh
DEC direct Decrement direct byte 2 3 15h
DEC @Ri Decrement data memory 1 3 16h-17h
INC DPTR Increment data pointer 1 2 A3h
MUL AB Multiply A by B 1 2 A4h
DIV AB Divide A by B 1 2 84h
DA A Decimal adjust A 1 4 D4h
Logical Instructions
ANL A, Rn AND register to A 1 2 58h-5Fh
ANL A, di r e ct AND direct byte to A 2 3 55h
ANL A, @R i AND data memory to A 1 3 56h-57h
ANL A, #data AND immediate to A 2 2 54h
ANL direct, A AND A to direct byte 2 3 52h
ANL direct, #data AND immediate data to direct byte 3 3 53h
ORL A, Rn OR register to A 1 2 48h-4Fh
ORL A, direct OR direct byte to A 2 3 45
ORL A, @Ri OR data memory to A 1 3 46h-47h
ORL A, #data OR immediate to A 2 2 44h
ORL direct, A OR A to direct byte 2 3 42h
ORL direct, #data OR immediate data to direct byte 3 3 43h
XRL A, Rn Exclusive-OR register to A 1 2 68h-6Fh
XRL A, direct Exclusive-OR direct byte to A 2 3 65h
XRL A, @Ri Exclusive-OR data memory to A 1 3 66h-67h
XRL A, #data Exclusive-OR immediate to A 2 2 64h
XRL direct, A Exclusive-OR A to direct byte 2 3 62h
XRL direct, #data Exclusive-OR immediate to direct byte 3 3 63h
CLR A Clear A 1 1 E4h
CPL A Compliment A 1 1 F4h
SWAP A Swap nibbles of A 1 1 C4h
RL A Rotate A left 1 1 23h
RLC A Rotate A left through carry 1 1 33h
RR A Rotate A right 1 1 03h
RRC A Rotate A right through carry 1 1 13h
Mnemonic Description Size
(bytes) Instr.
Cycles Hex Code
Boolean Instruction
CLR C Clear Carry bit 1 1 C3h
CLR bit Clear bit 2 4 C2h
SETB C Set Carry bit to 1 1 1 D3h
SETB bit Set bit to 1 2 4 D2h
CPL C Complement Carry bit 1 1 B3h
CPL bit Complement bit 2 4 B2h
ANL C,bit Logical AND between Carry and bit 2 4 82h
ANL C,#bi t Logical AND between Carry and not bit 2 4 B0h
ORL C,bit Logical ORL between Carry and bit 2 4 72h
ORL C,#bit Logical ORL between Carry and not bit 2 4 A0h
MOV C,bit Copy bit value into Carry 2 4 A2h
MOV bit,C Copy Carry value into Bit 2 3 92h
Data Transfer Instructions
MOV A, Rn Move register to A 1 2 E8h-EFh
MOV A, direct Move direct byte to A 2 3 E5h
MOV A, @Ri Move data memory to A 1 3 E6h-E7h
MOV A, #data Move immediate to A 2 2 74h
MOV Rn, A Move A to register 1 1 F8h-FFh
MOV Rn, direct Move direct byte to register 2 3 A8h-AFh
MOV Rn, #data Move immediate to register 2 2 78h-7Fh
MOV direct, A Move A to direct byte 2 3 F5h
MOV direct, Rn Move register to direct byte 2 3 88h-8Fh
MOV direct, direct Move direct byte to direct byte 3 3 85h
MOV direct, @Ri Move data memory to direct byte 2 3 86h-87h
MOV direct, #data Move immediate to direct byte 3 3 75h
MOV @Ri, A Move A to data memory 1 2 F6h-F7h
MOV @Ri, direct Move direct byte to data memory 2 3 A6h-A7h
MOV @Ri, #data Move immediate to data memory 2 2 76h-77h
MOV DPTR, #data Move immediate to data pointer 3 3 90h
MOVC A, @A+DPTR Move code byte relative DPTR to A 1 3+1 93h
MOVC A, @A+PC Move code byte relative PC to A 1 3+1 83h
MOVX
A,{MPAGE, @Ri} Move external data (A8) to A 1 3* E2h-E3h
MOVX A, @DPTR Move external data (A16) to A 1 2* E0h
MOVX
{MPAGE, @Ri},A Move A to external data (A8) 1 2* F2h-F3h
MOVX @DPTR, A Move A to external data (A16) 1 1* F0h
PUSH direct Push direct byte onto stack 2 3 C0h
POP direct Pop direct byte from stack 2 2 D0h
XCH A, Rn Exchange A and register 1 3 C8h-CFh
XCH A, direct Exchange A and direct byte 2 4 C5h
XCH A, @Ri Exchange A and data memory 1 4 C6h-C7h
XCHD A, @Ri Exchange A and data memory nibble 1 4 D6h-D7h
Branching Instructions
ACALL addr 11 Absolute call to subroutine 2 4+1 11h-F1h
LCALL addr 16 Long call to subroutine 3 5+1 12h
RET Return from subroutine 1 3+1 22h
RETI Return from interrupt 1 3+1 32h
AJMP addr 11 Absolute jump unconditional 2 2+1 01h-E1h
LJMP addr 16 Long jump unconditional 3 3+1 02h
SJMP rel Short jump (relative address) 2 3+1 80h
JC rel Jump on carry = 1 2 3+1 40h
JNC rel Jump on carry = 0 2 3+1 50h
JB bit, rel Jump on direct bit = 1 3 3 / 4 +1 20h
JNB bit, rel Jump on direct bit = 0 3 3 / 4 +1 30h
JBC bit, rel Jump on direct bit = 1 and clear 3 3 / 4 + 1 10h
JMP @A+DPTR Jump indirect relative DPTR 1 2+1 73h
JZ rel Jump on accumulator = 0 2 3+1 60h
JNZ rel Jump on accumulator 1= 0 2 3+1 70h
CJNE A, direct, rel Compare A, direct JNE relative 3 4 / 5 +1 B5h
CJNE A, #d, rel Compare A, immediate JNE relative 3 3 / 4 +1 B4h
CJNE Rn, #d, rel Compare reg, immediate JNE relative 3 3 / 4 +1 B8h-BFh
CJNE @Ri, #d, rel Compare ind, immediate JNE relative 3 4 / 5 + 1 B6h-B7h
DJNZ Rn, rel Decrement register, JNZ relative 2 3 / 4 +1 D8h-DFh
DJNZ direct, rel Decrement direct byte, JNZ relative 3 3 / 4 +1 D5
Miscellaneous Instruction
NOP No operation 1 1 00h
NOP If PCON.4 is 0 (reset Value): NOP 1 1 A5h
MOV @RamPtr,A If MSB (@RamPtr) == 0
Accumulator value is written
in SFR{1,@RamPtr[6:0]}
2 3 A5h
MOV A,@RamPtr If MSB (@RamPtr) == 1
SFR{1,@RamPtr[6:0]}
is written in Accumulator
3 4 A5h
Rn: Any of the register R0 to R7
@Ri: Indirect addressing using Register R0 or R1
#data: immediate Data provided with Instruction
#data16: Immediate data included with instruction
bit: address at the bit level
rel: relative address to Program counter from +127 to –128
Addr11: 11-bit address range
Addr16: 16-bit address range
#d: Immediate Data supplied with instruction