diff os9/mc09/mclibos9.c @ 103:844305752064

no compile errors on mc09
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 27 Dec 2018 20:16:34 +0900
parents 09148bb27659
children 096b3fc7aa66
line wrap: on
line diff
--- a/os9/mc09/mclibos9.c	Thu Dec 27 16:03:36 2018 +0900
+++ b/os9/mc09/mclibos9.c	Thu Dec 27 20:16:34 2018 +0900
@@ -2,17 +2,12 @@
  *  os9  driver
  */
 
-#asm
-         ifp1
-         use   defsfile
-         endc
-#endasm
 
 typedef	struct {
     int fd;                   /*  0 */
-    int mode;                 /*  2 */
+    int fmode;                 /*  2 */
     int len;                  /*  4 */
-    char *name;               /*  6 */
+    char *fname;               /*  6 */
     char *ptr;        /*  8 */
     char buff[256];       /*  10 */
  } FILE ;
@@ -156,19 +151,19 @@
         lda       2,x          mode
         ldb       3,x          src attribute
         leax      6,x          name
-        os9       F$Create
-        bcc        _LC0001
+        os9       I$Create
+        bcc        _LC0003
         ldx       -4,u
         clrb
         std       ,x
-        bra       _LC0002
-_LC0001
+        bra       _LC0004
+_LC0003
         ldx       -4,u
         clra
         stD       2,x          err code
         ldd       #-1
         std       ,x
-_LC0002
+_LC0004
         puls      x,y,u
 #endasm
 	if (fcbp->fd < 0 ) return NULL;
@@ -237,10 +232,10 @@
         clr       ,s
         ldy       #1
         os9       I$Read
-        bcc       _LC0003
+        bcc       _LC0005
         ldd       #-1
         std       ,s
-_LC0003
+_LC0005
         puls      d,x,y,u
 #endasm
 }