Adapted, to the c64 target, the INIT-segment overlay scheme from the apple2 targets.
When a program starts running, INIT is moved from one place to another place. Then, INIT's code is executed; and, the first place is re-used for variables. After the INIT code has finished, the second place can be re-used by the heap and the C stack. That means that initiation code and data won't waste any RAM space after they stop being needed.
This commit is contained in:
@@ -24,6 +24,7 @@ SCREEN_PTR := $D1 ; Pointer to current char in text screen
|
||||
CURS_X := $D3 ; Cursor column
|
||||
CURS_Y := $D6 ; Cursor row
|
||||
CRAM_PTR := $F3 ; Pointer to current char in color RAM
|
||||
FREKZP := $FB ; Five unused bytes
|
||||
|
||||
BASIC_BUF := $200 ; Location of command-line
|
||||
BASIC_BUF_LEN = 89 ; Maximum length of command-line
|
||||
@@ -212,4 +213,3 @@ CASSMOT = $20 ; Cassette motor on
|
||||
TP_FAST = $80 ; Switch Rossmoeller TurboProcess to fast mode
|
||||
|
||||
RAMONLY = $F8 ; (~(LORAM | HIRAM | IOEN)) & $FF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user