DAFTAR INSTRUKSI PEMROGRAMAN ASSEMBLY AT89S51/S52

Kelompok Instruksi Aritmatika

ADD A,Rn (Add register to A).
ADD A, (direct Add direct byte to A).
ADD A, @Ri (Add indirect RAM to A).
ADD A,#data (Add immediate data to A).
ADDC A,Rn (Add register to A with Carry).
ADDC A (direct Add direct byte to A with Carry).
ADDC A,@Ri (Add indirect RAM to A with Carry).
ADDC A,#data (Add immediate data to A with Carry).
SUBB A,Rn (Subtract register from A with Borrow).
SUBB A,direct (Subtract direct byte from A with Borrow).
SUBB A,@Ri (Subtract indirect RAM from A with Borrow).
SUBB A,#data (Subtract immediate data from A with Borrow0).
INC A (Increment A).
INC Rn (Increment register).
INC direct (Increment direct byte).
INC @Ri (Increment indirect RAM).
DEC A (Decrement A).
DEC Rn (Decrement register).
DEC direct (Decrement direct byte).
DEC @Ri (Decrement indirect RAM).
INC DPTR (Increment Data Pointer).
MUL AB (Multiply A & B (A x B => BA)).
DIV AB (Divide A by B (A/B => A + B)).
DA A (Decimal Adjust A).


Kelompok Instruksi Logika.

ANL A,Rn (AND register to A).
ANL A,direct (AND direct byte to A).
ANL A,@Ri (AND indirect RAM to A).
ANL A,#data (AND immediate data to A).
ANL direct,A (AND A to direct byte).
ANL direct,#data (AND immediate data to direct byte).
ORL A,Rn OR (register to A).
ORL A,direct (OR direct byte to A).
ORL A,@Ri (OR indirect RAM to A).
ORL A,#data (OR immediate data to A).
ORL direct,A (OR A to direct byte).
ORL direct,#data (OR immediate data to direct byte).
XRL A,Rn (Exclusive-OR register to A).
XRL A,direct (Exclusive-OR direct byte to A).
XRL A,@Ri (Exclusive-OR indirect RAM to A).
XRL A,#data (Exclusive-OR immediate data to A).
XRL direct,A (Exclusive-OR A to direct byte).
XRL direct,#data (Exclusive-OR immediate data to direct byte).
CLR A (Clear A).
CPL A (Complement A).
RL A (Rotate A Left).
RLC A (Rotate A Left through Carry).
RR A (Rotate A Right 1 1
RRC A (Rotate A Right through Carry).
SWAP A (Swap nibbles within A).

Kelompok Instruksi Penyalinan Data.

MOV A,Rn (Move register to A).
MOV A,direct (Move direct byte to A).
MOV A,@Ri (Move indirect RAM to A).
MOV A,#data (Move immediate data to A)
MOV Rn,A (Move A to register).
MOV Rn,direct (Move direct byte to register).
MOV Rn,#data (Move immediate data to register).
MOV direct,A (Move A to direct byte).
MOV direct,Rn (Move register to direct byte).
MOV direct,direct (Move direct byte to direct byte).
MOV direct,@Ri (Move indirect RAM to direct byte).
MOV direct,#data (Move immediate data to direct byte).
MOV @Ri,A (Move A to indirect RAM).
MOV @Ri,direct (Move direct byte to indirect RAM).
MOV @Ri,#data (Move immediate data to indirect RAM).
MOV DPTR,#data16 (Load Data Pointer with 16-bit constant).
MOVC A,@A+DPTR (Move Code byte relative to DPTR to A).
MOVC A,@A+PC (Move Code byte relative to PC to A)
MOVX A,@Ri (Move External RAM (8-bit addr) to A).
MOVX A,@DPTR (Move External RAM (16-bit addr) to A)
MOVX @Ri,A (Move A to External RAM (8-bit addr))
MOVX @DPTR,A (Move A to External RAM (16-bit addr)).
PUSH direct (Push direct byte onto stack).
POP direct (Pop direct byte from stack).
XCH A,Rn (Exchange register with A).
XCH A,direct (Exchange direct byte with A).
XCH A,@Ri (Exchange indirect RAM with A).
XCHD A,@Ri (Exchange low-order Digit indirect RAM with A).

Kelompok Instruksi Bit dan Bit-test.

CLR C (Clear Carry flag).
CLR bit (Clear direct bit).
SETB C (Set Carry flag).
SETB bit (Set direct bit).
CPL C (Complement Carry flag).
CPL bit (Complement direct bit).
ANL C,bit (AND direct bit to Carry flag).
ANL C,/bit (AND complement of direct bit to Carry flag).
ORL C,bit (OR direct bit to Carry flag).
ORL C,/bit (OR complement of direct bit to Carry flag).
MOV C,bit (Move direct bit to Carry flag).
MOV bit,C (Move Carry flag to direct bit).

Kelompok Instruksi Percabangan.

ACALL addr11 (Absolute subroutine call).
LCALL addr16 (Long subroutine call).
RET (Return from subroutine).
RETI (Return from interrupt).
AJMP addr11 (Absolute Jump).
LJMP addr16 (Long Jump).
SJMP rel (Short Jump (relative addr)).
JMP @A+DPTR (Jump indirect relative to DPTR).
JZ rel (Jump if A is Zero).
JNZ rel (Jump if A is Not Zero).
JC rel (Jump if Carry flag is set).
JNC rel (Jump if No Carry flag).
JB bit,rel (Jump if direct Bit is set).
JNB bit,rel (Jump if direct Bit is Not set)
JBC bit,rel (Jump if direct Bit is set & Clear bit).
CJNE A,direct,rel (Compare direct to A & Jump if Not Equal).
CJNE A,#data,rel (Compare immediate to A & Jump if Not Equal).
CJNE Rn,#data,rel (Compare immed. to reg. & Jump if Not Equal).
CJNE @Ri,#data,rel (Compare immed. to ind. & Jump if Not Equal).
DJNZ Rn,rel (Decrement register & Jump if Not Zero).
DJNZ direct,rel (Decrement direct byte & Jump if Not Zero).
NOP (No operation).

0 Komentar untuk "DAFTAR INSTRUKSI PEMROGRAMAN ASSEMBLY AT89S51/S52"

Back To Top