From 8c609dd931106e73ccc5ee576d0a5ee832a1072e Mon Sep 17 00:00:00 2001 From: Greg King Date: Fri, 9 Oct 2015 12:00:41 -0400 Subject: [PATCH] Explained why two variables were moved out of the BSS segment. --- libsrc/c64/crt0.s | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libsrc/c64/crt0.s b/libsrc/c64/crt0.s index a846897fe..a2abe91af 100644 --- a/libsrc/c64/crt0.s +++ b/libsrc/c64/crt0.s @@ -40,7 +40,7 @@ Start: stx spsave ; Save the system stack ptr ; Allow some re-entrancy by skipping the next task if it already was done. -; This often can let us rerun the program without reloading it. +; This sometimes can let us rerun the program without reloading it. ldx move_init beq L0 @@ -125,8 +125,12 @@ L1: lda sp,x .data +; These two variables were moved out of the BSS segment, and into DATA, because +; we need to use them before INIT is moved off of BSS, and before BSS is zeroed. + mmusave:.res 1 spsave: .res 1 + move_init: .byte 1 -- 2.39.2