Skip to content

Commit

Permalink
c16.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
lacanoid committed Apr 7, 2022
1 parent cb0cd85 commit faf4df0
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 0 deletions.
7 changes: 7 additions & 0 deletions defs16.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
;.include "defs.inc"

KEYD = $0527 ; start of keyboard buffer for C64 screen editor
NDX = $EF ; keyboard buffer count for C64 screen editor
COLOR = $053B ; current foreground color
XMAX = $053F ; Maximum Keyboard Buffer Size

Binary file added run64.d64
Binary file not shown.
Binary file added run64.d71
Binary file not shown.
5 changes: 5 additions & 0 deletions tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ kmon.128: kmon.128.o
kmon.128.o: kmon.s
$(AS) $(ASFLAGS) -t c128 -o kmon.128.o kmon.s

kmon.16: kmon.16.o
$(CC) $(LDFLAGS) -t c16 -C c16.cfg -o kmon.16 kmon.16.o
kmon.16.o: kmon.s
$(AS) $(ASFLAGS) -t c16 -o kmon.16.o kmon.s

pip: pip.o
$(CC) $(LDFLAGS) -t c64 -C c64.cfg -u __EXEHDR__ -o pip pip.o
pip.o: pip.s
Expand Down
40 changes: 40 additions & 0 deletions tools/c16.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
SYMBOLS {
__LOADADDR__: type = import;
__EXEHDR__: type = import;
__STACKSIZE__: type = weak, value = $0400; # 1k stack
}
MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = $0FFF, size = $0002;
HEADER: file = %O, start = $1001, size = $000C;
TBUFFR: file = "", start = $333, size = 191;
MAIN: file = %O, start = $100D, size = $2FF3 - __STACKSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = MAIN, type = ro, optional = yes;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss, optional = yes;
BSS: load = MAIN, type = bss, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}
4 changes: 4 additions & 0 deletions tools/kmon.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
.ifdef __C128__
.include "defs128.inc"
.else
.ifdef __C16__
.include "defs16.inc"
.else
.include "defs64.inc"
.forceimport __EXEHDR__
.endif
.endif
.include "macros.inc"

.import __TBUFFR_SIZE__, __TBUFFR_LOAD__, __TBUFFR_RUN__
Expand Down
Binary file modified tools/pip.128.o
Binary file not shown.
Binary file modified tools/pip.o
Binary file not shown.

0 comments on commit faf4df0

Please sign in to comment.