Search code examples
assemblyz80

Z80 assembly .ADDR


I have the following code

START: .ADDR ADDR_1
       .ADDR ADDR_2

ADDR_1: LD A,B 
       XOR A 
       LD B, A 
ADDR_2: JP ADDR_3
ADDR3_:....

I thing if START is at address "0x0000" the ".ADDR" directive indicates the address of the label (i.e. .ADDR ADDR_1 indicates label address), is this correct? Thanks in advance


Solution

  • You are correct. Labels in assembly are like variable or function names in other languages (in a way). They can be used to indicate entry points within a program.