mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-03 05:29:38 +00:00
65 lines
1.2 KiB
Plaintext
65 lines
1.2 KiB
Plaintext
|
PR#3
|
|||
|
PREFIX /A2OSX.SRC
|
|||
|
NEW
|
|||
|
INC 1
|
|||
|
AUTO 6
|
|||
|
.LIST OFF
|
|||
|
.OP 65C02
|
|||
|
*---------------------------------------
|
|||
|
SYM.ClearPrivate
|
|||
|
clc
|
|||
|
rts
|
|||
|
*---------------------------------------
|
|||
|
SYM.AddPrivate
|
|||
|
clc
|
|||
|
rts
|
|||
|
*---------------------------------------
|
|||
|
SYM.LookupPrivate
|
|||
|
clc
|
|||
|
rts
|
|||
|
*---------------------------------------
|
|||
|
SYM.ClearLocal
|
|||
|
clc
|
|||
|
rts
|
|||
|
*---------------------------------------
|
|||
|
SYM.AddLocal
|
|||
|
clc
|
|||
|
rts
|
|||
|
*---------------------------------------
|
|||
|
SYM.LookupLocal
|
|||
|
clc
|
|||
|
rts
|
|||
|
*---------------------------------------
|
|||
|
SYM.AddGlobal
|
|||
|
clc
|
|||
|
rts
|
|||
|
*---------------------------------------
|
|||
|
SYM.LookupGlobal
|
|||
|
clc
|
|||
|
rts
|
|||
|
*---------------------------------------
|
|||
|
SYM.BLOCK.ALLOC ldx #0
|
|||
|
.1 lda SYM.BLOCKS,x
|
|||
|
beq .2
|
|||
|
inx
|
|||
|
cpx #SYM.BLOCK.MAX
|
|||
|
bne .1
|
|||
|
lda #ERR.SYM.TOO.LONG
|
|||
|
sec Out of block error
|
|||
|
rts
|
|||
|
|
|||
|
.2 phx Save next free block
|
|||
|
>LDYA SYM.BLOCK.SIZE
|
|||
|
>SYSCALL SYS.GetMem
|
|||
|
bcs .9
|
|||
|
txa
|
|||
|
plx
|
|||
|
sta SYM.BLOCKS,x
|
|||
|
clc
|
|||
|
.9 rts
|
|||
|
*---------------------------------------
|
|||
|
MAN
|
|||
|
SAVE BIN/ASM.S.SYM
|
|||
|
LOAD BIN/ASM.S
|
|||
|
ASM
|