Renamed INITBSS to INIT and INIT to ONCE.
The way we want to use the INITBSS segment - and especially the fact that it won't have the type bss on all ROM based targets - means that the name INITBSS is misleading. After all INIT is the best name from my perspective as it serves several purposes and therefore needs a rather generic name. Unfortunately this means that the current INIT segment needs to be renamed too. Looking for a short (ideally 4 letter) name I came up with ONCE as it contains all code (and data) accessed only once during initialization.
This commit is contained in:
@@ -34,7 +34,7 @@ Start:
|
||||
tsx
|
||||
stx spsave ; Save the system stack ptr
|
||||
|
||||
; Save space by putting some of the start-up code in the INIT segment,
|
||||
; Save space by putting some of the start-up code in the ONCE segment,
|
||||
; which can be re-used by the BSS segment, the heap and the C stack.
|
||||
|
||||
jsr init
|
||||
@@ -79,7 +79,7 @@ L2: lda zpsave,x
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
init:
|
||||
|
||||
@@ -111,7 +111,7 @@ L1: lda sp,x
|
||||
; ------------------------------------------------------------------------
|
||||
; Data
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
mmusave:.res 1
|
||||
spsave: .res 1
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initirq:
|
||||
lda IRQVec
|
||||
|
||||
@@ -32,10 +32,10 @@ MAXARGS = 10 ; Maximum number of arguments allowed
|
||||
REM = $8f ; BASIC token-code
|
||||
NAME_LEN = 16 ; Maximum length of command-name
|
||||
|
||||
; Get possible command-line arguments. Goes into the special INIT segment,
|
||||
; Get possible command-line arguments. Goes into the special ONCE segment,
|
||||
; which may be reused after the startup code is run
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initmainargs:
|
||||
|
||||
@@ -125,7 +125,7 @@ done: lda #<argv
|
||||
stx __argv + 1
|
||||
rts
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
term: .res 1
|
||||
name: .res NAME_LEN + 1
|
||||
|
||||
@@ -30,7 +30,7 @@ VIC_SPR_Y = (VIC_SPR0_Y + 2*MOUSE_SPR) ; Sprite Y register
|
||||
; --------------------------------------------------------------------------
|
||||
; Initialize the mouse sprite.
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initmcb:
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
.export soft80_charset
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
soft80_charset:
|
||||
.byte $0f,$03,$0f,$00,$0f,$07,$05,$0e
|
||||
.byte $0f,$05,$0e,$0b,$0f,$0b,$0f,$0f
|
||||
|
||||
@@ -56,7 +56,7 @@ soft80_shutdown:
|
||||
sta CIA2_PRA
|
||||
jmp $FF5B ; Initialize video I/O
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
firstinit:
|
||||
; copy charset to RAM under I/O
|
||||
sei
|
||||
@@ -146,7 +146,7 @@ soft80_bitmapyhi_data:
|
||||
soft80_tables_data_end:
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
soft80_internal_cellcolor:
|
||||
.res 1
|
||||
soft80_internal_bgcolor:
|
||||
|
||||
@@ -60,7 +60,7 @@ soft80mono_shutdown:
|
||||
sta VIC_VIDEO_ADR
|
||||
rts
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
firstinit:
|
||||
; copy charset to RAM under I/O
|
||||
sei
|
||||
@@ -150,7 +150,7 @@ soft80_bitmapyhi_data:
|
||||
soft80_tables_data_end:
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
soft80mono_internal_cellcolor:
|
||||
.res 1
|
||||
soft80mono_internal_bgcolor:
|
||||
|
||||
@@ -63,7 +63,7 @@ BCD2dec:tax
|
||||
; Constructor that writes to the 1/10 sec register of the TOD to kick it
|
||||
; into action. If this is not done, the clock hangs. We will read the register
|
||||
; and write it again, ignoring a possible change in between.
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
.proc initsystime
|
||||
|
||||
|
||||
Reference in New Issue
Block a user