Kernel 0.93

This commit is contained in:
Rémy GIBERT 2019-03-25 21:18:50 +00:00
parent a5520bfd87
commit 3e69efa6a5
3 changed files with 36 additions and 17 deletions

Binary file not shown.

View File

@ -382,10 +382,7 @@ CMD.ECHO stz ZPPtr1 echo -N
.99 lda #E.CSYN
sec
rts
.9 >DEBUG
rts
.9 rts
*--------------------------------------
CMD.GETKEY lda (ZPArgVBufPtr)
beq .99

View File

@ -250,15 +250,11 @@ K.PrintF.1 stz PrintF.Cnt
ldy #0
.2 lda (ZPPtr1),y
beq .99
beq .7 end of line... print % and exit
iny
ldx #PrintFTBL1.Cnt-1
.3 cmp PrintFTBL1,x do we have a %x command?
beq .6 yes, jmp to it!
dex
bpl .3 no valid letter...
jsr K.PrintF.CheckTBL1 do we have a %x command?
bcc .6 yes, jmp to it!
cmp #'0' ...a 0...mmm... padding char?
bne .4
@ -271,11 +267,17 @@ K.PrintF.1 stz PrintF.Cnt
bra .2
.4 jsr MEM.IsDigit
bcs .99
bcs .7 no TBL1, no digit....abort
.5 and #$0F we have a digit
pha save it...
lda K.PrintF.PadL starts K.PrintF.PadL * 10
ldx K.PrintF.PadL
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 A=times 4
adc K.PrintF.PadL CC by ASL, A=times 5
@ -286,16 +288,23 @@ K.PrintF.1 stz PrintF.Cnt
adc K.PrintF.PadL
sta K.PrintF.PadL
lda (ZPPtr1),y we have 2 digits, must get a letter, now
beq .7
iny
cpy #3
bne .2 go get next char...
jsr K.PrintF.CheckTBL1
bcs .7 abort and print %
.6 txa
.6 jsr MEM.AddYToPtr1 skip all processed chars
txa
asl
tax
jsr PrintF.ESC
bcc .1
bcs .99
.7 lda #'%'
bra .20
*--------------------------------------
.10 cmp #'\'
bne .20
@ -380,6 +389,19 @@ K.PrintF.GetFormat
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)
.1 .DA PrintF.B,PrintF.BB
.DA PrintF.D,PrintF.DD,PrintF.U