Documente Academic
Documente Profesional
Documente Cultură
EDSIM51 simulator
Download
http://www.edsim51.com/
Required JDK Environment
Download
http://www.oracle.com/technetwork/java/javase/download
s/jdk7-downloads-1880260.html
Addressing modes
Definition:-
Immediate
Addressing mode
Register
Addressing mode
Direct
Addressing mode
Register indirect
Addressing mode
Indexed
Addressing mode
Continue
must
be
Continue
Ex :MOV A,#25H
MOV R4,#62
// load 25H in to A
// load the decimal
value 62 into R4.
MOV DPTR,#4532H // DPTR=4532H.
Continue
Continue
Continue
Continue
Ex :MOV A,@R0 // move contents of RAM
location whose address
is held by R0 into A.
MOV @R1,B // move contents of B
RAM location whose
address is held by R1
Continue
Continue
Arithmetic instructions
These instructions are used to
perform various mathematical operations
like addition, subtraction, multiplication, and
division etc.
Continue
ADD A, R1
Continue
INC A
DEC A
// Increment accumulator
// Decrement accumulator
MUL AB
// Multiply A and B
DIV AB // Divide A by B
Logical instructions
Continue
Continue
MOV A, Rn
// Move Reg to Acc
MOVX A,@DPTR // Move external RAM
to Accumulator
PUSH direct
// PUSH direct byte on
to stack
POP direct
// POP direct byte from
stack
JC
JNC
JB
JNB
JBC
Continue
JZ
JNZ
DJNZ
// Jump if A=Zero
// Jump if A not equal to zero
// Decrement and Jump if not
equal to zero.