sramprep:
.ifdef DEBUG
- print_string "in sramprep"
+ print_string "entering stage #2"
.endif
; save values of modified system variables and ports
sta ICCOM,x
jsr CIOV_org
-.ifdef DEBUG
- print_string "Stage #2 OK"
- jsr delay
-.endif
-
; Save the zero page locations we need
; copy chargen to low memory
+.ifdef DEBUG
+ print_string "copy chargen to low memory"
+ print_string "set up high memory"
+.endif
+
lda #>(__SRPREP_LOAD__ + __SRPREP_SIZE__ + __SHADOW_RAM_SIZE__)
sta ptr3+1
lda #<(__SRPREP_LOAD__ + __SRPREP_SIZE__ + __SHADOW_RAM_SIZE__)
no_copy:
-; copy chargen to its new location
+; copy chargen to its new (final) location
lda ptr3
sta ptr1
sta NMIEN ; enable VB again
cli ; and enable IRQs
+.ifdef DEBUG
+ print_string "Stage #2 OK"
+ jsr delay
+.endif
rts