mirror of
https://github.com/cc65/cc65.git
synced 2025-04-09 10:39:40 +00:00
Avoid mixing of memory areas and segments in address computations (and made move of segment INIT somewhat more readable).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5726 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
7691da610b
commit
610bb14988
@ -9,9 +9,9 @@
|
||||
.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"
|
||||
@ -66,8 +66,8 @@
|
||||
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
|
||||
|
||||
|
@ -8,21 +8,21 @@ SYMBOLS {
|
||||
__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;
|
||||
|
@ -4,19 +4,19 @@ SYMBOLS {
|
||||
__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;
|
||||
|
@ -8,21 +8,21 @@ SYMBOLS {
|
||||
__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;
|
||||
|
@ -8,21 +8,21 @@ SYMBOLS {
|
||||
__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;
|
||||
|
@ -4,19 +4,19 @@ SYMBOLS {
|
||||
__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;
|
||||
|
@ -8,21 +8,21 @@ SYMBOLS {
|
||||
__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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user