.export _exit
.export __STARTUP__ : absolute = 1 ; Mark as startup
- .import __VLIR0_START__, __VLIR0_SIZE__ ; Linker generated
- .import __STACKSIZE__, __BACKBUFSIZE__ ; Linker generated
+ .import __STACKADDR__, __STACKSIZE__ ; Linker generated
+ .import __BACKBUFSIZE__ ; Linker generated
.import initlib, donelib
.import callmain
.import zerobss
; Setup stack.
- lda #<(__VLIR0_START__ + __VLIR0_SIZE__ + __STACKSIZE__)
- ldx #>(__VLIR0_START__ + __VLIR0_SIZE__ + __STACKSIZE__)
+ lda #<(__STACKADDR__ + __STACKSIZE__)
+ ldx #>(__STACKADDR__ + __STACKSIZE__)
sta sp
stx sp+1
SYMBOLS {
- __STACKSIZE__: type = weak, value = $0400;
__BACKBUFSIZE__: type = weak, value = $2000;
- __OVERLAYSIZE__: type = weak, value = $2000 - $0C00;
- __OVERLAYADDR__: type = weak, value = $0C00;
- __VLIR0END__: type = weak, value = $C000 - __BACKBUFSIZE__ - __STACKSIZE__;
+ __OVERLAYSIZE__: type = weak, value = $0000;
+ __OVERLAYADDR__: type = weak, value = $C000 - __BACKBUFSIZE__ - __OVERLAYSIZE__;
+ __STACKSIZE__: type = weak, value = $0400;
+ __STACKADDR__: type = weak, value = $2000 - __STACKSIZE__;
}
MEMORY {
CVT: file = %O, start = $0, size = $20000;
ZP: define = yes, start = $80, size = $1A + $06;
- VLIR0: define = yes, start = $4000, size = __VLIR0END__ - $4000;
+ EXT: define = yes, start = $0C00, size = __STACKADDR__ - $0C00;
+ VLIR0: define = yes, start = $4000, size = __OVERLAYADDR__ - $4000;
VLIR1: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
VLIR2: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
VLIR3: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
SEGMENTS {
ZEROPAGE: type = zp, load = ZP;
EXTZP: type = zp, load = ZP;
+ EXTBSS: type = bss, load = EXT optional = yes;
FILEINFO: type = ro, load = CVT, offset = $002;
RECORDS: type = ro, load = CVT, offset = $100, optional = yes;
DIRENTRY: type = ro, load = CVT, offset = $180;
SYMBOLS {
- __STACKSIZE__: type = weak, value = $0400;
__BACKBUFSIZE__: type = weak, value = $2000;
__OVERLAYSIZE__: type = weak, value = $0000;
__OVERLAYADDR__: type = weak, value = $8000 - __BACKBUFSIZE__ - __OVERLAYSIZE__;
- __VLIR0END__: type = weak, value = __OVERLAYADDR__ - __STACKSIZE__;
+ __STACKSIZE__: type = weak, value = $0400;
+ __STACKADDR__: type = weak, value = __OVERLAYADDR__ - __STACKSIZE__;
}
MEMORY {
CVT: file = %O, start = $0, size = $40000;
ZP: define = yes, start = $58, size = $1A + $06;
- VLIR0: define = yes, start = $0400, size = __VLIR0END__ - $0400;
+ VLIR0: define = yes, start = $0400, size = __STACKADDR__ - $0400;
VLIR1: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
VLIR2: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
VLIR3: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;