From 064b84d2e98e6887de8d5cec8c041da08865df1c Mon Sep 17 00:00:00 2001 From: Paul Gardner-Stephen Date: Sun, 28 Apr 2019 01:22:26 +0930 Subject: [PATCH] zero memory pointer in NEW command --- c64/basic/cmd_new.s | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/c64/basic/cmd_new.s b/c64/basic/cmd_new.s index 6f97abcf..18328395 100644 --- a/c64/basic/cmd_new.s +++ b/c64/basic/cmd_new.s @@ -17,6 +17,15 @@ basic_do_new: lda #<$0803 sta basic_start_of_vars_ptr+0 + ;; Zero line pointer + ;; XXX - We should also zero $0800, i.e., basic_start_of_text_ptr - 1 + ldy #$00 + tya + sta (basic_start_of_text_ptr),y + iny + sta (basic_start_of_text_ptr),y + + ;; Get top of memory. ;; If a cart is present, then it is $7FFF, ;; if not, then it is $F7FF, since we support having