-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathld65.cfg
49 lines (48 loc) · 2.42 KB
/
ld65.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# exehdr: Archetype: Commodore 64: PRG with Basic header to execute assembly code.
# Copyright (C) 2022 C64PECTRE
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see https://www.gnu.org/licenses/.
#
# Contact: https://github.com/c64pectre/exehdr/ create an issue
FEATURES {
STARTADDRESS: default=$0801;
}
SYMBOLS {
__LOADADDR__: type = import;
}
MEMORY {
ZEROPAGE : file="" , start=$0000 , size=$0100 , type=rw , define=yes;
STACK : file="" , start=$0100 , size=$0100 , type=rw , define=yes;
OS_RAM : file="" , start=$0200 , size=$0200 , type=rw , define=yes;
TEXT_SCREEN: file="" , start=$0400 , size=$0400 , type=rw , define=yes;
BASIC_RAM : file="" , start=$0800 , size=$9800 , type=rw , define=yes;
BASIC_ROM : file="" , start=$A000 , size=$2000 , type=ro , define=yes;
HI_RAM : file="" , start=$C000 , size=$1000 , type=rw , define=yes;
IO_AREA : file="" , start=$D000 , size=$1000 , type=rw , define=yes;
IO_CHAR_ROM: file="" , start=$D000 , size=$1000 , type=ro , define=yes;
IO_RAM : file="" , start=$D000 , size=$1000 , type=rw , define=yes;
KERNAL_ROM : file="" , start=$E000 , size=$2000 , type=ro , define=yes;
# Program
LOADADDR_MEM: file="%O" , start=%S - 2 , size=2 ;
PROGRAM_MEM : file="%O" , start=%S , size=$A000 - %S;
}
SEGMENTS {
LOADADDR : load=LOADADDR_MEM , type=ro ;
EXEHDR : load=PROGRAM_MEM , type=ro , optional=yes , define = yes;
ENTRYPOINT: load=PROGRAM_MEM , type=rw , define = yes;
CODE : load=PROGRAM_MEM , type=rw , define = yes;
RODATA : load=PROGRAM_MEM , type=ro , optional=yes , define = yes;
DATA : load=PROGRAM_MEM , type=rw , optional=yes , define = yes;
BSS : load=PROGRAM_MEM , type=bss , optional=yes , define = yes;
}