Mercurial > hg > Members > kono > os9 > sbc09
diff io.c @ 46:ec9f494497e1
vdisk fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 20 Jul 2018 11:48:19 +0900 |
parents | 07c84761da6f |
children | 15f1e1b49928 |
line wrap: on
line diff
--- a/io.c Thu Jul 19 16:21:47 2018 +0900 +++ b/io.c Fri Jul 20 11:48:19 2018 +0900 @@ -45,6 +45,9 @@ /* * IO Map ( can be overrupped by ROM ) * + * In do_input/do_output call, we cannot access 6809 registers, since it is in i*reg, + * which is a local variable of interpr + * * IOPAGE ~ IOPAGE+0x7f * for OS9 level2 * IOPAGE 0xff80 means ioport beging 0xff80 but IOPAGE itself starts 0xff00 @@ -74,9 +77,9 @@ * 0xd1- VDISK command * IOPAGE + 0x41 drive no / VDISK drv * IOPAGE + 0x42 LSN2 / VDISK sysmode 0 for system, 1 for user - * IOPAGE + 0x43 LSN1 / VDISK Curdir pd number - * IOPAGE + 0x44 LSN0 / VDISK file attribute - * IOPAGE + 0x45 ADR2 + * IOPAGE + 0x43 LSN1 / VDISK Curdir pd number (2 byte) + * IOPAGE + 0x44 LSN0 + * IOPAGE + 0x45 ADR2 / VDISK caller stack * IOPAGE + 0x46 ADR1 * * @@ -104,6 +107,11 @@ FILE *logfile; FILE *disk[] = {0,0}; +#ifdef USE_VDISK +extern void do_vdisk(int c); +#endif + + #ifdef USE_MMU extern char *prog ; // for disass extern Byte * mem0(Byte *iphymem, Word adr, Byte *immu) ; @@ -329,7 +337,7 @@ } else if (c==0x55) { if (lseek(fileno(disk[drv]),lsn*SECSIZE,SEEK_SET)==-1) goto error; if (write(fileno(disk[drv]),phy,SECSIZE)==-1) goto error; -#ifdef VDISK +#ifdef USE_VDISK } else { do_vdisk(c); #endif