First round of requested code changes
This commit is contained in:
parent
ae9434e02e
commit
69e2313a63
18 changed files with 96 additions and 84 deletions
|
@ -5,42 +5,42 @@
|
|||
# ld65 --config sym1-32k.cfg -o <prog>.bin <prog>.o
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0200;
|
||||
CONDES: segment = STARTUP,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
CONDES: segment = STARTUP,
|
||||
type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__;
|
||||
STARTADDRESS: default = $0200;
|
||||
CONDES: segment = STARTUP,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
CONDES: segment = STARTUP,
|
||||
type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__;
|
||||
}
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0200; # 512 byte program stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
__STACKSIZE__: type = weak, value = $0200; # 512 byte program stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: start = $0000, size = $00F7, define = yes, file = %O;
|
||||
CPUSTACK: start = $0100, size = $0100, define = yes;
|
||||
RAM: start = %S, size = $8000 - %S - __STACKSIZE__, define = yes, file = %O;
|
||||
MONROM: start = $8000, size = $1000, define = yes;
|
||||
EXT: start = $9000, size = $1000, define = yes;
|
||||
IO: start = $A000, size = $1000, define = yes;
|
||||
RAE1: start = $B000, size = $1000, define = yes;
|
||||
BASROM: start = $C000, size = $1000, define = yes;
|
||||
RAE2: start = $E000, size = $1000, define = yes;
|
||||
TOP: start = $F000, size = $1000, define = yes;
|
||||
ZP: file = %O, define = yes, start = $0000, size = $00F7;
|
||||
CPUSTACK: file = "", define = yes, start = $0100, size = $0100;
|
||||
RAM: file = %O, define = yes, start = %S, size = $8000 - %S - __STACKSIZE__;
|
||||
MONROM: file = "", define = yes, start = $8000, size = $1000;
|
||||
EXT: file = "", define = yes, start = $9000, size = $1000;
|
||||
IO: file = "", define = yes, start = $A000, size = $1000;
|
||||
RAE1: file = "", define = yes, start = $B000, size = $1000;
|
||||
BASROM: file = "", define = yes, start = $C000, size = $1000;
|
||||
RAE2: file = "", define = yes, start = $E000, size = $1000;
|
||||
TOP: file = "", define = yes, start = $F000, size = $1000;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
ONCE: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
ONCE: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,42 +5,42 @@
|
|||
# ld65 --config sym1-4k.cfg -o <prog>.bin <prog>.o
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0200;
|
||||
CONDES: segment = STARTUP,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
CONDES: segment = STARTUP,
|
||||
type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__;
|
||||
STARTADDRESS: default = $0200;
|
||||
CONDES: segment = STARTUP,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
CONDES: segment = STARTUP,
|
||||
type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__;
|
||||
}
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0080; # 128 byte program stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
__STACKSIZE__: type = weak, value = $0080; # 128 byte program stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: start = $0000, size = $00F7, define = yes, file = %O;
|
||||
CPUSTACK: start = $0100, size = $0100, define = yes;
|
||||
RAM: start = %S, size = $1000 - %S - __STACKSIZE__, define = yes, file = %O;
|
||||
MONROM: start = $8000, size = $1000, define = yes;
|
||||
EXT: start = $9000, size = $1000, define = yes;
|
||||
IO: start = $A000, size = $1000, define = yes;
|
||||
RAE1: start = $B000, size = $1000, define = yes;
|
||||
BASROM: start = $C000, size = $1000, define = yes;
|
||||
RAE2: start = $E000, size = $1000, define = yes;
|
||||
TOP: start = $F000, size = $1000, define = yes;
|
||||
ZP: file = %O, define = yes, start = $0000, size = $00F7;
|
||||
CPUSTACK: file = "", define = yes, start = $0100, size = $0100;
|
||||
RAM: file = %O, define = yes, start = %S, size = $1000 - %S - __STACKSIZE__;
|
||||
MONROM: file = "", define = yes, start = $8000, size = $1000;
|
||||
EXT: file = "", define = yes, start = $9000, size = $1000;
|
||||
IO: file = "", define = yes, start = $A000, size = $1000;
|
||||
RAE1: file = "", define = yes, start = $B000, size = $1000;
|
||||
BASROM: file = "", define = yes, start = $C000, size = $1000;
|
||||
RAE2: file = "", define = yes, start = $E000, size = $1000;
|
||||
TOP: file = "", define = yes, start = $F000, size = $1000;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
ONCE: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
ONCE: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
|
||||
|
|
56
cfg/sym1.cfg
56
cfg/sym1.cfg
|
@ -5,42 +5,42 @@
|
|||
# ld65 --config sym1-4k.cfg -o <prog>.bin <prog>.o
|
||||
|
||||
FEATURES {
|
||||
STARTADDRESS: default = $0200;
|
||||
CONDES: segment = STARTUP,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
CONDES: segment = STARTUP,
|
||||
type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__;
|
||||
STARTADDRESS: default = $0200;
|
||||
CONDES: segment = STARTUP,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
CONDES: segment = STARTUP,
|
||||
type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__;
|
||||
}
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0080; # 128 byte program stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
__STACKSIZE__: type = weak, value = $0080; # 128 byte program stack
|
||||
__STARTADDRESS__: type = export, value = %S;
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
ZP: start = $0000, size = $00F7, define = yes, file = %O;
|
||||
CPUSTACK: start = $0100, size = $0100, define = yes;
|
||||
RAM: start = %S, size = $1000 - %S - __STACKSIZE__, define = yes, file = %O;
|
||||
MONROM: start = $8000, size = $1000, define = yes;
|
||||
EXT: start = $9000, size = $1000, define = yes;
|
||||
IO: start = $A000, size = $1000, define = yes;
|
||||
RAE1: start = $B000, size = $1000, define = yes;
|
||||
BASROM: start = $C000, size = $1000, define = yes;
|
||||
RAE2: start = $E000, size = $1000, define = yes;
|
||||
TOP: start = $F000, size = $1000, define = yes;
|
||||
ZP: file = %O, define = yes, start = $0000, size = $00F7;
|
||||
CPUSTACK: file = "", define = yes, start = $0100, size = $0100;
|
||||
RAM: file = %O, define = yes, start = %S, size = $1000 - %S - __STACKSIZE__;
|
||||
MONROM: file = "", define = yes, start = $8000, size = $1000;
|
||||
EXT: file = "", define = yes, start = $9000, size = $1000;
|
||||
IO: file = "", define = yes, start = $A000, size = $1000;
|
||||
RAE1: file = "", define = yes, start = $B000, size = $1000;
|
||||
BASROM: file = "", define = yes, start = $C000, size = $1000;
|
||||
RAE2: file = "", define = yes, start = $E000, size = $1000;
|
||||
TOP: file = "", define = yes, start = $F000, size = $1000;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
ONCE: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
STARTUP: load = RAM, type = ro, define = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
ONCE: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
|
||||
|
|
|
@ -4786,6 +4786,7 @@ compiler, depending on the target system selected:
|
|||
<item><tt/__SIM6502__/ - Target system is <tt/sim6502/
|
||||
<item><tt/__SIM65C02__/ - Target system is <tt/sim65c02/
|
||||
<item><tt/__SUPERVISION__/ - Target system is <tt/supervision/
|
||||
<item><tt/__SYM1__/ - Target system is <tt/sym1/
|
||||
<item><tt/__VIC20__/ - Target system is <tt/vic20/
|
||||
</itemize>
|
||||
|
||||
|
|
|
@ -1022,6 +1022,10 @@ The compiler defines several macros at startup:
|
|||
|
||||
This macro is defined if the target is the Supervision (-t supervision).
|
||||
|
||||
<tag><tt>__SYM1__</tt></tag>
|
||||
|
||||
This macro is defined if the target is the Sym-1 (-t sym1).
|
||||
|
||||
<tag><tt>__TELESTRAT__</tt></tag>
|
||||
|
||||
This macro is defined if the target is the Telestrat (-t telestrat).
|
||||
|
|
5
libsrc/sym1/ctype.s
Normal file
5
libsrc/sym1/ctype.s
Normal file
|
@ -0,0 +1,5 @@
|
|||
; Character specification table.
|
||||
;
|
||||
; uses the "common" definition
|
||||
|
||||
.include "ctype_common.inc"
|
|
@ -335,6 +335,7 @@ static void SetSys (const char* Sys)
|
|||
break;
|
||||
|
||||
case TGT_SYM1:
|
||||
NewSymbol ("__SYM1__", 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -291,6 +291,7 @@ static void SetSys (const char* Sys)
|
|||
break;
|
||||
|
||||
case TGT_SYM1:
|
||||
DefineNumericMacro ("__SYM1__", 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Add table
Reference in a new issue