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:
@@ -14,7 +14,7 @@
|
||||
|
||||
.include "apple2.inc"
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
.ifdef __APPLE2ENH__
|
||||
initconio:
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
.import initlib, donelib
|
||||
.import callmain
|
||||
.import __LC_START__, __LC_LAST__ ; Linker generated
|
||||
.import __INIT_RUN__, __INIT_SIZE__ ; Linker generated
|
||||
.import __INITBSS_RUN__ ; Linker generated
|
||||
.import __ONCE_RUN__, __ONCE_SIZE__ ; Linker generated
|
||||
.import __INIT_RUN__ ; Linker generated
|
||||
|
||||
.include "zeropage.inc"
|
||||
.include "apple2.inc"
|
||||
@@ -29,14 +29,14 @@
|
||||
bit $C081
|
||||
|
||||
; Set the source start address.
|
||||
lda #<(__INITBSS_RUN__ + __INIT_SIZE__)
|
||||
ldy #>(__INITBSS_RUN__ + __INIT_SIZE__)
|
||||
lda #<(__INIT_RUN__ + __ONCE_SIZE__)
|
||||
ldy #>(__INIT_RUN__ + __ONCE_SIZE__)
|
||||
sta $9B
|
||||
sty $9C
|
||||
|
||||
; Set the source last address.
|
||||
lda #<(__INITBSS_RUN__ + __INIT_SIZE__ + __LC_LAST__ - __LC_START__)
|
||||
ldy #>(__INITBSS_RUN__ + __INIT_SIZE__ + __LC_LAST__ - __LC_START__)
|
||||
lda #<(__INIT_RUN__ + __ONCE_SIZE__ + __LC_LAST__ - __LC_START__)
|
||||
ldy #>(__INIT_RUN__ + __ONCE_SIZE__ + __LC_LAST__ - __LC_START__)
|
||||
sta $96
|
||||
sty $97
|
||||
|
||||
@@ -51,25 +51,25 @@
|
||||
jsr $D39A ; BLTU2
|
||||
|
||||
; Set the source start address.
|
||||
lda #<__INITBSS_RUN__
|
||||
ldy #>__INITBSS_RUN__
|
||||
lda #<__INIT_RUN__
|
||||
ldy #>__INIT_RUN__
|
||||
sta $9B
|
||||
sty $9C
|
||||
|
||||
; Set the source last address.
|
||||
lda #<(__INITBSS_RUN__ + __INIT_SIZE__)
|
||||
ldy #>(__INITBSS_RUN__ + __INIT_SIZE__)
|
||||
lda #<(__INIT_RUN__ + __ONCE_SIZE__)
|
||||
ldy #>(__INIT_RUN__ + __ONCE_SIZE__)
|
||||
sta $96
|
||||
sty $97
|
||||
|
||||
; Set the destination last address.
|
||||
lda #<(__INIT_RUN__ + __INIT_SIZE__)
|
||||
ldy #>(__INIT_RUN__ + __INIT_SIZE__)
|
||||
lda #<(__ONCE_RUN__ + __ONCE_SIZE__)
|
||||
ldy #>(__ONCE_RUN__ + __ONCE_SIZE__)
|
||||
sta $94
|
||||
sty $95
|
||||
|
||||
; Call into Applesoft Block Transfer Up -- which handles moving
|
||||
; overlapping blocks upwards well -- to move the INIT segment.
|
||||
; overlapping blocks upwards well -- to move the ONCE segment.
|
||||
jsr $D39A ; BLTU2
|
||||
|
||||
; Delegate all further processing, to keep the STARTUP segment small.
|
||||
@@ -109,7 +109,7 @@ exit: ldx #$02
|
||||
; We're done
|
||||
jmp done
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
; Save the zero-page locations that we need.
|
||||
init: ldx #zpspace-1
|
||||
@@ -201,7 +201,7 @@ q_param:.byte $04 ; param_count
|
||||
; Final jump when we're done
|
||||
done: jmp DOSWARM ; Potentially patched at runtime
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
zpsave: .res zpspace
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
; - Apple II ProDOS 8 TechNote #23, ProDOS 8 Changes and Minutia
|
||||
; - ProDOS TechRefMan, chapter 5.2.4
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initdostype:
|
||||
lda $BF00
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
.include "errno.inc"
|
||||
.include "../filedes.inc"
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initiobuf:
|
||||
; Convert end address highbyte to table index
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
; Identify machine according to:
|
||||
; Apple II Miscellaneous TechNote #7, Apple II Family Identification
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initostype:
|
||||
sec
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
.include "apple2.inc"
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initirq:
|
||||
; Check for ProDOS
|
||||
|
||||
@@ -46,10 +46,10 @@ FNAM_LEN = $280
|
||||
FNAM = $281
|
||||
REM = $B2 ; BASIC token-code
|
||||
|
||||
; 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:
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
.include "mli.inc"
|
||||
.include "filedes.inc"
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
raisefilelevel:
|
||||
; Raise file level
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
.include "filedes.inc"
|
||||
.include "apple2.inc"
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initprompt:
|
||||
; Set prompt <> ']' to let DOS 3.3 know that we're
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
_rebootafterexit := return
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initreboot:
|
||||
; Quit to PWRUP
|
||||
|
||||
Reference in New Issue
Block a user