2018-01-31 16:20:20 +00:00
|
|
|
|
NEW
|
2019-09-02 06:09:28 +00:00
|
|
|
|
AUTO 3,1
|
2018-01-31 16:20:20 +00:00
|
|
|
|
*---------------------------------------
|
2019-03-25 07:04:40 +00:00
|
|
|
|
OUT.Init lda #PAGE.LEN
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>STA.G OUT.LineCnt
|
|
|
|
|
rts
|
2018-03-23 15:57:35 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
OUT.Reset ldx #4
|
|
|
|
|
ldy #ASM.PC
|
|
|
|
|
.1 lda (pData),y
|
|
|
|
|
pha
|
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
ldx #4
|
|
|
|
|
ldy #OUT.PC+3
|
|
|
|
|
.2 pla
|
|
|
|
|
sta (pData),y
|
|
|
|
|
dey
|
|
|
|
|
dex
|
|
|
|
|
bne .2
|
2018-01-31 16:20:20 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>STZ.G OUT.Buf
|
|
|
|
|
>STA.G OUT.bEquate
|
|
|
|
|
rts
|
2018-02-02 15:55:20 +00:00
|
|
|
|
*---------------------------------------
|
2019-03-26 15:22:48 +00:00
|
|
|
|
OUT.PrintLineOn
|
2020-02-23 20:46:25 +00:00
|
|
|
|
* clc
|
|
|
|
|
* rts
|
2019-03-26 15:22:48 +00:00
|
|
|
|
>LDA.G ASM.LI.ON
|
|
|
|
|
bpl .9
|
|
|
|
|
>LDA.G ASM.MA.ON MACRO Mode ?
|
|
|
|
|
bpl .1
|
|
|
|
|
>LDA.G ASM.LI.MON
|
|
|
|
|
bpl .9
|
|
|
|
|
bmi .8
|
|
|
|
|
.1 >LDA.G ASM.DO.StackPtr within a DO/ELSE ?
|
|
|
|
|
beq .2
|
|
|
|
|
clc
|
|
|
|
|
adc #ASM.DO.Stack-1
|
|
|
|
|
tay
|
|
|
|
|
lda (pData),y TRUE ?
|
|
|
|
|
bne .8 yes, print always
|
|
|
|
|
>LDA.G ASM.LI.CON FALSE, check CON flag...
|
|
|
|
|
bpl .9
|
|
|
|
|
bmi .8
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.2
|
2019-03-26 15:22:48 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
.9 sec
|
|
|
|
|
rts
|
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
OUT.PrintLineErr
|
2020-02-23 20:01:48 +00:00
|
|
|
|
>STA.G DIR.Byte Save Error code
|
2018-02-02 15:55:20 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr OUT.PrintLine.1
|
|
|
|
|
bcs .9
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
|
|
|
|
.1 >PUSHW L.MSG.ERROR
|
|
|
|
|
>PUSHB.G DIR.Byte
|
2018-11-26 21:52:49 +00:00
|
|
|
|
>PUSHBI 1
|
2018-06-21 15:12:10 +00:00
|
|
|
|
>SYSCALL printf
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ldx ZPLinePtr
|
|
|
|
|
cpx ZPLineBuf
|
|
|
|
|
beq .4
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.3 phx
|
|
|
|
|
lda #'-'
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL PutChar
|
2018-03-28 15:23:32 +00:00
|
|
|
|
plx
|
|
|
|
|
bcs .9
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
dex
|
|
|
|
|
cpx ZPLineBuf
|
|
|
|
|
bne .3
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.4 lda #'^'
|
|
|
|
|
phy
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL PutChar
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ply
|
|
|
|
|
bcs .9
|
2018-02-02 15:55:20 +00:00
|
|
|
|
|
2020-02-23 20:01:48 +00:00
|
|
|
|
jmp OUT.PrintCR
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.9 rts
|
2018-02-02 15:55:20 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
OUT.PrintLine jsr OUT.PrintLineOn
|
2019-03-26 15:22:48 +00:00
|
|
|
|
bcs OUT.Print.RTS
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
OUT.PrintLine.1 jsr OUT.PrintLineOutBuf
|
2019-03-26 15:22:48 +00:00
|
|
|
|
bcs OUT.Print.RTS
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2019-04-01 06:07:56 +00:00
|
|
|
|
>LDA.G SRC.COUNT
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2019-04-01 06:07:56 +00:00
|
|
|
|
.1 dec
|
2020-02-23 20:01:48 +00:00
|
|
|
|
beq .2
|
|
|
|
|
|
2019-04-01 06:07:56 +00:00
|
|
|
|
pha
|
2020-02-23 20:01:48 +00:00
|
|
|
|
lda #'>'
|
2019-04-01 06:07:56 +00:00
|
|
|
|
>SYSCALL putchar
|
|
|
|
|
pla
|
|
|
|
|
bra .1
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
|
|
|
|
.2 >PUSHW L.MSG.LINENUM
|
|
|
|
|
>PUSHW.G SRC.LINENUM
|
2019-04-01 06:07:56 +00:00
|
|
|
|
>PUSHBI 2
|
|
|
|
|
>SYSCALL printf
|
|
|
|
|
|
|
|
|
|
>LDA.G MAC.Depth
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2019-04-01 06:07:56 +00:00
|
|
|
|
.3 dec
|
|
|
|
|
bmi .4
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2019-04-01 06:07:56 +00:00
|
|
|
|
pha
|
2020-02-23 20:01:48 +00:00
|
|
|
|
lda #'>'
|
2019-04-01 06:07:56 +00:00
|
|
|
|
>SYSCALL putchar
|
|
|
|
|
pla
|
|
|
|
|
bra .3
|
|
|
|
|
|
|
|
|
|
.4 >LDYA ZPLineBuf
|
|
|
|
|
>SYSCALL puts
|
|
|
|
|
jmp OUT.PrintCR1
|
2018-02-02 15:55:20 +00:00
|
|
|
|
*---------------------------------------
|
2019-03-26 15:22:48 +00:00
|
|
|
|
OUT.Print >SYSCALL printf
|
|
|
|
|
bcs OUT.Print.RTS
|
|
|
|
|
jmp OUT.PrintCR
|
|
|
|
|
|
|
|
|
|
OUT.Print.RTS rts
|
2018-02-02 15:55:20 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
OUT.PrintLineOutBuf
|
|
|
|
|
>LDA.G OUT.bEquate
|
2020-02-23 20:01:48 +00:00
|
|
|
|
bne OUT.PrintLineEQU
|
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>LDA.G OUT.Buf
|
2020-02-23 20:01:48 +00:00
|
|
|
|
pha
|
|
|
|
|
asl
|
2018-03-28 15:23:32 +00:00
|
|
|
|
tax
|
2020-02-23 20:01:48 +00:00
|
|
|
|
>PUSHB L.MSG.OUT0+1,x
|
|
|
|
|
>PUSHB L.MSG.OUT0,x
|
|
|
|
|
|
|
|
|
|
ldy #OUT.PC+1
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>PUSHB (pData),y
|
|
|
|
|
dey
|
|
|
|
|
>PUSHB (pData),y
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
ldy #OUT.Buf
|
|
|
|
|
|
2019-01-28 07:44:37 +00:00
|
|
|
|
pha
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
|
|
|
|
.1 iny
|
|
|
|
|
>PUSHB (pData),y
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
pla
|
|
|
|
|
|
|
|
|
|
.2 inc
|
2019-01-28 07:44:37 +00:00
|
|
|
|
inc
|
|
|
|
|
>PUSHA Byte Count+2 for PC
|
2018-06-21 15:12:10 +00:00
|
|
|
|
>SYSCALL printf
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
rts
|
2019-03-21 16:37:02 +00:00
|
|
|
|
*---------------------------------------
|
2020-02-23 20:01:48 +00:00
|
|
|
|
OUT.PrintLineEQU
|
2019-03-21 16:37:02 +00:00
|
|
|
|
lda SRC.ACC.SIZE
|
2020-02-23 20:01:48 +00:00
|
|
|
|
asl
|
2019-03-21 16:37:02 +00:00
|
|
|
|
tax
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
|
|
|
|
>PUSHB L.MSG.EQU0+1,x
|
|
|
|
|
>PUSHB L.MSG.EQU0,x
|
|
|
|
|
|
|
|
|
|
lda SRC.ACC.SIZE
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
tay
|
|
|
|
|
|
|
|
|
|
.1 dey
|
|
|
|
|
>PUSHB SRC.ACC,y
|
|
|
|
|
tya
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bne .1
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
lda SRC.ACC.SIZE
|
2019-03-21 16:37:02 +00:00
|
|
|
|
|
|
|
|
|
.2 >PUSHA Byte Count
|
2018-06-21 15:12:10 +00:00
|
|
|
|
>SYSCALL printf
|
2018-03-28 15:23:32 +00:00
|
|
|
|
rts
|
2018-11-26 21:52:49 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
OUT.EmitByte phy
|
|
|
|
|
phx
|
|
|
|
|
pha
|
2018-03-19 16:48:41 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>LDA.G OUT.Buf
|
|
|
|
|
cmp #3
|
|
|
|
|
bne .2
|
2018-01-31 16:20:20 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr OUT.PrintLineOn
|
|
|
|
|
bcs .1
|
|
|
|
|
>LDA.G ASM.LI.XON
|
|
|
|
|
bpl .1
|
|
|
|
|
jsr OUT.PrintLineOutBuf
|
|
|
|
|
jsr OUT.PrintCR
|
|
|
|
|
.1 jsr OUT.Reset
|
|
|
|
|
lda #0
|
|
|
|
|
ldy #OUT.Buf
|
|
|
|
|
.2 inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
clc
|
|
|
|
|
adc #OUT.Buf
|
|
|
|
|
tay
|
|
|
|
|
pla
|
|
|
|
|
sta (pData),y
|
|
|
|
|
.8 >INC.G ASM.PC
|
|
|
|
|
bne .80
|
|
|
|
|
>INC.G ASM.PC+1
|
|
|
|
|
bne .80
|
|
|
|
|
>INC.G ASM.PC+2
|
|
|
|
|
bne .80
|
|
|
|
|
>INC.G ASM.PC+3
|
|
|
|
|
.80 plx
|
|
|
|
|
ply
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2018-01-31 16:20:20 +00:00
|
|
|
|
*---------------------------------------
|
2020-02-23 20:01:48 +00:00
|
|
|
|
OUT.PrintCR >PUSHW L.MSG.CRLF
|
|
|
|
|
>PUSHBI 0
|
2019-03-26 15:22:48 +00:00
|
|
|
|
>SYSCALL printf
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2019-04-01 06:07:56 +00:00
|
|
|
|
OUT.PrintCR1 >DEC.G OUT.LineCnt
|
2019-03-26 15:22:48 +00:00
|
|
|
|
bne .8
|
2020-02-23 20:01:48 +00:00
|
|
|
|
|
2019-03-26 15:22:48 +00:00
|
|
|
|
lda #PAGE.LEN
|
|
|
|
|
sta (pData),y
|
2019-03-28 16:48:22 +00:00
|
|
|
|
* lda #$80
|
|
|
|
|
* >STA.G bPause
|
2019-03-26 15:22:48 +00:00
|
|
|
|
.8 rts
|
|
|
|
|
*---------------------------------------
|
2018-01-31 16:20:20 +00:00
|
|
|
|
MAN
|
2019-01-28 07:44:37 +00:00
|
|
|
|
SAVE USR/SRC/BIN/ASM.S.OUT
|
|
|
|
|
LOAD USR/SRC/BIN/ASM.S
|
2018-01-31 16:20:20 +00:00
|
|
|
|
ASM
|