diff --git a/testcode/lib/atari/Makefile b/testcode/lib/atari/Makefile new file mode 100644 index 000000000..e9ec853b8 --- /dev/null +++ b/testcode/lib/atari/Makefile @@ -0,0 +1,32 @@ + +all: charmapping.xex defdev.xex displaylist.xex mem.xex multi.xex ostype.xex \ + scrcode.com sys.xex + +charmapping.xex: charmapping.c + cl65 -t atari -o charmapping.xex charmapping.c +defdev.xex: defdev.c + cl65 -t atari -o defdev.xex defdev.c +displaylist.xex: displaylist.c + cl65 -t atari -o displaylist.xex displaylist.c +mem.xex: mem.c ../getsp.s + cl65 -t atari -o mem.xex mem.c ../getsp.s +multi.xex: multi-xex.s multi-xex.cfg + cl65 -t atari -C multi-xex.cfg multi-xex.s -o multi.xex +ostype.xex: ostype.c + cl65 -t atari -o ostype.xex ostype.c +scrcode.com: scrcode.s + ca65 -t atari -o scrcode.o scrcode.s + ld65 -C atari-asm.cfg -o scrcode.com scrcode.o +sys.xex: sys.c + cl65 -t atari -o sys.xex sys.c + +clean: + $(RM) charmapping.xex + $(RM) defdev.xex + $(RM) displaylist.xex + $(RM) mem.xex + $(RM) multi.xex + $(RM) ostype.xex + $(RM) scrcode.o + $(RM) scrcode.com + $(RM) sys.xex diff --git a/testcode/lib/atari/multi.xex b/testcode/lib/atari/multi.xex deleted file mode 100644 index 7da39ad47..000000000 Binary files a/testcode/lib/atari/multi.xex and /dev/null differ diff --git a/testcode/lib/atari/scrcode.s b/testcode/lib/atari/scrcode.s index cd4290781..ba778579b 100644 --- a/testcode/lib/atari/scrcode.s +++ b/testcode/lib/atari/scrcode.s @@ -43,15 +43,20 @@ key: lda CH dispdata: scrcode "fooBa", 'r', $66, 3+4 disp_len = * - dispdata +.export __AUTOSTART__: absolute = 1 .segment "AUTOSTRT" .word $02E0 .word $02E1 .word __CODE_LOAD__+1 +.export __EXEHDR__: absolute = 1 .segment "EXEHDR" .word $FFFF + +.segment "MAINHDR" + .word __CODE_LOAD__ .word __BSS_LOAD__ - 1 diff --git a/testcode/lib/atari/sys.c b/testcode/lib/atari/sys.c index 9ec7aa631..59debd758 100644 --- a/testcode/lib/atari/sys.c +++ b/testcode/lib/atari/sys.c @@ -10,6 +10,8 @@ #include <6502.h> #include +#define IOCB (OS.iocb[0]) + static struct regs regs; static struct __iocb *iocb = &IOCB; /* use IOCB #0 */