mirror of
https://github.com/A2osX/A2osX.git
synced 2024-09-10 07:54:37 +00:00
Kernel 0.93
This commit is contained in:
parent
a5520bfd87
commit
3e69efa6a5
Binary file not shown.
@ -382,10 +382,7 @@ CMD.ECHO stz ZPPtr1 echo -N
|
|||||||
|
|
||||||
.99 lda #E.CSYN
|
.99 lda #E.CSYN
|
||||||
sec
|
sec
|
||||||
rts
|
.9 rts
|
||||||
|
|
||||||
.9 >DEBUG
|
|
||||||
rts
|
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CMD.GETKEY lda (ZPArgVBufPtr)
|
CMD.GETKEY lda (ZPArgVBufPtr)
|
||||||
beq .99
|
beq .99
|
||||||
|
@ -250,15 +250,11 @@ K.PrintF.1 stz PrintF.Cnt
|
|||||||
ldy #0
|
ldy #0
|
||||||
|
|
||||||
.2 lda (ZPPtr1),y
|
.2 lda (ZPPtr1),y
|
||||||
beq .99
|
beq .7 end of line... print % and exit
|
||||||
iny
|
iny
|
||||||
|
|
||||||
ldx #PrintFTBL1.Cnt-1
|
jsr K.PrintF.CheckTBL1 do we have a %x command?
|
||||||
|
bcc .6 yes, jmp to it!
|
||||||
.3 cmp PrintFTBL1,x do we have a %x command?
|
|
||||||
beq .6 yes, jmp to it!
|
|
||||||
dex
|
|
||||||
bpl .3 no valid letter...
|
|
||||||
|
|
||||||
cmp #'0' ...a 0...mmm... padding char?
|
cmp #'0' ...a 0...mmm... padding char?
|
||||||
bne .4
|
bne .4
|
||||||
@ -271,11 +267,17 @@ K.PrintF.1 stz PrintF.Cnt
|
|||||||
bra .2
|
bra .2
|
||||||
|
|
||||||
.4 jsr MEM.IsDigit
|
.4 jsr MEM.IsDigit
|
||||||
bcs .99
|
bcs .7 no TBL1, no digit....abort
|
||||||
|
|
||||||
.5 and #$0F we have a digit
|
.5 and #$0F we have a digit
|
||||||
pha save it...
|
ldx K.PrintF.PadL
|
||||||
lda K.PrintF.PadL starts K.PrintF.PadL * 10
|
bne .51 second digit...
|
||||||
|
|
||||||
|
sta K.PrintF.PadL first digit, store.
|
||||||
|
bra .2
|
||||||
|
|
||||||
|
.51 pha save it...
|
||||||
|
lda K.PrintF.PadL starts K.PrintF.PadL * 10
|
||||||
asl
|
asl
|
||||||
asl A=times 4
|
asl A=times 4
|
||||||
adc K.PrintF.PadL CC by ASL, A=times 5
|
adc K.PrintF.PadL CC by ASL, A=times 5
|
||||||
@ -286,16 +288,23 @@ K.PrintF.1 stz PrintF.Cnt
|
|||||||
adc K.PrintF.PadL
|
adc K.PrintF.PadL
|
||||||
sta K.PrintF.PadL
|
sta K.PrintF.PadL
|
||||||
|
|
||||||
|
lda (ZPPtr1),y we have 2 digits, must get a letter, now
|
||||||
|
beq .7
|
||||||
iny
|
iny
|
||||||
cpy #3
|
jsr K.PrintF.CheckTBL1
|
||||||
bne .2 go get next char...
|
bcs .7 abort and print %
|
||||||
|
|
||||||
.6 txa
|
.6 jsr MEM.AddYToPtr1 skip all processed chars
|
||||||
|
|
||||||
|
txa
|
||||||
asl
|
asl
|
||||||
tax
|
tax
|
||||||
jsr PrintF.ESC
|
jsr PrintF.ESC
|
||||||
bcc .1
|
bcc .1
|
||||||
bcs .99
|
bcs .99
|
||||||
|
|
||||||
|
.7 lda #'%'
|
||||||
|
bra .20
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
.10 cmp #'\'
|
.10 cmp #'\'
|
||||||
bne .20
|
bne .20
|
||||||
@ -380,6 +389,19 @@ K.PrintF.GetFormat
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
K.PrintF.CheckTBL1
|
||||||
|
ldx #PrintFTBL1.Cnt-1
|
||||||
|
|
||||||
|
.1 cmp PrintFTBL1,x
|
||||||
|
beq .8
|
||||||
|
dex
|
||||||
|
bpl .1
|
||||||
|
sec no valid letter...
|
||||||
|
rts
|
||||||
|
|
||||||
|
.8 clc
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
PrintF.ESC jmp (.1,x)
|
PrintF.ESC jmp (.1,x)
|
||||||
.1 .DA PrintF.B,PrintF.BB
|
.1 .DA PrintF.B,PrintF.BB
|
||||||
.DA PrintF.D,PrintF.DD,PrintF.U
|
.DA PrintF.D,PrintF.DD,PrintF.U
|
||||||
|
Loading…
Reference in New Issue
Block a user