mirror of
https://github.com/A2osX/A2osX.git
synced 2024-09-10 07:54:37 +00:00
86 lines
1.3 KiB
Plaintext
86 lines
1.3 KiB
Plaintext
NEW
|
||
PREFIX /A2OSX.BUILD
|
||
AUTO 4,1
|
||
*---------------------------------------
|
||
MAC.Init >SYSCALL SListNew
|
||
bcs .9
|
||
|
||
>STA.G MAC.hMacros
|
||
|
||
>LDYAI 256
|
||
>SYSCALL GetMem.YA
|
||
bcs .9
|
||
|
||
>STYA ZPMacroBuf
|
||
txa
|
||
>STA.G MAC.hBuf
|
||
|
||
.9 rts
|
||
*---------------------------------------
|
||
MAC.Quit >LDA.G MAC.hBuf
|
||
beq .1
|
||
|
||
>SYSCALL FreeMem.A
|
||
|
||
.1 >LDA.G MAC.hMacros
|
||
beq .8
|
||
>SYSCALL SListFree.A
|
||
|
||
.8 clc
|
||
rts
|
||
*---------------------------------------
|
||
MAC.New lda #0
|
||
tay
|
||
|
||
.1 sta (ZPMacroBuf),y
|
||
iny
|
||
bne .1
|
||
|
||
rts
|
||
*---------------------------------------
|
||
MAC.AddChar >LDA.G ASM.PASS If Pass#2, ignore
|
||
bne .8
|
||
|
||
tax
|
||
lda (ZPMacroBuf)
|
||
* cmp #254
|
||
* beq .9 CS if EQ
|
||
|
||
inc
|
||
sta (ZPMacroBuf)
|
||
|
||
tay
|
||
txa
|
||
|
||
sta (ZPMacroBuf),y
|
||
|
||
tax
|
||
beq .1
|
||
|
||
* >SYSCALL PutChar.A
|
||
.8 clc
|
||
rts
|
||
|
||
.1
|
||
* lda #13
|
||
* >SYSCALL PutChar.A
|
||
* lda #10
|
||
* >SYSCALL PutChar.A
|
||
|
||
|
||
clc
|
||
.9 rts
|
||
*---------------------------------------
|
||
MAC.Store >LDA.G ASM.PASS If Pass#2, ignore
|
||
bne .8
|
||
|
||
.8 clc
|
||
rts
|
||
*---------------------------------------
|
||
|
||
|
||
MAN
|
||
SAVE /A2OSX.BUILD/BIN/DEV/ASM.S.MAC
|
||
LOAD /A2OSX.BUILD/BIN/DEV/ASM.S
|
||
ASM
|