1984-12-17 11:03:13 +00:00
|
|
|
.define Locaddr
|
1987-01-30 18:41:42 +00:00
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
|
|
|
.sect .text
|
1984-12-17 11:03:13 +00:00
|
|
|
|
|
|
|
! This routine gets the address of a local which offset is to big.
|
|
|
|
! The offset is in registerpair AX.
|
|
|
|
|
|
|
|
|
|
|
|
Locaddr:
|
|
|
|
pha ! save A
|
|
|
|
txa
|
|
|
|
clc
|
|
|
|
adc LB ! localbase + offset (lowbyte)
|
|
|
|
sta ADDR ! address (lowbyte)
|
|
|
|
pla
|
|
|
|
adc LB+1 ! localbase + offset (highbyte)
|
|
|
|
sta ADDR+1 ! address (highbyte)
|
|
|
|
rts
|
|
|
|
|
|
|
|
|