printf now uses proper zp addressing

This commit is contained in:
Irmen de Jong 2020-09-13 21:01:19 +02:00
parent f42746ba06
commit 82d7179c92
2 changed files with 6 additions and 6 deletions

View File

@ -199,10 +199,10 @@ sub print_f (float value) {
ldy #>value ldy #>value
jsr MOVFM ; load float into fac1 jsr MOVFM ; load float into fac1
jsr FOUT ; fac1 to string in A/Y jsr FOUT ; fac1 to string in A/Y
sta P8ZP_SCRATCH_B1 sta P8ZP_SCRATCH_W1
sty P8ZP_SCRATCH_REG sty P8ZP_SCRATCH_W1+1
ldy #0 ldy #0
- lda (P8ZP_SCRATCH_B1),y - lda (P8ZP_SCRATCH_W1),y
beq + beq +
jsr c64.CHROUT jsr c64.CHROUT
iny iny

View File

@ -135,10 +135,10 @@ sub print_f (float value) {
ldy #>value ldy #>value
jsr MOVFM ; load float into fac1 jsr MOVFM ; load float into fac1
jsr FOUT ; fac1 to string in A/Y jsr FOUT ; fac1 to string in A/Y
sta P8ZP_SCRATCH_B1 sta P8ZP_SCRATCH_W1
sty P8ZP_SCRATCH_REG sty P8ZP_SCRATCH_W1+1
ldy #0 ldy #0
- lda (P8ZP_SCRATCH_B1),y - lda (P8ZP_SCRATCH_W1),y
beq + beq +
jsr c64.CHROUT jsr c64.CHROUT
iny iny