mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +00:00
Kernel 0.9.1 : GUI, Font converter
This commit is contained in:
parent
f7d3c424fc
commit
403e4f4e8a
@ -515,7 +515,7 @@ Close a file
|
|||||||
## Out :
|
## Out :
|
||||||
|
|
||||||
# FRead.A
|
# FRead.A
|
||||||
Read ONE byte from file
|
Read ONE byte (A) from file (Y)
|
||||||
|
|
||||||
## In :
|
## In :
|
||||||
+ A = hFILE
|
+ A = hFILE
|
||||||
@ -524,6 +524,7 @@ Read ONE byte from file
|
|||||||
+ A = Byte Read
|
+ A = Byte Read
|
||||||
|
|
||||||
# FWrite.AY
|
# FWrite.AY
|
||||||
|
Write ONE byte (A) To file (Y)
|
||||||
|
|
||||||
## In:
|
## In:
|
||||||
+ A = hFILE
|
+ A = hFILE
|
||||||
@ -544,6 +545,7 @@ Read bytes from file
|
|||||||
+ Y,A = Bytes Read
|
+ Y,A = Bytes Read
|
||||||
|
|
||||||
# FWrite
|
# FWrite
|
||||||
|
Write bytes to file
|
||||||
|
|
||||||
## In:
|
## In:
|
||||||
+ PUSHW = Src Ptr
|
+ PUSHW = Src Ptr
|
||||||
@ -600,7 +602,7 @@ Rename a file
|
|||||||
## Out :
|
## Out :
|
||||||
|
|
||||||
# SScanF
|
# SScanF
|
||||||
Scan a PStr (in progress)
|
Scan a C-String (in progress)
|
||||||
|
|
||||||
## In:
|
## In:
|
||||||
+ PUSHW PTR to target buffer
|
+ PUSHW PTR to target buffer
|
||||||
|
Binary file not shown.
Binary file not shown.
105
FNT2FON.S.txt
105
FNT2FON.S.txt
@ -58,7 +58,8 @@ ZPInputTblPtr .EQ ZPBIN+4
|
|||||||
ZPInputBMPtr .EQ ZPBIN+6
|
ZPInputBMPtr .EQ ZPBIN+6
|
||||||
ZPCharBufPtr .EQ ZPBIN+8
|
ZPCharBufPtr .EQ ZPBIN+8
|
||||||
ZPOutPutTblPtr .EQ ZPBIN+10
|
ZPOutPutTblPtr .EQ ZPBIN+10
|
||||||
ZPOutPutCharOfs .EQ ZPBIN+14
|
ZPOutPutCharOfs .EQ ZPBIN+12
|
||||||
|
ZPOutPutBufPtr .EQ ZPBIN+14
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* File Header (16 Bytes)
|
* File Header (16 Bytes)
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
@ -217,6 +218,15 @@ CS.INIT.CREATEOUTPUT
|
|||||||
>SYSCALL FOpen
|
>SYSCALL FOpen
|
||||||
bcs .9
|
bcs .9
|
||||||
>STA.G hOutputFile
|
>STA.G hOutputFile
|
||||||
|
|
||||||
|
>LDYAI 256
|
||||||
|
>SYSCALL GetMem.YA
|
||||||
|
bcs .9
|
||||||
|
|
||||||
|
>STYA ZPOutPutBufPtr
|
||||||
|
txa
|
||||||
|
>STA.G hOutPutBuf
|
||||||
|
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN ldy #S.FNT.dfBreakChar
|
CS.RUN ldy #S.FNT.dfBreakChar
|
||||||
@ -342,7 +352,10 @@ CS.RUN.LOOP >SLEEP
|
|||||||
inc ZPInputTblPtr+1
|
inc ZPInputTblPtr+1
|
||||||
bra CS.RUN.LOOP
|
bra CS.RUN.LOOP
|
||||||
|
|
||||||
.8 jsr CS.RUN.WriteBMAndTbl
|
.8 jsr CS.RUN.FlushOutPutBuf
|
||||||
|
bcs .9
|
||||||
|
|
||||||
|
jsr CS.RUN.WriteBMAndTbl
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>LDYA L.MSG.DONE
|
>LDYA L.MSG.DONE
|
||||||
@ -707,6 +720,54 @@ CS.RUN.StoreChar
|
|||||||
.9 plx
|
.9 plx
|
||||||
.99 rts
|
.99 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
CS.RUN.WriteByte
|
||||||
|
phy
|
||||||
|
phx
|
||||||
|
pha
|
||||||
|
>LDA.G OutPutPtr
|
||||||
|
tay
|
||||||
|
|
||||||
|
pla
|
||||||
|
sta (ZPOutPutBufPtr),y
|
||||||
|
tya
|
||||||
|
inc
|
||||||
|
>STA.G OutPutPtr
|
||||||
|
tay
|
||||||
|
bne .8
|
||||||
|
|
||||||
|
>PUSHW ZPOutPutBufPtr
|
||||||
|
>PUSHWI 256
|
||||||
|
>LDA.G hOutputFile
|
||||||
|
>PUSHA
|
||||||
|
>SYSCALL FWrite
|
||||||
|
bcs .9
|
||||||
|
|
||||||
|
.8 inc ZPOutPutCharOfs
|
||||||
|
bne .81
|
||||||
|
inc ZPOutPutCharOfs+1
|
||||||
|
|
||||||
|
.81 clc
|
||||||
|
|
||||||
|
.9 plx
|
||||||
|
ply
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
|
CS.RUN.FlushOutPutBuf
|
||||||
|
clc
|
||||||
|
>LDA.G OutPutPtr
|
||||||
|
beq .8
|
||||||
|
pha
|
||||||
|
|
||||||
|
>PUSHW ZPOutPutBufPtr
|
||||||
|
ply
|
||||||
|
lda #0
|
||||||
|
>PUSHYA
|
||||||
|
>LDA.G hOutputFile
|
||||||
|
>PUSHA
|
||||||
|
>SYSCALL FWrite
|
||||||
|
|
||||||
|
.8 rts
|
||||||
|
*--------------------------------------
|
||||||
CS.RUN.WriteBMAndTbl
|
CS.RUN.WriteBMAndTbl
|
||||||
|
|
||||||
>LDA.G hTblBuf
|
>LDA.G hTblBuf
|
||||||
@ -717,42 +778,26 @@ CS.RUN.WriteBMAndTbl
|
|||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.WriteByte
|
|
||||||
phx
|
|
||||||
phy
|
|
||||||
pha
|
|
||||||
>LDA.G hOutputFile
|
|
||||||
tay
|
|
||||||
pla
|
|
||||||
|
|
||||||
>DEBUG
|
|
||||||
>SYSCALL FPutC.AY
|
|
||||||
|
|
||||||
inc ZPOutPutCharOfs
|
|
||||||
bne .1
|
|
||||||
inc ZPOutPutCharOfs+1
|
|
||||||
|
|
||||||
.1 ply
|
|
||||||
plx
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
|
||||||
CS.DOEVENT sec
|
CS.DOEVENT sec
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.QUIT >LDA.G hOutputFile
|
CS.QUIT >LDA.G hOutPutBuf
|
||||||
beq .1
|
beq .1
|
||||||
|
|
||||||
>SYSCALL FClose.A
|
|
||||||
|
|
||||||
.1 >LDA.G hInputBuf
|
|
||||||
beq .2
|
|
||||||
>SYSCALL FreeMem.A
|
>SYSCALL FreeMem.A
|
||||||
|
|
||||||
.2 >LDA.G hCharBuf
|
.1 >LDA.G hOutputFile
|
||||||
|
beq .2
|
||||||
|
>SYSCALL FClose.A
|
||||||
|
|
||||||
|
.2 >LDA.G hInputBuf
|
||||||
beq .3
|
beq .3
|
||||||
>SYSCALL FreeMem.A
|
>SYSCALL FreeMem.A
|
||||||
|
|
||||||
.3 >LDA.G hTblBuf
|
.3 >LDA.G hCharBuf
|
||||||
|
beq .4
|
||||||
|
>SYSCALL FreeMem.A
|
||||||
|
|
||||||
|
.4 >LDA.G hTblBuf
|
||||||
beq .8
|
beq .8
|
||||||
>SYSCALL FreeMem.A
|
>SYSCALL FreeMem.A
|
||||||
|
|
||||||
@ -792,6 +837,8 @@ CharPixW .BS 1
|
|||||||
CharByteW .BS 1
|
CharByteW .BS 1
|
||||||
CharOutPixW .BS 1
|
CharOutPixW .BS 1
|
||||||
CharOutByteW .BS 1
|
CharOutByteW .BS 1
|
||||||
|
hOutPutBuf .BS 1
|
||||||
|
OutPutPtr .BS 1
|
||||||
BM.Offset .BS 4
|
BM.Offset .BS 4
|
||||||
|
|
||||||
DS.END
|
DS.END
|
||||||
|
@ -5,7 +5,7 @@ INC 1
|
|||||||
AUTO 6
|
AUTO 6
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # FPutC.AY
|
* # FPutC.AY
|
||||||
* Print A (char) to File
|
* Print A (char) to Node
|
||||||
* ## In:
|
* ## In:
|
||||||
* A : char to print
|
* A : char to print
|
||||||
* Y = hFILE
|
* Y = hFILE
|
||||||
@ -135,7 +135,7 @@ K.GetChar ldy #S.PS.hStdIn
|
|||||||
lda (pPs),y
|
lda (pPs),y
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # GetC.A
|
* # GetC.A
|
||||||
* Get char from File
|
* Get char from Node
|
||||||
* ## In:
|
* ## In:
|
||||||
* A = hFILE
|
* A = hFILE
|
||||||
* ## Out:
|
* ## Out:
|
||||||
@ -208,7 +208,7 @@ K.FPutS
|
|||||||
K.PutS.YA
|
K.PutS.YA
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # FGetS
|
* # FGetS
|
||||||
* Read String From FILE
|
* Read String From Node
|
||||||
* ## In:
|
* ## In:
|
||||||
* PUSHW : CPtr
|
* PUSHW : CPtr
|
||||||
* PUSHB : hFILE
|
* PUSHB : hFILE
|
||||||
@ -370,7 +370,7 @@ K.FClose.A.2 lda #$ff Self Modified
|
|||||||
jmp K.FreeMem.A
|
jmp K.FreeMem.A
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # FRead.A
|
* # FRead.A
|
||||||
* Read ONE byte from file
|
* Read ONE byte (A) from file (Y)
|
||||||
* ## In :
|
* ## In :
|
||||||
* A = hFILE
|
* A = hFILE
|
||||||
* ## Out :
|
* ## Out :
|
||||||
@ -381,6 +381,7 @@ K.FRead.A jsr PFT.CheckNodeA
|
|||||||
bra K.FReadWrite.0
|
bra K.FReadWrite.0
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # FWrite.AY
|
* # FWrite.AY
|
||||||
|
* Write ONE byte (A) To file (Y)
|
||||||
* ## In:
|
* ## In:
|
||||||
* A = hFILE
|
* A = hFILE
|
||||||
* Y = char
|
* Y = char
|
||||||
@ -417,6 +418,7 @@ K.FRead jsr PFT.CheckNodeSTK
|
|||||||
bra K.FReadWrite.1
|
bra K.FReadWrite.1
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # FWrite
|
* # FWrite
|
||||||
|
* Write bytes to file
|
||||||
* ## In:
|
* ## In:
|
||||||
* PUSHW = Src Ptr
|
* PUSHW = Src Ptr
|
||||||
* PUSHW = Bytes To Write
|
* PUSHW = Bytes To Write
|
||||||
@ -618,7 +620,7 @@ K.Rename jsr PFT.CheckPathSTK
|
|||||||
rts
|
rts
|
||||||
*/--------------------------------------
|
*/--------------------------------------
|
||||||
* # SScanF
|
* # SScanF
|
||||||
* Scan a PStr (in progress)
|
* Scan a C-String (in progress)
|
||||||
* ## In:
|
* ## In:
|
||||||
* PUSHW PTR to target buffer
|
* PUSHW PTR to target buffer
|
||||||
* PUSHW PSTR pattern (ex: "%d.%d.%d.%d")
|
* PUSHW PSTR pattern (ex: "%d.%d.%d.%d")
|
||||||
|
Loading…
Reference in New Issue
Block a user