Assembly language........

debjit625

Joined Apr 17, 2010
790
"equ" is not a 8085 instruction ,its an assembler directive like ".ORG" ...
Its use is very simple,you define name like "cnst" with a constant numerical value in this case 50 ."equ" stands for
equals.Now where ever in your source code you used the "cnst" word ,it is replaced by the assembler with the numerical value 50.

Note "cnst" is not a variable,it does not occupy any space in memory.Its just a symbol.

when i change it the program shows error
You have to change the name(or symbol) for the entire program i.e.. where ever the name is used you have to change it with the new name.

Good luck
 

Thread Starter

RRITESH KAKKAR

Joined Jun 29, 2010
2,829
Hi,

in this program what is the function of this??
org 0 ; Load the code starting memory position 0
P: db 20 ; Allocate memory locations for P, Q, R, S
Q: db 21 ; and initialise them to some values
R: db 22
S: db 23
T: ds 1 ; Allocate a memory location for T
start : lxi SP, 255 ; Load the stack pointer with 255
mvi A, 10 ; Load A, B, C, D, E with critical values
mvi B, 11 ; that we want to retain
mvi C, 12
mvi D, 13
mvi E, 14
call sbrt ; Call the subroutine
hlt ; Halt. Notice the original values were restored.
 
Top