From 3c7fcfe81aca123a8e1e9ab1955765c6f4244862 Mon Sep 17 00:00:00 2001 From: keie Date: Thu, 7 Feb 1985 17:43:43 +0000 Subject: [PATCH] Initial revision --- mach/m68k4/libem/LIST | 37 +++++++++++++++++++++++ mach/m68k4/libem/sys1.s | 58 +++++++++++++++++++++++++++++++++++ mach/m68k4/libem/sys2.s | 7 +++++ mach/pmds4/libsys/head_em.s | 60 +++++++++++++++++++++++++++++++++++++ 4 files changed, 162 insertions(+) create mode 100644 mach/m68k4/libem/LIST create mode 100644 mach/m68k4/libem/sys1.s create mode 100644 mach/m68k4/libem/sys2.s create mode 100644 mach/pmds4/libsys/head_em.s diff --git a/mach/m68k4/libem/LIST b/mach/m68k4/libem/LIST new file mode 100644 index 000000000..badaa4371 --- /dev/null +++ b/mach/m68k4/libem/LIST @@ -0,0 +1,37 @@ +tail_em.rt +ari.s +ara.s +cvf.s +cii.s +cmi.s +cmp.s +cmu.s +csa.s +csb.s +cuu.s +exg.s +inn.s +lfr.s +los.s +rck.s +ret.s +set.s +sts.s +nop.s +mon.s +dvi.s +mli.s +mlu.s +shp.s +sig.s +cms.s +aciaio.s +fat.s +trp.s +dia.s +printf.s +dvu.s +trp.s +sav.s +dia.s +printf.s diff --git a/mach/m68k4/libem/sys1.s b/mach/m68k4/libem/sys1.s new file mode 100644 index 000000000..99cd63043 --- /dev/null +++ b/mach/m68k4/libem/sys1.s @@ -0,0 +1,58 @@ +.extern _errno +.data +_errno: +.extern _lseek +.short 0 +.text +_lseek: +link a6,#-0 +.data +_13: +.short 29561 +.short 29489 +.short 11875 +.short 0 +.text +move.l #_13,.filn +move.w #8,.lino +move.w #0,-(sp) +move.w #0,-(sp) +move.l (sp)+,d0 +unlk a6 +rts +.extern _close +_close: +link a6,#-0 +move.l #_13,.filn +move.w #12,.lino +move.w #0,-(sp) +move.w (sp)+,d0 +unlk a6 +rts +.extern _ioctl +_ioctl: +link a6,#-0 +move.l #_13,.filn +move.w #18,.lino +move.w #0,-(sp) +move.w (sp)+,d0 +unlk a6 +rts +.extern _read +_read: +link a6,#-0 +move.l #_13,.filn +move.w #24,.lino +move.w #-1,-(sp) +move.w (sp)+,d0 +unlk a6 +rts +.extern _open +_open: +link a6,#-0 +move.l #_13,.filn +move.w #30,.lino +move.w #-1,-(sp) +move.w (sp)+,d0 +unlk a6 +rts diff --git a/mach/m68k4/libem/sys2.s b/mach/m68k4/libem/sys2.s new file mode 100644 index 000000000..fce0ee6e0 --- /dev/null +++ b/mach/m68k4/libem/sys2.s @@ -0,0 +1,7 @@ +.extern _exit +! Fake system call for 68000 running MACSBUG + +.text + +_exit: + jmp 0x0200f6 diff --git a/mach/pmds4/libsys/head_em.s b/mach/pmds4/libsys/head_em.s new file mode 100644 index 000000000..f44498c8e --- /dev/null +++ b/mach/pmds4/libsys/head_em.s @@ -0,0 +1,60 @@ +.define CERASE,CKILL,CSTOP,CSTART +.define .lino,.filn + +.define F_DUM,EXIT + +.define begtext,begdata,begbss +.define EARRAY,ERANGE,ESET,EIDIVZ,EHEAP,EILLINS,ECASE +.define hol0,.reghp,.limhp,.trpim,.trppc +.define LINO_AD,FILN_AD + + +CERASE = 010 +CKILL = 030 +CSTART = 021 +CSTOP = 023 +F_DUM = 0 + + +LINO_AD = 0 +FILN_AD = 4 + +EARRAY = 0 +ERANGE = 1 +ESET = 2 +EIDIVZ = 6 +EHEAP = 17 +EILLINS = 18 +ECASE = 20 + + .text +begtext: + pea endbss + jsr _brk + add.l #4,sp + jsr _m_a_i_n + add #012,sp +EXIT: + + jsr __exit + + + .data +begdata: +hol0: +.lino: + .long 0 ! lino +.filn: + .long 0 ! filn +.reghp: + .long endbss +.limhp: + .long endbss +.trppc: + .long 0 +.trpim: + .long 0 ! was short + + + .bss +begbss: -- 2.34.1