# HG changeset patch # User Shinji KONO # Date 1530680636 -32400 # Node ID 831ac057ea8644fa37f88711d221eee86390dfa7 # Parent 31d96e2b364e2f29a7254fea1f634692cba41fe3 before mmu diff -r 31d96e2b364e -r 831ac057ea86 Makefile --- a/Makefile Mon Jul 02 21:39:55 2018 +0900 +++ b/Makefile Wed Jul 04 14:03:56 2018 +0900 @@ -35,6 +35,9 @@ v09: v09.o engine.o io.o os9disass.o $(CC) -o v09 $(CFLAGS) v09.o engine.o io.o os9disass.o +v09c: v09.c engine.c io.c os9disass.o + $(CC) -o v09c $(CFLAGS) $(V09FLAGS) -DIOBASE=0xff00 -DUSE_MMU=1 v09.c engine.c io.c os9disass.o + v09.o: v09.c v09.h $(CC) -c $(CFLAGS) $(V09FLAGS) v09.c diff -r 31d96e2b364e -r 831ac057ea86 a09.c --- a/a09.c Mon Jul 02 21:39:55 2018 +0900 +++ b/a09.c Wed Jul 04 14:03:56 2018 +0900 @@ -178,6 +178,7 @@ }; int symcounter=0; +int os9 = 0; // os9 flag /* Symbol categories. 0 Constant value (from equ). @@ -1091,6 +1092,7 @@ void os9begin() { generating=1; + os9=1; // contiguous code generation ( i.e. ignore org nor rmb ) modStart = loccounter; reset_crc(); putword(0x87cd); @@ -1132,13 +1134,14 @@ switch(co) { case 0:/* RMB */ + // in OS9 mode, this generates no data + // loccounter will be reset after any code to the current code generation setlabel(lp); operand=scanexpr(0); if(unknown)error|=4; loccounter+=operand; if(generating&&pass==2) { - if(!outmode)for(i=0;i> 13 ] <<13 ) + (adr & 0x1fff ) ] + * tr=0 mmu=IOPAGE+0xa0 + * tr=1 mmu=IOPAGE+0xa8 * */ @@ -180,12 +191,8 @@ f = EOF; } return c; - } else if ((a&0xf0) == 0x10) { /* timer */ - return mem[IOPAGE + a]; - } else if ((a&0xf0) == 0x20) { /* disk */ - return mem[IOPAGE + a]; } - return 0; + return mem[IOPAGE + a]; } void do_output(int a, int c) { diff -r 31d96e2b364e -r 831ac057ea86 os9/Makefile --- a/os9/Makefile Mon Jul 02 21:39:55 2018 +0900 +++ b/os9/Makefile Wed Jul 04 14:03:56 2018 +0900 @@ -19,5 +19,5 @@ ./makerom os9b.rom modules/Basic09 modules/Shell modules/init.b modules/mdir modules/SysGo modules/IOMan modules/SCF modules/pty-dd.b modules/pty.b modules/OS9p2 modules/OS9 os9d.rom : makerom modules/init.b modules/pty.b - ./makerom os9d.rom modules/Shell modules/dir.b modules/init.b modules/mdir modules/SysGo modules/IOMan modules/SCF modules/rbf.b modules/pty-dd.b modules/pty.b modules/pdisk.b modules/d0.b modules/d1.b modules/clock.b modules/OS9p2 modules/OS9 + ./makerom os9d.rom modules/Shell modules/dir.b modules/init.b modules/mdir modules/SysGo modules/IOMan modules/pty-dd.b modules/pty.b modules/pdisk.b modules/d0.b modules/d1.b modules/clock.b modules/SCF modules/rbf.b modules/OS9p2 modules/OS9 diff -r 31d96e2b364e -r 831ac057ea86 v09.c --- a/v09.c Mon Jul 02 21:39:55 2018 +0900 +++ b/v09.c Wed Jul 04 14:03:56 2018 +0900 @@ -98,7 +98,6 @@ int main(int argc,char *argv[]) { - Word loadaddr=0x100; char *imagename=0; int i; int setterm = 1; diff -r 31d96e2b364e -r 831ac057ea86 v09.h --- a/v09.h Mon Jul 02 21:39:55 2018 +0900 +++ b/v09.h Wed Jul 04 14:03:56 2018 +0900 @@ -31,7 +31,9 @@ engine int timer; engine FILE *tracefile; +#ifndef IOPAGE #define IOPAGE 0xe000 +#endif void interpr(void); void do_exit(void);