mirror of
https://github.com/cc65/cc65.git
synced 2025-03-01 11:29:27 +00:00
Don't hardcode the stack location
git-svn-id: svn://svn.cc65.org/cc65/trunk@609 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
a4b921ca7e
commit
22b55ae7fe
@ -8,6 +8,7 @@
|
|||||||
.import initlib, donelib
|
.import initlib, donelib
|
||||||
.import zerobss, push0
|
.import zerobss, push0
|
||||||
.import _main
|
.import _main
|
||||||
|
.import __RAM_START__, __RAM_SIZE__ ; Linker generated
|
||||||
|
|
||||||
.include "c64.inc"
|
.include "c64.inc"
|
||||||
.include "../cbm/cbm.inc"
|
.include "../cbm/cbm.inc"
|
||||||
@ -85,9 +86,9 @@ L1: lda sp,x
|
|||||||
ora #$06 ; Enable kernal+I/O, disable basic
|
ora #$06 ; Enable kernal+I/O, disable basic
|
||||||
sta $01
|
sta $01
|
||||||
|
|
||||||
lda #<$D000
|
lda #<(__RAM_START__ + __RAM_SIZE__)
|
||||||
sta sp
|
sta sp
|
||||||
lda #>$D000
|
lda #>(__RAM_START__ + __RAM_SIZE__)
|
||||||
sta sp+1 ; Set argument stack ptr
|
sta sp+1 ; Set argument stack ptr
|
||||||
|
|
||||||
; Call module constructors
|
; Call module constructors
|
||||||
|
@ -26,7 +26,10 @@ _read: jsr popax ; get count
|
|||||||
L1: lda ptr2
|
L1: lda ptr2
|
||||||
ora ptr2+1 ; count zero?
|
ora ptr2+1 ; count zero?
|
||||||
beq L9
|
beq L9
|
||||||
jsr BASIN
|
dec ptr2
|
||||||
|
bne L1a
|
||||||
|
dec ptr2+1
|
||||||
|
L1a: jsr BASIN
|
||||||
ldy #0
|
ldy #0
|
||||||
sta (ptr1),y ; save char
|
sta (ptr1),y ; save char
|
||||||
inc ptr1
|
inc ptr1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user