2018-01-29 07:41:05 +00:00
|
|
|
|
NEW
|
|
|
|
|
PREFIX /A2OSX.BUILD
|
|
|
|
|
AUTO 4,1
|
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
MAC.Init >SYSCALL SListNew
|
|
|
|
|
bcs .9
|
2018-01-29 07:41:05 +00:00
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
>STA.G MAC.hMacroList
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
|
|
|
|
>LDYAI 256
|
|
|
|
|
>SYSCALL GetMem.YA
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
>STYA ZPMacroBuf
|
|
|
|
|
txa
|
2018-04-06 15:10:02 +00:00
|
|
|
|
>STA.G MAC.hMacroBuf
|
|
|
|
|
|
|
|
|
|
>SYSCALL SListNew
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
>STA.G MAC.hCtxList
|
|
|
|
|
|
|
|
|
|
>LDYAI 256
|
|
|
|
|
>SYSCALL GetMem.YA
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
>STYA ZPCtxBuf
|
|
|
|
|
txa
|
|
|
|
|
>STA.G MAC.hCtxBuf
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
|
|
|
|
.9 rts
|
2018-01-29 07:41:05 +00:00
|
|
|
|
*---------------------------------------
|
2018-04-06 15:10:02 +00:00
|
|
|
|
MAC.Reset >STZ.G MAC.CtxID
|
|
|
|
|
iny
|
|
|
|
|
sta (pData),y
|
|
|
|
|
rts
|
|
|
|
|
*---------------------------------------
|
|
|
|
|
MAC.Quit >LDA.G MAC.hCtxBuf
|
2018-03-28 15:23:32 +00:00
|
|
|
|
beq .1
|
2018-01-29 16:48:07 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>SYSCALL FreeMem.A
|
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
.1 >LDA.G MAC.hCtxList
|
|
|
|
|
beq .2
|
|
|
|
|
>SYSCALL SListFree.A
|
|
|
|
|
|
|
|
|
|
.2 >LDA.G MAC.hMacroBuf
|
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
>SYSCALL FreeMem.A
|
|
|
|
|
|
|
|
|
|
.3 >LDA.G MAC.hMacroList
|
2018-03-28 15:23:32 +00:00
|
|
|
|
beq .8
|
|
|
|
|
>SYSCALL SListFree.A
|
2018-01-29 07:41:05 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
2018-01-29 07:41:05 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
MAC.New lda #0
|
|
|
|
|
tay
|
|
|
|
|
|
|
|
|
|
.1 sta (ZPMacroBuf),y
|
|
|
|
|
iny
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
rts
|
2018-01-29 16:48:07 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
MAC.AddChar >LDA.G ASM.PASS If Pass#2, ignore
|
|
|
|
|
bne .8
|
2018-03-23 15:57:35 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
tax
|
|
|
|
|
lda (ZPMacroBuf)
|
2018-04-06 15:10:02 +00:00
|
|
|
|
cmp #254
|
|
|
|
|
beq .9 CS if EQ
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
|
|
|
|
inc
|
|
|
|
|
sta (ZPMacroBuf)
|
|
|
|
|
|
|
|
|
|
tay
|
|
|
|
|
txa
|
|
|
|
|
|
|
|
|
|
sta (ZPMacroBuf),y
|
|
|
|
|
|
|
|
|
|
tax
|
|
|
|
|
beq .1
|
|
|
|
|
|
|
|
|
|
* >SYSCALL PutChar.A
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
|
2018-01-30 16:24:45 +00:00
|
|
|
|
.1
|
2018-03-28 15:23:32 +00:00
|
|
|
|
* lda #13
|
|
|
|
|
* >SYSCALL PutChar.A
|
|
|
|
|
* lda #10
|
|
|
|
|
* >SYSCALL PutChar.A
|
2018-01-30 16:24:45 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
.9 rts
|
2018-01-29 16:48:07 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
MAC.Store >LDA.G ASM.PASS If Pass#2, ignore
|
|
|
|
|
bne .8
|
2018-03-23 15:57:35 +00:00
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
lda (ZPMacroBuf)
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
>PUSHB.G MAC.hMacroList
|
|
|
|
|
>PUSHW ZPNameBuf
|
|
|
|
|
>PUSHW ZPMacroBuf
|
|
|
|
|
>SYSCALL SListAdd
|
|
|
|
|
rts
|
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
2018-01-29 16:48:07 +00:00
|
|
|
|
*---------------------------------------
|
2018-04-06 15:10:02 +00:00
|
|
|
|
MAC.Lookup >PUSHB.G MAC.hMacroList
|
|
|
|
|
>PUSHW ZPLinePtr
|
|
|
|
|
>PUSHW ZPMacroBuf
|
|
|
|
|
>SYSCALL SListLookup
|
|
|
|
|
bcs .9
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
adc ZPLinePtr
|
|
|
|
|
sta ZPLinePtr
|
|
|
|
|
bcc .8
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
inc ZPLinePtr+1
|
|
|
|
|
clc
|
|
|
|
|
.8
|
|
|
|
|
.9 rts
|
|
|
|
|
*---------------------------------------
|
|
|
|
|
MAC.NewOrGetCtx
|
|
|
|
|
*---------------------------------------
|
|
|
|
|
*---------------------------------------
|
2018-01-29 07:41:05 +00:00
|
|
|
|
MAN
|
|
|
|
|
SAVE /A2OSX.BUILD/BIN/DEV/ASM.S.MAC
|
|
|
|
|
LOAD /A2OSX.BUILD/BIN/DEV/ASM.S
|
|
|
|
|
ASM
|