mirror of
https://github.com/irmen/prog8.git
synced 2024-12-25 08:29:25 +00:00
printf now uses proper zp addressing
This commit is contained in:
parent
f42746ba06
commit
82d7179c92
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user