From 1c3b7d4ac4cae6c3af8ba377c6571cab4ec47e88 Mon Sep 17 00:00:00 2001 From: Boisy Pitre Date: Thu, 11 Jul 2024 06:08:12 -0500 Subject: [PATCH] Necessary changes to assemble on macOS --- Source/Libs/KLibc/GNUmakefile | 48 ++++++++++++++--------------- Source/Libs/KLibc/cmoc.make | 3 +- Source/Libs/KLibc/dccmoc.sed | 4 +-- Source/Libs/KLibc/imath/rpterr.a | 4 --- Source/Libs/KLibc/lib.a/datmods.a | 3 -- Source/Libs/KLibc/lib.a/devtyp.a | 4 --- Source/Libs/KLibc/lib.a/gs1.a | 4 --- Source/Libs/KLibc/lib.a/gs2.a | 4 --- Source/Libs/KLibc/lib.a/sleep.a | 3 -- Source/Libs/KLibc/lib.a/ss1.a | 4 --- Source/Libs/KLibc/lib.a/ss2.a | 5 --- Source/Libs/KLibc/lib.a/ss3.a | 5 --- Source/Libs/KLibc/lib.c/GNUmakefile | 6 ++-- Source/Libs/KLibc/lib.c/asctime.c | 2 +- Source/Libs/KLibc/lib.c/ctime.c | 2 +- Source/Libs/KLibc/lib.c/defdrive.c | 7 +++-- Source/Libs/KLibc/lib.c/popen.c | 4 +-- Source/Libs/KLibc/lib.c/prof.c | 1 + Source/Libs/KLibc/rma2lw.sed | 16 +++++----- Source/Libs/KLibc/sys.a/abort.a | 2 -- Source/Libs/KLibc/sys.a/access.a | 3 -- Source/Libs/KLibc/sys.a/brk.a | 1 - Source/Libs/KLibc/sys.a/cfinish.a | 2 -- Source/Libs/KLibc/sys.a/chmod.a | 3 -- Source/Libs/KLibc/sys.a/chown.a | 3 -- Source/Libs/KLibc/sys.a/create.a | 3 -- Source/Libs/KLibc/sys.a/css.a | 4 --- Source/Libs/KLibc/sys.a/cstart.a | 4 --- Source/Libs/KLibc/sys.a/dir.a | 1 - Source/Libs/KLibc/sys.a/ibrk.a | 1 - Source/Libs/KLibc/sys.a/id.a | 3 -- Source/Libs/KLibc/sys.a/intercept.a | 1 - Source/Libs/KLibc/sys.a/lseek.a | 1 - Source/Libs/KLibc/sys.a/mem.a | 1 - Source/Libs/KLibc/sys.a/misc.a | 1 - Source/Libs/KLibc/sys.a/mod.a | 6 ++-- Source/Libs/KLibc/sys.a/open.a | 3 -- Source/Libs/KLibc/sys.a/process.a | 1 - Source/Libs/KLibc/sys.a/read.a | 1 - Source/Libs/KLibc/sys.a/sbrk.a | 1 - Source/Libs/KLibc/sys.a/signal.a | 1 - Source/Libs/KLibc/sys.a/stat.a | 3 -- Source/Libs/KLibc/sys.a/time.a | 1 - Source/Libs/KLibc/sys.a/write.a | 1 - Source/Libs/KLibc/tmath/daddsub.a | 5 --- Source/Libs/KLibc/tmath/ddiv.a | 4 --- Source/Libs/KLibc/tmath/dinc.a | 4 --- Source/Libs/KLibc/tmath/dmul.a | 4 --- Source/Libs/KLibc/tmath/dser.a | 7 ++--- Source/Libs/KLibc/tmath/dsqrt.a | 2 -- Source/Libs/KLibc/tmath/hyp.a | 5 --- Source/Libs/KLibc/tmath/log.a | 4 --- Source/Libs/KLibc/tmath/mdefs.a | 2 +- Source/Libs/KLibc/tmath/trig.a | 4 --- Source/Libs/KLibc/tmath/trnser.a | 2 -- 55 files changed, 56 insertions(+), 168 deletions(-) diff --git a/Source/Libs/KLibc/GNUmakefile b/Source/Libs/KLibc/GNUmakefile index 19610d5..e94ea1b 100644 --- a/Source/Libs/KLibc/GNUmakefile +++ b/Source/Libs/KLibc/GNUmakefile @@ -1,39 +1,39 @@ -RFILES1 = lib.c/cstuff.lib lib.a/main.lib -RFILE_F = fmath/cfloats.lib -RFILE_T = tmath/trans.lib -RFILES2 = imath/math.lib sys.a/syslib.lib +RFILES1 = lib.c/cstuff.l lib.a/main.l +RFILE_F = fmath/cfloats.l +RFILE_T = tmath/trans.l +RFILES2 = imath/math.l sys.a/syslib.l all: libc.a libct.a before-libc: - cd lib.c; $(MAKE) $(MAKEFLAGS) - cd lib.c; $(MAKE) $(MAKEFLAGS) dbg.l - cd lib.a; $(MAKE) $(MAKEFLAGS) - cd fmath; $(MAKE) $(MAKEFLAGS) - cd imath; $(MAKE) $(MAKEFLAGS) - cd sys.a; $(MAKE) $(MAKEFLAGS) -# cd sys.a; $(MAKE) $(MAKEFLAGS) cstart.r + cd lib.c; $(MAKE) -f GNUMakefile $(MAKEFLAGS) + cd lib.c; $(MAKE) -f GNUMakefile $(MAKEFLAGS) dbg.l + cd lib.a; $(MAKE) -f GNUMakefile $(MAKEFLAGS) + cd fmath; $(MAKE) -f GNUMakefile $(MAKEFLAGS) + cd imath; $(MAKE) -f GNUMakefile $(MAKEFLAGS) + cd sys.a; $(MAKE) -f GNUMakefile $(MAKEFLAGS) +# cd sys.a; $(MAKE) -f GNUMakefile $(MAKEFLAGS) cstart.r before-libct: - cd tmath; $(MAKE) $(MAKEFLAGS) + cd tmath; $(MAKE) -f GNUMakefile $(MAKEFLAGS) clean: - cd lib.c; make $(MAKEFLAGS) clean - cd lib.a; make $(MAKEFLAGS) clean - cd fmath; make $(MAKEFLAGS) clean - cd imath; make $(MAKEFLAGS) clean - cd tmath; make $(MAKEFLAGS) clean - cd sys.a; make $(MAKEFLAGS) clean - -del libc.a - -del libct.a + cd lib.c; make -f GNUMakefile $(MAKEFLAGS) clean + cd lib.a; make -f GNUMakefile $(MAKEFLAGS) clean + cd fmath; make -f GNUMakefile $(MAKEFLAGS) clean + cd imath; make -f GNUMakefile $(MAKEFLAGS) clean + cd tmath; make -f GNUMakefile $(MAKEFLAGS) clean + cd sys.a; make -f GNUMakefile $(MAKEFLAGS) clean + -rm libc.a + -rm libct.a libc.a: before-libc $(RFILES1) $(RFILE_F) $(RFILES2) - -del libc.a - lwar --merge libc.a $(RFILES1) $(RFILE_F) $(RFILES2) + -rm libc.a + lwar --create libc.a $(RFILES1) $(RFILE_F) $(RFILES2) libct.a: before-libct $(RFILES1) $(RFILE_T) $(RFILES2) before-libct - -del libct.a - lwar --merge libct.a $(RFILES1) $(RFILE_T) $(RFILES2) + -rm libct.a + lwar --create libct.a $(RFILES1) $(RFILE_T) $(RFILES2) install: clib.l clibt.l copy -rw=$(LIB) clib.l clibt.l diff --git a/Source/Libs/KLibc/cmoc.make b/Source/Libs/KLibc/cmoc.make index 9d78c9d..5354036 100644 --- a/Source/Libs/KLibc/cmoc.make +++ b/Source/Libs/KLibc/cmoc.make @@ -2,7 +2,7 @@ MAKEFLAGS+=-rR AFLAGS= --pragma=index0tonone,condundefzero,undefextern,dollarnotlocal,noforwardrefmax -CFLAGS= -I/dd/defs -O2 -nodefaultlibs --function-stack=0 --os9 +CFLAGS= -I../../../../Defs -I../defs -O2 -nodefaultlibs --function-stack=0 --os9 # default top level to current dir TOP?= $(dir $(realpath $(lastword $(MAKEFILE_LIST)))) @@ -14,6 +14,7 @@ O2U?= tr '\015' '\012' #our scripts DCCMOC = $(TOP)/dccmoc.sed RMA2LW = $(TOP)/rma2lw.sed +CC = $(CMOC) # implicit rules to compile with CMOC/lwasm %.s: %.a $(RMA2LW) diff --git a/Source/Libs/KLibc/dccmoc.sed b/Source/Libs/KLibc/dccmoc.sed index f749081..878ca09 100644 --- a/Source/Libs/KLibc/dccmoc.sed +++ b/Source/Libs/KLibc/dccmoc.sed @@ -1,2 +1,2 @@ -s:^#[\t ]*asm:asm { /* #asm */: -s:^#[\t ]*endasm:} /* #endasm */: +s:^#[[:space:]]*asm:asm { /* #asm */: +s:^#[[:space:]]*endasm:} /* #endasm */: diff --git a/Source/Libs/KLibc/imath/rpterr.a b/Source/Libs/KLibc/imath/rpterr.a index 0dca8d2..133d350 100644 --- a/Source/Libs/KLibc/imath/rpterr.a +++ b/Source/Libs/KLibc/imath/rpterr.a @@ -1,8 +1,4 @@ - ifp1 - use /dd/defs/os9defs.a - endc - psect rpterr_a,0,0,0,0,0 _rpterr: std errno,y diff --git a/Source/Libs/KLibc/lib.a/datmods.a b/Source/Libs/KLibc/lib.a/datmods.a index 974e194..5d727db 100644 --- a/Source/Libs/KLibc/lib.a/datmods.a +++ b/Source/Libs/KLibc/lib.a/datmods.a @@ -41,9 +41,6 @@ * In all cases, 'datptr' points to the lock byte. * User space starts at 'datptr' + 1 - ifp1 - use /dd/defs/os9defs.a - endc pag psect datmods_a,0,0,1,0,0 diff --git a/Source/Libs/KLibc/lib.a/devtyp.a b/Source/Libs/KLibc/lib.a/devtyp.a index 80fecca..b391646 100644 --- a/Source/Libs/KLibc/lib.a/devtyp.a +++ b/Source/Libs/KLibc/lib.a/devtyp.a @@ -3,10 +3,6 @@ psect devtyp_a,0,0,0,0,0 - ifp1 - use /dd/defs/os9defs.a - endc - isatty: ldd 2,s get pn pshs d bsr devtyp check it out diff --git a/Source/Libs/KLibc/lib.a/gs1.a b/Source/Libs/KLibc/lib.a/gs1.a index 0b667e1..080a4fd 100644 --- a/Source/Libs/KLibc/lib.a/gs1.a +++ b/Source/Libs/KLibc/lib.a/gs1.a @@ -3,10 +3,6 @@ * remember to declare the returns as long!!! * - ifp1 - use /dd/defs/os9defs.a - endc - psect gs1,0,0,1,0,0 _gs_size: diff --git a/Source/Libs/KLibc/lib.a/gs2.a b/Source/Libs/KLibc/lib.a/gs2.a index 2de04e7..5c523c1 100644 --- a/Source/Libs/KLibc/lib.a/gs2.a +++ b/Source/Libs/KLibc/lib.a/gs2.a @@ -2,10 +2,6 @@ * handler for _gs_rdy, _gs_opt, _gs_opt, _gs_devnm * - ifp1 - use /dd/defs/os9defs.a - endc - psect gs2,0,0,1,0,0 _gs_rdy: diff --git a/Source/Libs/KLibc/lib.a/sleep.a b/Source/Libs/KLibc/lib.a/sleep.a index efdb2e8..759f99c 100644 --- a/Source/Libs/KLibc/lib.a/sleep.a +++ b/Source/Libs/KLibc/lib.a/sleep.a @@ -11,9 +11,6 @@ f$tps set $25 *F$NMLink set $21 - ifp1 - use /dd/defs/os9defs.a - endc vsect _tps: rmb 2 diff --git a/Source/Libs/KLibc/lib.a/ss1.a b/Source/Libs/KLibc/lib.a/ss1.a index e5cdaa0..048ec10 100644 --- a/Source/Libs/KLibc/lib.a/ss1.a +++ b/Source/Libs/KLibc/lib.a/ss1.a @@ -3,10 +3,6 @@ * _ss_pfd, _ss_ssig, _ss_tiks * - ifp1 - use /dd/defs/os9defs.a - endc - psect ss1,0,0,1,0,0 _ss_rel: diff --git a/Source/Libs/KLibc/lib.a/ss2.a b/Source/Libs/KLibc/lib.a/ss2.a index 9b99f26..4b115a2 100644 --- a/Source/Libs/KLibc/lib.a/ss2.a +++ b/Source/Libs/KLibc/lib.a/ss2.a @@ -2,11 +2,6 @@ * handler for _ss_attr, _ss_size, _ss_lock * - ifp1 - use /dd/defs/os9defs.a - endc - - psect ss2,0,0,1,0,0 _ss_lock: pshs U diff --git a/Source/Libs/KLibc/lib.a/ss3.a b/Source/Libs/KLibc/lib.a/ss3.a index 1f04db1..3cb4939 100644 --- a/Source/Libs/KLibc/lib.a/ss3.a +++ b/Source/Libs/KLibc/lib.a/ss3.a @@ -2,11 +2,6 @@ * handler for _ss_wtrk * - ifp1 - use /dd/defs/os9defs.a - endc - - psect ss3,0,0,1,0,0 _ss_wtrk: pshs Y,U diff --git a/Source/Libs/KLibc/lib.c/GNUmakefile b/Source/Libs/KLibc/lib.c/GNUmakefile index 7c908d4..55bf059 100644 --- a/Source/Libs/KLibc/lib.c/GNUmakefile +++ b/Source/Libs/KLibc/lib.c/GNUmakefile @@ -1,5 +1,7 @@ OFILES = prof.o pwent.o getopt.o adump.o defdrive.o popen.o \ - asctime.o ctime.o localtime.o mktime.o omktime.o u2otime.o isleap.o timevars.o + asctime.o ctime.o localtime.o mktime.o isleap.o timevars.o + +MISSING = omktime.o u2otime.o DFILES = dbg.r getsp.r @@ -8,7 +10,7 @@ include ../cmoc.make cstuff.lib: $(OFILES) lwar -c $@ $^ -dbg.lib: $(DFILES) /dd/defs/dbg.h +dbg.lib: $(DFILES) ../defs/dbg.h lwar -c $@ $^ clean: diff --git a/Source/Libs/KLibc/lib.c/asctime.c b/Source/Libs/KLibc/lib.c/asctime.c index 863b2f4..deaf279 100644 --- a/Source/Libs/KLibc/lib.c/asctime.c +++ b/Source/Libs/KLibc/lib.c/asctime.c @@ -61,7 +61,7 @@ static char *months[] = { char * asctime(tmp) -struct tm *tmp; +const struct tm *tmp; { #ifdef ASMOPT #asm diff --git a/Source/Libs/KLibc/lib.c/ctime.c b/Source/Libs/KLibc/lib.c/ctime.c index 1a5e211..a47e80f 100644 --- a/Source/Libs/KLibc/lib.c/ctime.c +++ b/Source/Libs/KLibc/lib.c/ctime.c @@ -15,7 +15,7 @@ #else char * ctime(ticks) -time_t *ticks; +const time_t *ticks; { return (asctime(localtime(ticks))); } diff --git a/Source/Libs/KLibc/lib.c/defdrive.c b/Source/Libs/KLibc/lib.c/defdrive.c index 745db42..9e45f25 100644 --- a/Source/Libs/KLibc/lib.c/defdrive.c +++ b/Source/Libs/KLibc/lib.c/defdrive.c @@ -1,8 +1,9 @@ +#include #include static char d[12]; -getdrive() +static char *getdrive() { char *np; char c; @@ -10,7 +11,7 @@ getdrive() struct mod_config *mp; register char *p; - if ((mp = modlink("Init", 0x0c, 0)) != -1) + if ((mp = (struct mod_config *)modlink("Init", 0x0c, 0)) != -1) { np = (char *)mp + mp->m_sysdrive; p = d; @@ -18,7 +19,7 @@ getdrive() *p++ = c; *p++ = (c & 0x7f); *p = 0; - munlink(mp); + munlink((struct mod_com *)mp); return (d); } return (0); diff --git a/Source/Libs/KLibc/lib.c/popen.c b/Source/Libs/KLibc/lib.c/popen.c index 4d85940..ed3a3d6 100644 --- a/Source/Libs/KLibc/lib.c/popen.c +++ b/Source/Libs/KLibc/lib.c/popen.c @@ -1,4 +1,4 @@ -/*#define MAIN /* Only use when testing routines */ +/*#define MAIN */ /* Only use when testing routines */ #ifdef MAIN #define DEBUG @@ -33,7 +33,7 @@ static int _pid[PIPEMAX]; FILE *popen(command, type) - char *command, *type; + const char *command, *type; { register char *p = command; char *parameter; diff --git a/Source/Libs/KLibc/lib.c/prof.c b/Source/Libs/KLibc/lib.c/prof.c index 47cc47d..386e027 100644 --- a/Source/Libs/KLibc/lib.c/prof.c +++ b/Source/Libs/KLibc/lib.c/prof.c @@ -7,6 +7,7 @@ */ #include +#include #define MAXFUNC 63 /* maximum number of unique functions */ diff --git a/Source/Libs/KLibc/rma2lw.sed b/Source/Libs/KLibc/rma2lw.sed index 6000949..8bac73a 100644 --- a/Source/Libs/KLibc/rma2lw.sed +++ b/Source/Libs/KLibc/rma2lw.sed @@ -2,12 +2,12 @@ #s/^\([a-zA-Z_][a-zA-Z0-9$_]\+\):/\1 EXPORT\n\1/ s/^\([a-zA-Z_][a-zA-Z0-9$_]\+\):/_\1 EXPORT\n\1 EXPORT\n_\1\n\1/ # translate sections -s/^[\t ]\+psect.*/ SECTION code/ -s/^[\t ]\+vsect.*/ SECTION bss/ -s/^[\t ]\+csect[\t ]\+\(.*\)/ SECTION _constant\n org \1/ -s/^[\t ]\+csect/ SECTION _constant/ -s/^[\t ]\+endsect.*/ ENDSECT\n SECTION code/ -s/^[\t ]\+ends.*/ ENDSECT\n SECTION code/ +s/^\([[:space:]]*\)psect.*/ SECTION code/ +s/^\([[:space:]]*\)vsect.*/ SECTION bss/ +s/^\([[:space:]]*\)csect[[[:space:]]]\+\(.*\)/ SECTION _constant\n org \1/ +s/^\([[:space:]]*\)csect/ SECTION _constant/ +s/^\([[:space:]]*\)endsect.*/ ENDSECT\n SECTION code/ +s/^\([[:space:]]*\)ends.*/ ENDSECT\n SECTION code/ # convert fail / warn directives -s/^[\t ]\+fail\(.*\)/ ERROR\1/ -s/^[\t ]\+warn\(.*\)/ WARNING\1/ +s/^\([[:space:]]*\)fail\(.*\)/ ERROR\1/ +s/^\([[:space:]]*\)warn\(.*\)/ WARNING\1/ diff --git a/Source/Libs/KLibc/sys.a/abort.a b/Source/Libs/KLibc/sys.a/abort.a index cf9df7d..e474a8c 100644 --- a/Source/Libs/KLibc/sys.a/abort.a +++ b/Source/Libs/KLibc/sys.a/abort.a @@ -1,5 +1,3 @@ - use /dd/defs/os9defs.a - psect abort,0,0,1,0,0 abort: pshs d,x,y,u leax core,pcr diff --git a/Source/Libs/KLibc/sys.a/access.a b/Source/Libs/KLibc/sys.a/access.a index b01b8af..8d15e13 100644 --- a/Source/Libs/KLibc/sys.a/access.a +++ b/Source/Libs/KLibc/sys.a/access.a @@ -4,9 +4,6 @@ pmode equ $0b r/w for owner, r for others - ifp1 - use /dd/defs/os9defs.a - endc psect access_a,0,0,2,0,0 * access(name,mode) diff --git a/Source/Libs/KLibc/sys.a/brk.a b/Source/Libs/KLibc/sys.a/brk.a index 88148bc..2fbd511 100644 --- a/Source/Libs/KLibc/sys.a/brk.a +++ b/Source/Libs/KLibc/sys.a/brk.a @@ -1,7 +1,6 @@ * * Adjust memory allocation * - use /dd/defs/os9defs.a psect brk,0,0,6,0,0 * brk(pnt) set memory size to pnt, allocating or deallocating diff --git a/Source/Libs/KLibc/sys.a/cfinish.a b/Source/Libs/KLibc/sys.a/cfinish.a index 81f7b87..ca15268 100644 --- a/Source/Libs/KLibc/sys.a/cfinish.a +++ b/Source/Libs/KLibc/sys.a/cfinish.a @@ -1,5 +1,3 @@ - use /dd/defs/os9defs.a - psect cfinish_a,0,0,1,0,0 * normal exit - buffers flushed if there are any exit: lbsr _dumprof profile dump (if necessary) diff --git a/Source/Libs/KLibc/sys.a/chmod.a b/Source/Libs/KLibc/sys.a/chmod.a index 7826bf3..30303a9 100644 --- a/Source/Libs/KLibc/sys.a/chmod.a +++ b/Source/Libs/KLibc/sys.a/chmod.a @@ -1,6 +1,3 @@ - ifp1 - use /dd/defs/os9defs.a - endc *Carry equ %00000001 *Write. equ 2 write access *FD.Att equ 0 FD offset to attr diff --git a/Source/Libs/KLibc/sys.a/chown.a b/Source/Libs/KLibc/sys.a/chown.a index 019923e..e67e570 100644 --- a/Source/Libs/KLibc/sys.a/chown.a +++ b/Source/Libs/KLibc/sys.a/chown.a @@ -1,6 +1,3 @@ - ifp1 - use /dd/defs/os9defs.a - endc *Carry equ %00000001 *Write. equ 2 write access *FD.Att equ 0 FD offset to attr diff --git a/Source/Libs/KLibc/sys.a/create.a b/Source/Libs/KLibc/sys.a/create.a index 3f617ed..3d95799 100644 --- a/Source/Libs/KLibc/sys.a/create.a +++ b/Source/Libs/KLibc/sys.a/create.a @@ -1,9 +1,6 @@ * file creation calls * pmode equ $0b r/w for owner, r for others - ifp1 - use /dd/defs/os9defs.a - endc psect create_a,0,0,1,0,0 * creat(fname,mode) creat: ldx 2,s diff --git a/Source/Libs/KLibc/sys.a/css.a b/Source/Libs/KLibc/sys.a/css.a index 6f1b5e9..149006c 100644 --- a/Source/Libs/KLibc/sys.a/css.a +++ b/Source/Libs/KLibc/sys.a/css.a @@ -1,7 +1,3 @@ - ifp1 - use ..../defs/os9defs.a - endc - pushzero macro clr ,-s clear a byte on stack endm diff --git a/Source/Libs/KLibc/sys.a/cstart.a b/Source/Libs/KLibc/sys.a/cstart.a index b9821b9..52ea380 100644 --- a/Source/Libs/KLibc/sys.a/cstart.a +++ b/Source/Libs/KLibc/sys.a/cstart.a @@ -1,7 +1,3 @@ - ifp1 - use /dd/defs/os9defs.a - endc - * 09-04-85 CK add stack space for one file. * branch short on clrbss to ensure clear * 04-09-86 CK fix memory wrap bug in stkcheck diff --git a/Source/Libs/KLibc/sys.a/dir.a b/Source/Libs/KLibc/sys.a/dir.a index b016a91..59a5d75 100644 --- a/Source/Libs/KLibc/sys.a/dir.a +++ b/Source/Libs/KLibc/sys.a/dir.a @@ -2,7 +2,6 @@ * Directory change system calls * - use /dd/defs/os9defs.a psect dir_a,0,0,1,0,0 * chdir(dirname) diff --git a/Source/Libs/KLibc/sys.a/ibrk.a b/Source/Libs/KLibc/sys.a/ibrk.a index e544b36..6f99f56 100644 --- a/Source/Libs/KLibc/sys.a/ibrk.a +++ b/Source/Libs/KLibc/sys.a/ibrk.a @@ -1,7 +1,6 @@ * * Make pointers within initial memory allocation * - use /dd/defs/os9defs.a psect ibrk,0,0,6,0,0 * ibrk(size) get memory within data allocation diff --git a/Source/Libs/KLibc/sys.a/id.a b/Source/Libs/KLibc/sys.a/id.a index e9b7d03..7027176 100644 --- a/Source/Libs/KLibc/sys.a/id.a +++ b/Source/Libs/KLibc/sys.a/id.a @@ -1,9 +1,6 @@ * * Identity system calls * - ifp1 - use /dd/defs/os9defs.a - endc * * Equates for level one pointers (sorry!) D.Proc equ $4b diff --git a/Source/Libs/KLibc/sys.a/intercept.a b/Source/Libs/KLibc/sys.a/intercept.a index 2b54ef6..92c3ae9 100644 --- a/Source/Libs/KLibc/sys.a/intercept.a +++ b/Source/Libs/KLibc/sys.a/intercept.a @@ -5,7 +5,6 @@ * an 'entry name clash' error in the loader if an attempt is made * to use both. - use /dd/defs/os9defs.a psect intercept_a,0,0,1,0,0 vsect diff --git a/Source/Libs/KLibc/sys.a/lseek.a b/Source/Libs/KLibc/sys.a/lseek.a index 253815a..7aefd25 100644 --- a/Source/Libs/KLibc/sys.a/lseek.a +++ b/Source/Libs/KLibc/sys.a/lseek.a @@ -2,7 +2,6 @@ * File i/o system calls * - use /dd/defs/os9defs.a psect lseek_a,0,0,3,0,0 * lseek(fd,offset,type) diff --git a/Source/Libs/KLibc/sys.a/mem.a b/Source/Libs/KLibc/sys.a/mem.a index 0a4872f..fba4157 100644 --- a/Source/Libs/KLibc/sys.a/mem.a +++ b/Source/Libs/KLibc/sys.a/mem.a @@ -1,7 +1,6 @@ * * Variable common to brk() and sbrk() * - use /dd/defs/os9defs.a psect mem_a,0,0,6,0,0 vsect diff --git a/Source/Libs/KLibc/sys.a/misc.a b/Source/Libs/KLibc/sys.a/misc.a index 036ac67..db6ae4a 100644 --- a/Source/Libs/KLibc/sys.a/misc.a +++ b/Source/Libs/KLibc/sys.a/misc.a @@ -2,7 +2,6 @@ * Miscellaneous system calls * - use /dd/defs/os9defs.a psect misc_a,0,0,1,0,0 * lock(flag) diff --git a/Source/Libs/KLibc/sys.a/mod.a b/Source/Libs/KLibc/sys.a/mod.a index 5911e64..e85c203 100644 --- a/Source/Libs/KLibc/sys.a/mod.a +++ b/Source/Libs/KLibc/sys.a/mod.a @@ -3,12 +3,12 @@ * shiftla macro - rept \1 lsla - endr + lsla + lsla + lsla endm - use /dd/defs/os9defs.a psect mod_a,0,0,1,0,0 * modlink(modname,type,language) diff --git a/Source/Libs/KLibc/sys.a/open.a b/Source/Libs/KLibc/sys.a/open.a index f35d7a6..8d38f8b 100644 --- a/Source/Libs/KLibc/sys.a/open.a +++ b/Source/Libs/KLibc/sys.a/open.a @@ -4,9 +4,6 @@ pmode equ $0b r/w for owner, r for others - ifp1 - use /dd/defs/os9defs.a - endc psect open_a,0,0,2,0,0 * open(name,mode) diff --git a/Source/Libs/KLibc/sys.a/process.a b/Source/Libs/KLibc/sys.a/process.a index 9488dc8..aa0cffb 100644 --- a/Source/Libs/KLibc/sys.a/process.a +++ b/Source/Libs/KLibc/sys.a/process.a @@ -1,7 +1,6 @@ * * Process system calls * - use /dd/defs/os9defs.a psect process_a,0,0,2,0,0 * kill(pid,signal) diff --git a/Source/Libs/KLibc/sys.a/read.a b/Source/Libs/KLibc/sys.a/read.a index 07f88dc..2f8ff29 100644 --- a/Source/Libs/KLibc/sys.a/read.a +++ b/Source/Libs/KLibc/sys.a/read.a @@ -2,7 +2,6 @@ * File i/o system calls * - use /dd/defs/os9defs.a psect read_a,0,0,2,0,0 * read(fd,buf,count) diff --git a/Source/Libs/KLibc/sys.a/sbrk.a b/Source/Libs/KLibc/sys.a/sbrk.a index 017586f..48e54ad 100644 --- a/Source/Libs/KLibc/sys.a/sbrk.a +++ b/Source/Libs/KLibc/sys.a/sbrk.a @@ -1,7 +1,6 @@ * * Request memory from OS * - use /dd/defs/os9defs.a psect sbrk,0,0,6,0,0 * sbrk(size) get memory from system diff --git a/Source/Libs/KLibc/sys.a/signal.a b/Source/Libs/KLibc/sys.a/signal.a index 1fd9ae5..54def9c 100644 --- a/Source/Libs/KLibc/sys.a/signal.a +++ b/Source/Libs/KLibc/sys.a/signal.a @@ -1,4 +1,3 @@ - use /dd/defs/os9defs.a * signal system call * * The main objective here is to maintain a table of diff --git a/Source/Libs/KLibc/sys.a/stat.a b/Source/Libs/KLibc/sys.a/stat.a index f5cf1ae..b0eafdb 100644 --- a/Source/Libs/KLibc/sys.a/stat.a +++ b/Source/Libs/KLibc/sys.a/stat.a @@ -5,9 +5,6 @@ * 05-13-87 return char cnt on ss.ready * 01-09-85 added more calls - ifp1 - use /dd/defs/os9defs.a - endc psect stat_a,0,0,3,0,0 * getstat(code,path[,buffer][,count]) diff --git a/Source/Libs/KLibc/sys.a/time.a b/Source/Libs/KLibc/sys.a/time.a index 8dc8c15..619cd23 100644 --- a/Source/Libs/KLibc/sys.a/time.a +++ b/Source/Libs/KLibc/sys.a/time.a @@ -3,7 +3,6 @@ * - use /dd/defs/os9defs.a psect time_a,0,0,1,0,0 * setime(buffer) diff --git a/Source/Libs/KLibc/sys.a/write.a b/Source/Libs/KLibc/sys.a/write.a index 4663b33..9132fd2 100644 --- a/Source/Libs/KLibc/sys.a/write.a +++ b/Source/Libs/KLibc/sys.a/write.a @@ -2,7 +2,6 @@ * File i/o system calls * - use /dd/defs/os9defs.a psect write_a,0,0,3,0,0 * write(fd,buf,count) diff --git a/Source/Libs/KLibc/tmath/daddsub.a b/Source/Libs/KLibc/tmath/daddsub.a index 500c4f1..d3cccbd 100644 --- a/Source/Libs/KLibc/tmath/daddsub.a +++ b/Source/Libs/KLibc/tmath/daddsub.a @@ -1,10 +1,5 @@ psect daddsub_a,0,0,0,0,0 - ifp1 - use mdefs.a - endc - - * dneg negate double x points to * on return _dneg: ldb #7 double byte index diff --git a/Source/Libs/KLibc/tmath/ddiv.a b/Source/Libs/KLibc/tmath/ddiv.a index 07eab90..d21814a 100644 --- a/Source/Libs/KLibc/tmath/ddiv.a +++ b/Source/Libs/KLibc/tmath/ddiv.a @@ -1,9 +1,5 @@ psect ddiv_a,0,0,0,0,0 - ifp1 - use mdefs.a - endc - * divide double on stack by one X-> _ddiv: lbsr _aprep diff --git a/Source/Libs/KLibc/tmath/dinc.a b/Source/Libs/KLibc/tmath/dinc.a index 35fae2b..536cef0 100644 --- a/Source/Libs/KLibc/tmath/dinc.a +++ b/Source/Libs/KLibc/tmath/dinc.a @@ -1,9 +1,5 @@ psect dinc_a,0,0,0,0,0 - ifp1 - use mdefs.a - endc - * increment or decrement double pointed to by x _dinc: pshs x,y diff --git a/Source/Libs/KLibc/tmath/dmul.a b/Source/Libs/KLibc/tmath/dmul.a index 0ac4c9e..8fb9b7d 100644 --- a/Source/Libs/KLibc/tmath/dmul.a +++ b/Source/Libs/KLibc/tmath/dmul.a @@ -1,9 +1,5 @@ psect dmul_a,0,0,0,0,0 - ifp1 - use mdefs.a - endc - * multiply number on stack by one X-> _dmul: lbsr _aprep diff --git a/Source/Libs/KLibc/tmath/dser.a b/Source/Libs/KLibc/tmath/dser.a index 5c913d3..5166afb 100644 --- a/Source/Libs/KLibc/tmath/dser.a +++ b/Source/Libs/KLibc/tmath/dser.a @@ -1,12 +1,11 @@ psect dser_a,0,0,0,0,0 - ifp1 - use mdefs.a - endc + use mdefs.a + vsect _deg: rmb 1 rmb WBC*8 -_mthtop: rmb 0 +_mthtop: equ . endsect * aprep preps x,s for +,-,*,/ operators diff --git a/Source/Libs/KLibc/tmath/dsqrt.a b/Source/Libs/KLibc/tmath/dsqrt.a index 4aa2201..5bf596f 100644 --- a/Source/Libs/KLibc/tmath/dsqrt.a +++ b/Source/Libs/KLibc/tmath/dsqrt.a @@ -1,7 +1,5 @@ psect dsqrt_a,0,0,0,0,0 - use mdefs.a - trunc: lbsr _dprep bsr _dints lbra _mret diff --git a/Source/Libs/KLibc/tmath/hyp.a b/Source/Libs/KLibc/tmath/hyp.a index 741e4e3..6a112a8 100644 --- a/Source/Libs/KLibc/tmath/hyp.a +++ b/Source/Libs/KLibc/tmath/hyp.a @@ -1,10 +1,5 @@ psect hyp_a,0,0,0,0,0 - ifp1 - use mdefs.a - endc - - sinh: lbsr _dprep lbsr SINH diff --git a/Source/Libs/KLibc/tmath/log.a b/Source/Libs/KLibc/tmath/log.a index feee033..2b58504 100644 --- a/Source/Libs/KLibc/tmath/log.a +++ b/Source/Libs/KLibc/tmath/log.a @@ -1,9 +1,5 @@ psect log_a,0,0,0,0,0 - ifp1 - use mdefs.a - endc - pow: lbsr _bdprep lbsr YTOX diff --git a/Source/Libs/KLibc/tmath/mdefs.a b/Source/Libs/KLibc/tmath/mdefs.a index 0ead0e6..4ea4e16 100644 --- a/Source/Libs/KLibc/tmath/mdefs.a +++ b/Source/Libs/KLibc/tmath/mdefs.a @@ -26,7 +26,7 @@ EXM equ $7E EXPONENT UNUSED MASK * set up variable stack for transcendentals - csect + section _constant EABS rmb WBC ESHX rmb WBC EORD rmb WBC diff --git a/Source/Libs/KLibc/tmath/trig.a b/Source/Libs/KLibc/tmath/trig.a index 46f283f..2b8df14 100644 --- a/Source/Libs/KLibc/tmath/trig.a +++ b/Source/Libs/KLibc/tmath/trig.a @@ -1,9 +1,5 @@ psect dtrig_a,0,0,0,0,0 - ifp1 - use mdefs.a - endc - acos: lbsr _dprep lbsr ACOS diff --git a/Source/Libs/KLibc/tmath/trnser.a b/Source/Libs/KLibc/tmath/trnser.a index 8196189..03d2559 100644 --- a/Source/Libs/KLibc/tmath/trnser.a +++ b/Source/Libs/KLibc/tmath/trnser.a @@ -1,7 +1,5 @@ psect trnser_a,0,0,0,0,0 - use mdefs.a - * SHIFT TAKES CARE OF THE SHIDT FOR CORDIC * SHX=2**-ITER * X * y gones