qasm/testdata/3013-len-pos-1.S
Kelvin Sherlock 59925b3a08 qlinkgs - implement the len/pos linker opcodes
len [label]

sets label = size of most recently linked/imported file

  pos [label]

sets label = size of current segment.  If no label, resets the position variable to 0.

label is added to the symbol table as an absolute entry.

Testing in merlin 16+, these are absolute entry labels, not gequ labels
Merlin does not include any ds fill in the len/pos, but that decision
seems questionable. these do include a ds fill for both.
2021-05-01 12:37:26 -04:00

15 lines
170 B
ArmAsm

rel
ext my_pos_0
ext my_len_1,my_pos_1
ext my_len_2,my_pos_2
lda #my_len_1
lda #my_len_2
ldx #my_pos_1
ldx #my_pos_2
ldy #my_pos_0
rtl
sav 3013-len-pos-1.L