.import zerobss
.import initlib, donelib
.import callmain, callirq
- .import __RAM_LAST__, __ZPSAVE_RUN__ ; Linker generated
.import __LC_START__, __LC_LAST__ ; Linker generated
- .import __INIT_SIZE__ ; Linker generated
+ .import __INIT_RUN__, __INIT_SIZE__ ; Linker generated
+ .import __ZPSAVE_RUN__ ; Linker generated
.import __INTERRUPTOR_COUNT__ ; Linker generated
.include "zeropage.inc"
sty $97
; Set destination last address
- lda #<__RAM_LAST__
- ldy #>__RAM_LAST__
+ lda #<(__INIT_RUN__ + __INIT_SIZE__)
+ ldy #>(__INIT_RUN__ + __INIT_SIZE__)
sta $94
sty $95
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack
- __LOADADDR__: type = weak, value = __RAM_START__;
- __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ +
+ __LOADADDR__: type = weak, value = __STARTUP_RUN__;
+ __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__;
}
MEMORY {
ZP: define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $0000, size = $0004;
- RAM: file = %O, define = yes, start = %S, size = $BF00 - __STACKSIZE__ - %S;
+ RAM: file = %O, start = %S, size = $BF00 - __STACKSIZE__ - %S;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro;
- STARTUP: load = RAM, type = ro;
+ STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack
- __LOADADDR__: type = weak, value = __RAM_START__;
- __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ +
+ __LOADADDR__: type = weak, value = __STARTUP_RUN__;
+ __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__;
}
MEMORY {
ZP: define = yes, start = $0080, size = $001A;
- RAM: file = %O, define = yes, start = $2000, size = $9F00 - __STACKSIZE__;
+ RAM: file = %O, start = $2000, size = $9F00 - __STACKSIZE__;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
- STARTUP: load = RAM, type = ro;
+ STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack
- __LOADADDR__: type = weak, value = __RAM_START__;
- __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ +
+ __LOADADDR__: type = weak, value = __STARTUP_RUN__;
+ __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__;
}
MEMORY {
ZP: define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $0000, size = $0004;
- RAM: file = %O, define = yes, start = %S, size = $9600 - __STACKSIZE__ - %S;
+ RAM: file = %O, start = %S, size = $9600 - __STACKSIZE__ - %S;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro;
- STARTUP: load = RAM, type = ro;
+ STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack
- __LOADADDR__: type = weak, value = __RAM_START__;
- __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ +
+ __LOADADDR__: type = weak, value = __STARTUP_RUN__;
+ __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__;
}
MEMORY {
ZP: define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $0000, size = $0004;
- RAM: file = %O, define = yes, start = %S, size = $BF00 - __STACKSIZE__ - %S;
+ RAM: file = %O, start = %S, size = $BF00 - __STACKSIZE__ - %S;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro;
- STARTUP: load = RAM, type = ro;
+ STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack
- __LOADADDR__: type = weak, value = __RAM_START__;
- __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ +
+ __LOADADDR__: type = weak, value = __STARTUP_RUN__;
+ __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__;
}
MEMORY {
ZP: define = yes, start = $0080, size = $001A;
- RAM: file = %O, define = yes, start = $2000, size = $9F00 - __STACKSIZE__;
+ RAM: file = %O, start = $2000, size = $9F00 - __STACKSIZE__;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
- STARTUP: load = RAM, type = ro;
+ STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;
__LCADDR__: type = weak, value = $D400; # Behind quit code
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack
- __LOADADDR__: type = weak, value = __RAM_START__;
- __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ +
+ __LOADADDR__: type = weak, value = __STARTUP_RUN__;
+ __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__;
}
MEMORY {
ZP: define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $0000, size = $0004;
- RAM: file = %O, define = yes, start = %S, size = $9600 - __STACKSIZE__ - %S;
+ RAM: file = %O, start = %S, size = $9600 - __STACKSIZE__ - %S;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro;
- STARTUP: load = RAM, type = ro;
+ STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro;
CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro;