2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2020-10-06 06:27:35 +00:00
|
|
|
|
AUTO 3,1
|
2017-12-07 16:33:39 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2020-10-06 06:27:35 +00:00
|
|
|
|
.TF bin/fnt2fon
|
2017-12-07 16:33:39 +00:00
|
|
|
|
*--------------------------------------
|
2020-10-06 06:27:35 +00:00
|
|
|
|
.INB inc/macros.i
|
|
|
|
|
.INB inc/a2osx.i
|
|
|
|
|
.INB inc/gfx.i
|
|
|
|
|
.INB inc/libgui.i
|
|
|
|
|
.INB inc/fnt.i
|
2017-12-08 16:10:39 +00:00
|
|
|
|
*--------------------------------------
|
2022-10-25 06:05:54 +00:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPBIN
|
|
|
|
|
ZS.START
|
|
|
|
|
ZPPTR1 .BS 2
|
|
|
|
|
ZPInputBufPtr .BS 2
|
|
|
|
|
ZPInputTblPtr .BS 2
|
|
|
|
|
ZPInputBMPtr .BS 2
|
|
|
|
|
ZPCharBufPtr .BS 2
|
|
|
|
|
ZPOutPutTblPtr .BS 2
|
|
|
|
|
ZPOutPutCharOfs .BS 2
|
|
|
|
|
ZPOutPutBufPtr .BS 2
|
|
|
|
|
TmpWord .BS 2
|
|
|
|
|
ZS.END .ED
|
2017-12-07 16:33:39 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* File Header (16 Bytes)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
2022-10-25 06:05:54 +00:00
|
|
|
|
.DA #0 S.PS.F.EVENT
|
|
|
|
|
.DA #0
|
|
|
|
|
.DA CS.END-CS.START Code Size (without Constants)
|
|
|
|
|
.DA DS.END-DS.START Data Size
|
|
|
|
|
.DA #64 Stack Size
|
|
|
|
|
.DA #ZS.END-ZS.START Zero Page Size
|
2017-12-07 16:33:39 +00:00
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
2019-10-03 06:25:27 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-07 16:33:39 +00:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
|
|
|
|
L.MSG.USAGE .DA MSG.USAGE
|
|
|
|
|
L.MSG.FILE.OK .DA MSG.FILE.OK
|
|
|
|
|
L.MSG.HEADER.OK .DA MSG.HEADER.OK
|
|
|
|
|
L.MSG.HEADER.KO .DA MSG.HEADER.KO
|
2017-12-08 16:10:39 +00:00
|
|
|
|
L.MSG.RANGE .DA MSG.RANGE
|
2017-12-11 16:54:34 +00:00
|
|
|
|
L.MSG.DUMP .DA MSG.DUMP
|
2017-12-07 16:33:39 +00:00
|
|
|
|
L.MSG.DONE .DA MSG.DONE
|
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.INIT
|
2017-12-12 16:35:16 +00:00
|
|
|
|
.1 >INC.G Count
|
2018-10-16 15:48:03 +00:00
|
|
|
|
>SYSCALL ArgV
|
2017-12-07 16:33:39 +00:00
|
|
|
|
bcs .7
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
>STYA ZPPtr1
|
|
|
|
|
lda (ZPPtr1)
|
|
|
|
|
cmp #'-'
|
|
|
|
|
bne .4
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
ldy #1
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
|
|
|
|
|
ldx OptionList
|
|
|
|
|
.2 cmp OptionList,x
|
|
|
|
|
beq .3
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
dex
|
|
|
|
|
bne .2
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
.99 >LDYA L.MSG.USAGE
|
2022-10-18 05:56:59 +00:00
|
|
|
|
>SYSCALL Puts
|
2018-10-21 20:54:07 +00:00
|
|
|
|
lda #E.SYN
|
2017-12-07 16:33:39 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
.3 ldy OptionVars-1,x
|
|
|
|
|
lda #$80
|
|
|
|
|
sta (pData),y
|
|
|
|
|
bra .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
.4 >LDA.G hInputBuf
|
|
|
|
|
bne .5
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
jsr CS.INIT.OPENINPUT
|
|
|
|
|
bcc .1 scan for any other args
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
rts
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
.5 >LDA.G hOutputFile
|
|
|
|
|
bne .99
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
jsr CS.INIT.CREATEOUTPUT
|
|
|
|
|
bcc .1 scan for any other args
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
rts
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
.7 >LDA.G hOutputFile
|
|
|
|
|
beq .99
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
>LDYAI 8192 max 256x256 pixels
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL GetMem
|
2017-12-07 16:33:39 +00:00
|
|
|
|
bcs CS.INIT.RTS
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
>STYA ZPCharBufPtr
|
2017-12-07 16:33:39 +00:00
|
|
|
|
txa
|
2017-12-11 16:54:34 +00:00
|
|
|
|
>STA.G hCharBuf
|
2017-12-07 16:33:39 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
CS.INIT.RTS rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.INIT.OPENINPUT
|
2022-10-18 05:56:59 +00:00
|
|
|
|
>PUSHW ZPPtr1
|
2018-10-02 15:52:30 +00:00
|
|
|
|
>PUSHBI O.RDONLY
|
2022-10-18 05:56:59 +00:00
|
|
|
|
>PUSHBI 0 Type
|
|
|
|
|
>PUSHWZ Aux type
|
2017-12-07 16:33:39 +00:00
|
|
|
|
>SYSCALL LoadFile
|
|
|
|
|
bcs CS.INIT.RTS
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>STYA TmpWord
|
2017-12-07 16:33:39 +00:00
|
|
|
|
txa
|
|
|
|
|
>STA.G hInputBuf
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2017-12-07 16:33:39 +00:00
|
|
|
|
>STYA ZPInputBufPtr
|
2022-10-25 06:05:54 +00:00
|
|
|
|
|
|
|
|
|
>PUSHW L.MSG.FILE.OK
|
|
|
|
|
>PUSHW TmpWord
|
|
|
|
|
>PUSHBI 2
|
|
|
|
|
>SYSCALL Printf
|
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
ldy #S.FNT.dfVersion
|
2017-12-07 16:33:39 +00:00
|
|
|
|
lda (ZPInputBufPtr),y
|
|
|
|
|
bne .99
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
iny
|
2017-12-07 16:33:39 +00:00
|
|
|
|
lda (ZPInputBufPtr),y
|
2017-12-08 16:10:39 +00:00
|
|
|
|
cmp #2
|
|
|
|
|
beq .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
cmp #3
|
2017-12-07 16:33:39 +00:00
|
|
|
|
bne .99
|
2022-10-25 06:05:54 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-08 16:10:39 +00:00
|
|
|
|
.1 asl *2 = Entry Len in Tbl
|
|
|
|
|
>STA.G FNT.Version
|
2017-12-07 16:33:39 +00:00
|
|
|
|
pha
|
2022-10-25 06:05:54 +00:00
|
|
|
|
|
|
|
|
|
>PUSHW L.MSG.HEADER.OK
|
|
|
|
|
|
|
|
|
|
pla
|
2017-12-07 16:33:39 +00:00
|
|
|
|
>PUSHA
|
2022-10-25 06:05:54 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.FNT.dfPixWidth
|
|
|
|
|
lda (ZPInputBufPtr),y
|
|
|
|
|
>STA.G FON.Header+S.FON.PixW
|
|
|
|
|
>PUSHA
|
2017-12-08 16:10:39 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.FNT.dfPixHeight
|
2017-12-07 16:33:39 +00:00
|
|
|
|
lda (ZPInputBufPtr),y
|
2017-12-08 16:10:39 +00:00
|
|
|
|
>STA.G FON.Header+S.FON.PixH
|
2017-12-07 16:33:39 +00:00
|
|
|
|
>PUSHA
|
2017-12-08 16:10:39 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
ldy #S.FNT.dfAscent
|
2017-12-08 16:10:39 +00:00
|
|
|
|
lda (ZPInputBufPtr),y
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>STA.G FON.Header+S.FON.Ascent
|
2017-12-07 16:33:39 +00:00
|
|
|
|
>PUSHA
|
2022-10-25 06:05:54 +00:00
|
|
|
|
|
|
|
|
|
>PUSHBI 4
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2017-12-07 16:33:39 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
.99 >LDYA L.MSG.HEADER.KO
|
2022-10-18 05:56:59 +00:00
|
|
|
|
>SYSCALL PutS
|
2018-10-21 20:54:07 +00:00
|
|
|
|
lda #E.IBIN
|
2017-12-07 16:33:39 +00:00
|
|
|
|
sec
|
2019-10-03 06:25:27 +00:00
|
|
|
|
rts
|
2017-12-07 16:33:39 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.INIT.CREATEOUTPUT
|
2022-10-18 05:56:59 +00:00
|
|
|
|
>PUSHW ZPPtr1
|
2018-10-02 15:52:30 +00:00
|
|
|
|
>PUSHBI O.WRONLY+O.CREATE
|
2022-10-18 05:56:59 +00:00
|
|
|
|
>PUSHBI $CC FON Type
|
|
|
|
|
>PUSHWZ Aux type
|
2017-12-07 16:33:39 +00:00
|
|
|
|
>SYSCALL FOpen
|
|
|
|
|
bcs .9
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
>STA.G hOutputFile
|
2017-12-13 06:38:43 +00:00
|
|
|
|
>LDYAI 256
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL GetMem
|
2017-12-13 06:38:43 +00:00
|
|
|
|
bcs .9
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-13 06:38:43 +00:00
|
|
|
|
>STYA ZPOutPutBufPtr
|
|
|
|
|
txa
|
|
|
|
|
>STA.G hOutPutBuf
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.9 rts
|
2017-12-07 16:33:39 +00:00
|
|
|
|
*--------------------------------------
|
2022-10-25 06:05:54 +00:00
|
|
|
|
CS.RUN >PUSHW L.MSG.RANGE
|
|
|
|
|
|
|
|
|
|
ldy #S.FNT.dfFirstChar
|
2017-12-08 16:10:39 +00:00
|
|
|
|
lda (ZPInputBufPtr),y
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>STA.G FON.Header+S.FON.First
|
|
|
|
|
>STA.G CharIndex
|
|
|
|
|
>PUSHA
|
|
|
|
|
|
|
|
|
|
ldy #S.FNT.dfLastChar
|
|
|
|
|
lda (ZPInputBufPtr),y
|
|
|
|
|
>STA.G FON.Header+S.FON.Last
|
2017-12-08 16:10:39 +00:00
|
|
|
|
>PUSHA
|
2017-12-07 16:33:39 +00:00
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
ldy #S.FNT.dfDefaultChar
|
|
|
|
|
lda (ZPInputBufPtr),y
|
|
|
|
|
>STA.G FON.Header+S.FON.Default
|
2017-12-07 16:33:39 +00:00
|
|
|
|
>PUSHA
|
2017-12-13 16:35:10 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
ldy #S.FNT.dfBreakChar
|
2017-12-08 16:10:39 +00:00
|
|
|
|
lda (ZPInputBufPtr),y
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>STA.G FON.Header+S.FON.Break
|
2017-12-08 16:10:39 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>PUSHBI 4
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
>LDA.G FON.Header+S.FON.Last
|
2017-12-11 16:54:34 +00:00
|
|
|
|
sec
|
2017-12-08 16:10:39 +00:00
|
|
|
|
>SBC.G FON.Header+S.FON.First
|
2017-12-13 16:35:10 +00:00
|
|
|
|
inc
|
2017-12-08 16:10:39 +00:00
|
|
|
|
>STA.G CharCount
|
2017-12-13 16:35:10 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
asl
|
2017-12-12 16:35:16 +00:00
|
|
|
|
pha
|
2017-12-13 16:35:10 +00:00
|
|
|
|
>STA.G FileOffset
|
2017-12-11 16:54:34 +00:00
|
|
|
|
lda #0
|
|
|
|
|
rol
|
2017-12-12 16:35:16 +00:00
|
|
|
|
iny
|
|
|
|
|
sta (pData),y
|
|
|
|
|
ply
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL GetMem
|
2017-12-13 16:35:10 +00:00
|
|
|
|
bcs .9
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
>STYA ZPOutPutTblPtr
|
|
|
|
|
txa
|
|
|
|
|
>STA.G hTblBuf
|
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
lda #S.FON
|
|
|
|
|
clc
|
2017-12-13 16:35:10 +00:00
|
|
|
|
>ADC.G FileOffset
|
|
|
|
|
sta (pData),y
|
2017-12-12 16:35:16 +00:00
|
|
|
|
sta ZPOutPutCharOfs
|
2017-12-13 16:35:10 +00:00
|
|
|
|
iny
|
|
|
|
|
lda /S.FON
|
|
|
|
|
adc (pData),y
|
|
|
|
|
sta (pData),y
|
2017-12-12 16:35:16 +00:00
|
|
|
|
sta ZPOutPutCharOfs+1
|
2022-10-25 06:05:54 +00:00
|
|
|
|
|
|
|
|
|
>PUSHB.G hOutputFile
|
|
|
|
|
>PUSHL.G FileOffset
|
|
|
|
|
>PUSHBI SEEK.SET
|
2017-12-12 16:35:16 +00:00
|
|
|
|
>SYSCALL FSeek
|
|
|
|
|
bcc .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-13 16:35:10 +00:00
|
|
|
|
.9 rts
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
.1 >LDA.G FNT.Version
|
2017-12-08 16:10:39 +00:00
|
|
|
|
ldx #S.FNT.dfCharTable2
|
|
|
|
|
cmp #4
|
2017-12-12 16:35:16 +00:00
|
|
|
|
beq .2
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
ldx #S.FNT.dfCharTable3
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
.2 txa
|
2017-12-08 16:10:39 +00:00
|
|
|
|
clc
|
|
|
|
|
adc ZPInputBufPtr
|
|
|
|
|
sta ZPInputTblPtr
|
|
|
|
|
lda #0
|
|
|
|
|
adc ZPInputBufPtr+1
|
|
|
|
|
sta ZPInputTblPtr+1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-12 16:35:16 +00:00
|
|
|
|
CS.RUN.LOOP >SLEEP
|
|
|
|
|
|
|
|
|
|
>SYSCALL GetChar
|
|
|
|
|
bcs .3
|
|
|
|
|
|
|
|
|
|
cmp #$03 Ctrl-C
|
|
|
|
|
beq .9 Abort....
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
cmp #$13 Ctrl-S
|
|
|
|
|
bne .3
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
>LDA.G bPause
|
|
|
|
|
eor #$FF
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
.3 >LDA.G bPause
|
|
|
|
|
bmi CS.RUN.LOOP
|
|
|
|
|
|
|
|
|
|
ldy #2
|
2017-12-08 16:10:39 +00:00
|
|
|
|
lda (ZPInputTblPtr),y Get Char BitMap Offset
|
|
|
|
|
clc
|
|
|
|
|
adc ZPInputBufPtr
|
|
|
|
|
sta ZPInputBMPtr
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPInputTblPtr),y
|
|
|
|
|
adc ZPInputBufPtr+1
|
|
|
|
|
sta ZPInputBMPtr+1
|
|
|
|
|
jsr CS.RUN.GetChar
|
2017-12-11 16:54:34 +00:00
|
|
|
|
jsr CS.RUN.ShiftLChar
|
|
|
|
|
jsr CS.RUN.CutRChar
|
|
|
|
|
jsr CS.RUN.DumpChar
|
2017-12-12 16:35:16 +00:00
|
|
|
|
jsr CS.RUN.StoreChar
|
|
|
|
|
bcs .9
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
>INC.G CharIndex
|
2017-12-08 16:10:39 +00:00
|
|
|
|
>DEC.G CharCount
|
|
|
|
|
beq .8
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
lda ZPInputTblPtr
|
|
|
|
|
clc
|
|
|
|
|
>ADC.G FNT.Version
|
|
|
|
|
sta ZPInputTblPtr
|
2017-12-12 16:35:16 +00:00
|
|
|
|
bcc CS.RUN.LOOP
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
inc ZPInputTblPtr+1
|
2017-12-12 16:35:16 +00:00
|
|
|
|
bra CS.RUN.LOOP
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-13 06:38:43 +00:00
|
|
|
|
.8 jsr CS.RUN.FlushOutPutBuf
|
|
|
|
|
bcs .9
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-13 06:38:43 +00:00
|
|
|
|
jsr CS.RUN.WriteBMAndTbl
|
2017-12-12 16:35:16 +00:00
|
|
|
|
bcs .9
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
>LDYA L.MSG.DONE
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>SYSCALL PutS
|
2017-12-07 16:33:39 +00:00
|
|
|
|
lda #0
|
|
|
|
|
sec
|
2017-12-12 16:35:16 +00:00
|
|
|
|
.9 rts
|
2017-12-07 16:33:39 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-12 16:35:16 +00:00
|
|
|
|
* ZPInputBMPtr->DATA
|
2017-12-08 16:10:39 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-12 16:35:16 +00:00
|
|
|
|
CS.RUN.GetChar lda (ZPInputTblPtr) Get Char PixW
|
|
|
|
|
|
|
|
|
|
>STA.G CharPixW
|
2017-12-11 16:54:34 +00:00
|
|
|
|
>STA.G CharOutPixW
|
|
|
|
|
|
|
|
|
|
pha
|
2017-12-08 16:10:39 +00:00
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
tax
|
|
|
|
|
pla
|
|
|
|
|
and #7
|
|
|
|
|
beq .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
inx
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.1 txa
|
2017-12-08 16:10:39 +00:00
|
|
|
|
>STA.G CharByteW
|
2017-12-11 16:54:34 +00:00
|
|
|
|
>STA.G CharOutByteW
|
|
|
|
|
lda #0 0 -> A -> CharByteW
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
.2 pha
|
|
|
|
|
clc
|
2017-12-11 16:54:34 +00:00
|
|
|
|
adc ZPCharBufPtr
|
2017-12-08 16:10:39 +00:00
|
|
|
|
sta ZPPTR1
|
|
|
|
|
lda #0
|
2017-12-11 16:54:34 +00:00
|
|
|
|
adc ZPCharBufPtr+1
|
2017-12-08 16:10:39 +00:00
|
|
|
|
sta ZPPTR1+1
|
2017-12-11 16:54:34 +00:00
|
|
|
|
>LDA.G FON.Header+S.FON.PixH
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
.3 lda (ZPInputBMPtr) Get one source byte
|
2017-12-08 16:10:39 +00:00
|
|
|
|
|
|
|
|
|
inc ZPInputBMPtr
|
|
|
|
|
bne .4
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
inc ZPInputBMPtr+1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.4 tay
|
|
|
|
|
lda TWIST,y
|
|
|
|
|
sta (ZPPTR1)
|
2017-12-08 16:10:39 +00:00
|
|
|
|
lda ZPPTR1
|
|
|
|
|
clc
|
|
|
|
|
>ADC.G CharByteW
|
|
|
|
|
sta ZPPTR1
|
|
|
|
|
bcc .5
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
inc ZPPTR1+1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.5 dex
|
|
|
|
|
bne .3
|
2017-12-08 16:10:39 +00:00
|
|
|
|
|
|
|
|
|
pla
|
2017-12-11 16:54:34 +00:00
|
|
|
|
inc
|
|
|
|
|
>CMP.G CharByteW
|
|
|
|
|
bne .2
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-08 16:10:39 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-12-11 16:54:34 +00:00
|
|
|
|
* Dump ZPCharBufPtr : CharByteW x FON.Header+S.FON.PixH
|
|
|
|
|
*--------------------------------------
|
2022-10-25 06:05:54 +00:00
|
|
|
|
CS.RUN.DumpChar >PUSHW L.MSG.DUMP
|
|
|
|
|
>PUSHB.G CharIndex
|
|
|
|
|
>PUSHB.G CharOutPixW
|
|
|
|
|
>PUSHB.G CharOutByteW
|
|
|
|
|
>PUSHBI 3
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PrintF
|
2022-10-25 06:05:54 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
lda ZPCharBufPtr
|
|
|
|
|
sta ZPPTR1
|
|
|
|
|
lda ZPCharBufPtr+1
|
|
|
|
|
sta ZPPTR1+1
|
|
|
|
|
|
|
|
|
|
>LDA.G FON.Header+S.FON.PixH
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
.1 pha
|
2017-12-11 16:54:34 +00:00
|
|
|
|
lda #'|'
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL PutChar
|
2017-12-12 07:27:36 +00:00
|
|
|
|
>LDA.G CharOutPixW
|
2017-12-12 16:35:16 +00:00
|
|
|
|
>STA.G Count
|
|
|
|
|
|
|
|
|
|
ldy #0
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
.2 lda (ZPPTR1),y
|
|
|
|
|
phy
|
|
|
|
|
ldx #8
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.4 lsr
|
|
|
|
|
pha
|
|
|
|
|
lda #' '
|
|
|
|
|
bcc .5
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
lda #'O'
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.5 phx
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL PutChar
|
2017-12-11 16:54:34 +00:00
|
|
|
|
plx
|
2017-12-12 16:35:16 +00:00
|
|
|
|
>DEC.G Count
|
2017-12-11 16:54:34 +00:00
|
|
|
|
beq .6
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
pla Get back BYTE
|
2017-12-11 16:54:34 +00:00
|
|
|
|
dex
|
|
|
|
|
bne .4
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
ply
|
|
|
|
|
iny
|
2017-12-11 16:54:34 +00:00
|
|
|
|
bra .2
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
.6 pla
|
|
|
|
|
pla
|
|
|
|
|
|
|
|
|
|
lda #'|'
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL PutChar
|
2017-12-11 16:54:34 +00:00
|
|
|
|
lda #13
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL PutChar
|
2017-12-11 16:54:34 +00:00
|
|
|
|
lda #10
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL PutChar
|
2017-12-12 16:35:16 +00:00
|
|
|
|
lda ZPPTR1
|
|
|
|
|
clc
|
|
|
|
|
>ADC.G CharByteW
|
|
|
|
|
sta ZPPTR1
|
|
|
|
|
bcc .7
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
inc ZPPTR1+1
|
|
|
|
|
|
|
|
|
|
.7 pla
|
|
|
|
|
dec
|
2017-12-11 16:54:34 +00:00
|
|
|
|
bne .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.ShiftLChar
|
|
|
|
|
>LDA.G bNoShrink
|
|
|
|
|
bmi .9
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.1 lda ZPCharBufPtr
|
|
|
|
|
sta ZPPTR1
|
|
|
|
|
lda ZPCharBufPtr+1
|
|
|
|
|
sta ZPPTR1+1
|
|
|
|
|
>LDA.G FON.Header+S.FON.PixH
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
pha
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.2 pla
|
|
|
|
|
ora (ZPPTR1)
|
|
|
|
|
pha
|
|
|
|
|
lda ZPPTR1
|
|
|
|
|
clc
|
|
|
|
|
>ADC.G CharByteW
|
|
|
|
|
sta ZPPTR1
|
|
|
|
|
bcc .3
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
inc ZPPTR1+1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.3 dex
|
|
|
|
|
bne .2
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
pla
|
|
|
|
|
beq .9 No pixel in first COL, must be SPACE or BREAK
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
lsr
|
2017-12-11 16:54:34 +00:00
|
|
|
|
bcs .9
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
lda ZPCharBufPtr
|
|
|
|
|
sta ZPPTR1
|
|
|
|
|
lda ZPCharBufPtr+1
|
|
|
|
|
sta ZPPTR1+1
|
|
|
|
|
>LDA.G FON.Header+S.FON.PixH
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
.4 >LDA.G CharByteW
|
|
|
|
|
tay
|
|
|
|
|
clc
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.5 dey
|
|
|
|
|
lda (ZPPTR1),y
|
|
|
|
|
ror
|
|
|
|
|
sta (ZPPTR1),y
|
|
|
|
|
tya
|
|
|
|
|
bne .5
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
lda ZPPTR1
|
|
|
|
|
clc
|
|
|
|
|
>ADC.G CharByteW
|
|
|
|
|
sta ZPPTR1
|
|
|
|
|
bcc .6
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
inc ZPPTR1+1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.6 dex
|
|
|
|
|
bne .4
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
>DEC.G CharOutPixW
|
|
|
|
|
and #7
|
|
|
|
|
bne .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
>DEC.G CharOutByteW
|
|
|
|
|
bra .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.CutRChar >LDA.G bNoShrink
|
|
|
|
|
bmi .9
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
.1 lda ZPCharBufPtr
|
2017-12-11 16:54:34 +00:00
|
|
|
|
sta ZPPTR1
|
|
|
|
|
lda ZPCharBufPtr+1
|
|
|
|
|
sta ZPPTR1+1
|
2017-12-12 16:35:16 +00:00
|
|
|
|
>LDA.G FON.Header+S.FON.PixH
|
2017-12-11 16:54:34 +00:00
|
|
|
|
tax
|
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
>LDA.G CharOutByteW
|
2017-12-11 16:54:34 +00:00
|
|
|
|
tay
|
|
|
|
|
dey
|
|
|
|
|
lda #0
|
|
|
|
|
pha
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.2 pla
|
|
|
|
|
ora (ZPPTR1),y
|
|
|
|
|
pha
|
2017-12-12 07:27:36 +00:00
|
|
|
|
phy
|
2017-12-11 16:54:34 +00:00
|
|
|
|
lda ZPPTR1
|
|
|
|
|
clc
|
|
|
|
|
>ADC.G CharByteW
|
|
|
|
|
sta ZPPTR1
|
|
|
|
|
bcc .3
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
inc ZPPTR1+1
|
|
|
|
|
|
2017-12-12 07:27:36 +00:00
|
|
|
|
.3 ply
|
|
|
|
|
dex
|
2017-12-11 16:54:34 +00:00
|
|
|
|
bne .2
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
pla
|
2017-12-12 07:27:36 +00:00
|
|
|
|
bmi .9 Bit 7 is colored....exit
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
bne .4
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
tya No bits in this COL
|
|
|
|
|
beq .9 was COL 0.....SPACE or BREAK
|
|
|
|
|
|
2017-12-12 07:27:36 +00:00
|
|
|
|
>DEC.G CharOutByteW Remove the whole column
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
>STA.G CharOutPixW
|
2017-12-11 16:54:34 +00:00
|
|
|
|
bra .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 07:27:36 +00:00
|
|
|
|
.4 pha
|
2017-12-12 16:35:16 +00:00
|
|
|
|
>LDA.G CharOutByteW
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
2017-12-12 07:27:36 +00:00
|
|
|
|
tax
|
|
|
|
|
pla
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.5 dex
|
|
|
|
|
asl
|
2017-12-12 07:27:36 +00:00
|
|
|
|
bpl .5
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
txa
|
2017-12-12 16:35:16 +00:00
|
|
|
|
>STA.G CharOutPixW
|
2017-12-12 07:27:36 +00:00
|
|
|
|
pha
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
lsr
|
|
|
|
|
tax
|
|
|
|
|
pla
|
|
|
|
|
and #7
|
|
|
|
|
beq .7
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 07:27:36 +00:00
|
|
|
|
inx
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 07:27:36 +00:00
|
|
|
|
.7 txa
|
|
|
|
|
>STA.G CharOutByteW
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-11 16:54:34 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2017-12-12 16:35:16 +00:00
|
|
|
|
CS.RUN.StoreChar
|
|
|
|
|
lda ZPOutPutCharOfs
|
|
|
|
|
sta (ZPOutPutTblPtr)
|
|
|
|
|
lda ZPOutPutCharOfs+1
|
|
|
|
|
ldy #1
|
|
|
|
|
sta (ZPOutPutTblPtr),y
|
|
|
|
|
lda ZPOutPutTblPtr
|
|
|
|
|
clc
|
|
|
|
|
adc #2
|
|
|
|
|
sta ZPOutPutTblPtr
|
|
|
|
|
bcc .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
inc ZPOutPutTblPtr+1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
.1 >LDA.G CharOutPixW
|
|
|
|
|
jsr CS.RUN.WriteByte
|
|
|
|
|
bcs .99
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
>LDA.G CharOutByteW
|
|
|
|
|
jsr CS.RUN.WriteByte
|
|
|
|
|
bcs .99
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
lda ZPCharBufPtr
|
|
|
|
|
sta ZPPTR1
|
|
|
|
|
lda ZPCharBufPtr+1
|
|
|
|
|
sta ZPPTR1+1
|
|
|
|
|
>LDA.G FON.Header+S.FON.PixH
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
.2 >LDA.G CharOutByteW
|
|
|
|
|
tax
|
|
|
|
|
ldy #0
|
|
|
|
|
.3 lda (ZPPTR1),y
|
|
|
|
|
jsr CS.RUN.WriteByte
|
|
|
|
|
bcs .9
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .3
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
pla
|
|
|
|
|
dec
|
|
|
|
|
beq .8
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
pha
|
|
|
|
|
lda ZPPTR1
|
|
|
|
|
clc
|
|
|
|
|
>ADC.G CharByteW
|
|
|
|
|
sta ZPPTR1
|
|
|
|
|
bcc .2
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
inc ZPPTR1+1
|
|
|
|
|
bra .2
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.8 clc
|
2017-12-12 16:35:16 +00:00
|
|
|
|
rts
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
.9 plx
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
.99 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.WriteByte
|
|
|
|
|
phy
|
2017-12-13 06:38:43 +00:00
|
|
|
|
phx
|
2017-12-12 16:35:16 +00:00
|
|
|
|
pha
|
2017-12-13 06:38:43 +00:00
|
|
|
|
>LDA.G OutPutPtr
|
2017-12-12 16:35:16 +00:00
|
|
|
|
tay
|
|
|
|
|
pla
|
2017-12-13 06:38:43 +00:00
|
|
|
|
sta (ZPOutPutBufPtr),y
|
|
|
|
|
tya
|
|
|
|
|
inc
|
|
|
|
|
>STA.G OutPutPtr
|
|
|
|
|
tay
|
2017-12-13 16:35:10 +00:00
|
|
|
|
clc
|
2017-12-13 06:38:43 +00:00
|
|
|
|
bne .8
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>PUSHB.G hOutputFile
|
2018-07-25 15:26:14 +00:00
|
|
|
|
>PUSHW ZPOutPutBufPtr
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>PUSHWI 256
|
2017-12-13 06:38:43 +00:00
|
|
|
|
>SYSCALL FWrite
|
|
|
|
|
bcs .9
|
2017-12-12 16:35:16 +00:00
|
|
|
|
|
2017-12-13 06:38:43 +00:00
|
|
|
|
.8 inc ZPOutPutCharOfs
|
2017-12-13 16:35:10 +00:00
|
|
|
|
bne .9
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-12 16:35:16 +00:00
|
|
|
|
inc ZPOutPutCharOfs+1
|
2017-12-13 06:38:43 +00:00
|
|
|
|
|
|
|
|
|
.9 plx
|
|
|
|
|
ply
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.FlushOutPutBuf
|
|
|
|
|
clc
|
|
|
|
|
>LDA.G OutPutPtr
|
|
|
|
|
beq .8
|
2018-07-25 15:26:14 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>PUSHB.G hOutputFile
|
2018-07-25 15:26:14 +00:00
|
|
|
|
>PUSHW ZPOutPutBufPtr
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>PUSHBI 0
|
|
|
|
|
>PUSHB.G OutPutPtr
|
2017-12-13 06:38:43 +00:00
|
|
|
|
>SYSCALL FWrite
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.RUN.WriteBMAndTbl
|
2017-12-13 16:35:10 +00:00
|
|
|
|
ldy #FileOffset
|
|
|
|
|
ldx #4
|
|
|
|
|
lda #0
|
2022-10-25 06:05:54 +00:00
|
|
|
|
|
2017-12-13 16:35:10 +00:00
|
|
|
|
.1 sta (pData),y
|
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>PUSHB.G hOutputFile
|
|
|
|
|
>PUSHL.G FileOffset
|
|
|
|
|
>PUSHBI SEEK.SET
|
2017-12-13 16:35:10 +00:00
|
|
|
|
>SYSCALL FSeek
|
|
|
|
|
bcs .9
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>PUSHB.G hOutputFile
|
2018-07-25 15:26:14 +00:00
|
|
|
|
>PUSHEA.G FON.Header
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>PUSHWI S.FON
|
2017-12-13 16:35:10 +00:00
|
|
|
|
>SYSCALL FWrite
|
|
|
|
|
bcs .9
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2022-10-25 06:05:54 +00:00
|
|
|
|
>PUSHB.G hOutputFile
|
|
|
|
|
|
|
|
|
|
>LDA.G hTblBuf
|
|
|
|
|
>SYSCALL GetMemPtr
|
|
|
|
|
>PUSHYA
|
|
|
|
|
|
2017-12-13 16:35:10 +00:00
|
|
|
|
>LDA.G FON.Header+S.FON.Last
|
|
|
|
|
sec
|
|
|
|
|
>SBC.G FON.Header+S.FON.First
|
|
|
|
|
inc
|
|
|
|
|
asl
|
|
|
|
|
pha
|
|
|
|
|
lda #0
|
|
|
|
|
rol
|
|
|
|
|
ply
|
|
|
|
|
>PUSHYA
|
2018-07-25 15:26:14 +00:00
|
|
|
|
|
2017-12-13 16:35:10 +00:00
|
|
|
|
>SYSCALL FWrite
|
2017-12-13 06:38:43 +00:00
|
|
|
|
clc
|
2017-12-13 16:35:10 +00:00
|
|
|
|
.9 rts
|
2017-12-12 16:35:16 +00:00
|
|
|
|
*--------------------------------------
|
2017-12-07 16:33:39 +00:00
|
|
|
|
CS.DOEVENT sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2017-12-13 06:38:43 +00:00
|
|
|
|
CS.QUIT >LDA.G hOutPutBuf
|
2017-12-07 16:33:39 +00:00
|
|
|
|
beq .1
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2017-12-07 16:33:39 +00:00
|
|
|
|
|
2017-12-13 06:38:43 +00:00
|
|
|
|
.1 >LDA.G hOutputFile
|
|
|
|
|
beq .2
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL FClose
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2017-12-13 06:38:43 +00:00
|
|
|
|
.2 >LDA.G hInputBuf
|
|
|
|
|
beq .3
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2017-12-08 16:10:39 +00:00
|
|
|
|
|
2017-12-13 06:38:43 +00:00
|
|
|
|
.3 >LDA.G hCharBuf
|
|
|
|
|
beq .4
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2017-12-11 16:54:34 +00:00
|
|
|
|
|
2017-12-13 06:38:43 +00:00
|
|
|
|
.4 >LDA.G hTblBuf
|
2017-12-11 16:54:34 +00:00
|
|
|
|
beq .8
|
2022-10-18 05:56:59 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2017-12-08 16:10:39 +00:00
|
|
|
|
|
2017-12-07 16:33:39 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.END
|
2017-12-11 16:54:34 +00:00
|
|
|
|
*--------------------------------------
|
2020-10-06 06:27:35 +00:00
|
|
|
|
.INB usr/src/shared/x.twist.g
|
2017-12-11 16:54:34 +00:00
|
|
|
|
*--------------------------------------
|
2022-10-18 05:56:59 +00:00
|
|
|
|
OptionList .PS "NnVv"
|
2017-12-11 16:54:34 +00:00
|
|
|
|
OptionVars .DA #bNoShrink,#bNoShrink,#bVerbose,#bVerbose
|
2022-10-18 05:56:59 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MSG.USAGE .CS "Usage : FNT2FON FNT-File \r\n"
|
|
|
|
|
.CS " -V : Verbose Mode\r\n"
|
|
|
|
|
.CZ -N : No shrink\r\n"
|
|
|
|
|
MSG.FILE.OK .CZ "FNT File Loaded, %D Bytes Read\r\n"
|
|
|
|
|
MSG.HEADER.OK .CZ "FNT File Version : %d, Size : %d x %d pixels, Ascent : %d\r\n"
|
|
|
|
|
MSG.HEADER.KO .CZ "Invalid Input File Format\r\n"
|
|
|
|
|
MSG.RANGE .CZ "First/Last Char : %d/%d, Default : %d, Break : %d\r\n"
|
|
|
|
|
MSG.DUMP .CZ "Caracter ID : %d (0x0%2h), Width(P) : %d, Width(B) : %d\r\n"
|
|
|
|
|
MSG.DONE .CZ "All Done!!!\r\n"
|
2017-12-07 16:33:39 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
|
|
|
|
DS.START
|
2017-12-08 16:10:39 +00:00
|
|
|
|
FNT.Version .BS 1
|
|
|
|
|
FON.Header .BS S.FON
|
2017-12-12 16:35:16 +00:00
|
|
|
|
Count .BS 1
|
2017-12-07 16:33:39 +00:00
|
|
|
|
hInputBuf .BS 1
|
|
|
|
|
hOutputFile .BS 1
|
2017-12-12 16:35:16 +00:00
|
|
|
|
bPause .BS 1
|
2017-12-07 16:33:39 +00:00
|
|
|
|
bVerbose .BS 1
|
2017-12-11 16:54:34 +00:00
|
|
|
|
bNoShrink .BS 1
|
|
|
|
|
hCharBuf .BS 1
|
|
|
|
|
hTblBuf .BS 1
|
|
|
|
|
CharIndex .BS 1
|
2017-12-08 16:10:39 +00:00
|
|
|
|
CharCount .BS 1
|
2017-12-11 16:54:34 +00:00
|
|
|
|
CharPixW .BS 1
|
2017-12-08 16:10:39 +00:00
|
|
|
|
CharByteW .BS 1
|
2017-12-11 16:54:34 +00:00
|
|
|
|
CharOutPixW .BS 1
|
|
|
|
|
CharOutByteW .BS 1
|
2017-12-13 06:38:43 +00:00
|
|
|
|
hOutPutBuf .BS 1
|
|
|
|
|
OutPutPtr .BS 1
|
2017-12-13 16:35:10 +00:00
|
|
|
|
FileOffset .BS 4
|
2020-10-06 06:27:35 +00:00
|
|
|
|
DS.END .ED
|
2017-12-07 16:33:39 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2020-10-06 06:27:35 +00:00
|
|
|
|
SAVE usr/src/bin/fnt2fon.s
|
2017-12-07 16:33:39 +00:00
|
|
|
|
ASM
|