0

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

Tommylee2k
  • 2,683
  • 1
  • 9
  • 22
Ago
  • 51
  • 4
  • a look into the documentation of your assembler would help, but what you write sounds reasonable to me. Also jump tables like that are common, e.g. in system ROMs. Still we cannot really prove it, since you don't tell us what assembler you're using :) – Tommylee2k Mar 21 '17 at 10:13
  • @Tommylee2k: This is Z80 assembly code. The documentatio I have found does not help very much. The code is old and not well commented. – Ago Mar 21 '17 at 10:21
  • Z80 is the processor. Labels and such are part of the syntax of the assembling program ( usually called "assembler" too ), not part of the processor's code – Tommylee2k Mar 21 '17 at 12:59

1 Answers1

0

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.

Rob
  • 14,746
  • 28
  • 47
  • 65