fix printing of integers and BASIC free bytes on startup
This commit is contained in:
1 parent
0c05cd335f
commit
3ab4f385ac
2 files changed
+5
-9
No files matched your search
@@ -20,7 +20,7 @@ basic_cold_start:
|
|||||||
tax
|
tax
|
||||||
lda basic_top_of_memory_ptr+1
|
lda basic_top_of_memory_ptr+1
|
||||||
sbc basic_end_of_text_ptr+1
|
sbc basic_end_of_text_ptr+1
|
||||||
|
|
||||||
jsr print_integer
|
jsr print_integer
|
||||||
|
|
||||||
lda #$20
|
lda #$20
|
||||||
|
|||||||
@@ -73,12 +73,13 @@ bit_clear_hi:
|
|||||||
dey
|
dey
|
||||||
dey
|
dey
|
||||||
dey
|
dey
|
||||||
|
dey
|
||||||
|
dey
|
||||||
next_hi_bit:
|
next_hi_bit:
|
||||||
asl
|
asl
|
||||||
cpy #$7f
|
cpy #$7f
|
||||||
bcc hi_loop
|
bcc hi_loop
|
||||||
|
|
||||||
|
|
||||||
;; Deal with any carries
|
;; Deal with any carries
|
||||||
ldx #3
|
ldx #3
|
||||||
carry_fix_loop:
|
carry_fix_loop:
|
||||||
@@ -94,15 +95,10 @@ carry_fix_loop:
|
|||||||
bpl carry_fix_loop
|
bpl carry_fix_loop
|
||||||
|
|
||||||
post_carry:
|
post_carry:
|
||||||
|
|
||||||
;; Got digits.
|
;; Got digits.
|
||||||
;; Skip leading zeros, and print the resulting number
|
;; Skip leading zeros, and print the resulting number
|
||||||
|
|
||||||
ldx #4
|
|
||||||
* lda $0100,x
|
|
||||||
dex
|
|
||||||
bpl -
|
|
||||||
|
|
||||||
;; Skip leading zeros
|
;; Skip leading zeros
|
||||||
ldy #0
|
ldy #0
|
||||||
* lda $0100,y
|
* lda $0100,y
|
||||||
|
|||||||
Reference in new issue
Block a user