Hello,
I found on the Internet is an example of branch table, and I asked about the DC.
Depending on the type of treatment it plugs into a label specifies using two tables.
A table for the connection:
TABLE1 EQU * ---Start of Branch table---
B ERROR 00 = Invalid input value
B ADD 04 = Input value was "A"
B SUBTRACT 08 = Input value was "S"
B MULTIPLY 12 = Input value was "M"
* ---End of Branch table
ERROR EQU *
* print or display error message or similar
ADD EQU *
* perform addition and continue with rest of program
B NEXT
SUBTRACT EQU *
* etc
INPUT DS C The input character is in this byte.
A table for indexing according to the code :
TABLE2 DC Al1(00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00) X'00'-X'10'
DC Al1(00,00,00,00,00,00,00,00,00,00)00,00,00,00,00,00) ...
DC Al1(00,00,00,00,00,00,00,00,00,00)00,00,00,00,00,00)
DC Al1(00,00,00,00,00,00,00,00,00,00)00,00,00,00,00,00)
DC Al1(00,00,00,00,00,00,00,00,00,00)00,00,00,00,00,00)
DC Al1(00,00,00,00,00,00,00,00,00,00)00,00,00,00,00,00)
DC Al1(00,00,00,00,00,00,00,00,00,00)00,00,00,00,00,00)
DC Al1(00,00,00,00,00,00,00,00,00,00)00,00,00,00,00,00)
DC Al1(00,00,00,00,00,00,00,00,00,00)00,00,00,00,00,00)
DC Al1(00,00,00,00,00,00,00,00,00,00)00,00,00,00,00,00)
DC Al1(00,00,00,00,00,00,00,00,00,00)00,00,00,00,00,00)
DC Al1(00,00,00,00,00,00,00,00,00,00)00,00,00,00,00,00)
DC Al1(00,04,00,00,16,00,00,00,00,00,00)00,00,12,00,00) x'C0' - X'CF' (04 is at offset X'c1')
* etc
My question :
Why define this second table with DC AL1 rather than DC XL1?
What is the advantage of using a constant address?