Code and or data used only during initialization belongs into the ONCE segment.
.endproc
+fnkeys: .byte $01, $01, $01, $01, $01, $01, $01, $01
+ .byte 133, 137, 134, 138, 135, 139, 136, 140
+
.code
rts
.endproc
-
-
-; Function key table, readonly
-
-.rodata
-fnkeys: .byte $01, $01, $01, $01, $01, $01, $01, $01
- .byte 133, 137, 134, 138, 135, 139, 136, 140
-
;-----------------------------------------------------------------------------
+.segment "ONCE"
+
.proc ppuinit
lda #%10101000
.endproc
-
;-----------------------------------------------------------------------------
.proc paletteinit
bne @loop
rts
-
+
.endproc
;-----------------------------------------------------------------------------
.endproc
+fnkeys: .byte $01, $01, $01, $01, $01, $01, $01, $01
+ .byte 133, 137, 134, 138, 135, 139, 136, 140
+
.segment "LOWCODE" ; Accesses the ROM - must go into low mem
rts
.endproc
-
-
-; Function key table, readonly
-
-.rodata
-fnkeys: .byte $01, $01, $01, $01, $01, $01, $01, $01
- .byte 133, 137, 134, 138, 135, 139, 136, 140
-