diff --git a/mach/pdp/libem/RT.s b/mach/pdp/libem/RT.s index ef9cb78b5..d9cd033e2 100644 --- a/mach/pdp/libem/RT.s +++ b/mach/pdp/libem/RT.s @@ -1,7 +1,8 @@ -/ $Header$ - .globl PRr2,PR2r2,PR4r2,PR6r2 - .globl PRr2r4,PR2r2r4,PR4r2r4,PR6r2r4 - .globl RT,RTr2,RTr2r4 +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define PRr2,PR2r2,PR4r2,PR6r2 +.define PRr2r4,PR2r2r4,PR4r2r4,PR6r2r4 +.define RT,RTr2,RTr2r4 +! $Header$ PR6r2: mov $6,r0;br PRr2 PR4r2: mov $4,r0;br PRr2 diff --git a/mach/pdp/libem/aar.s b/mach/pdp/libem/aar.s index bcc130fed..599ad055f 100644 --- a/mach/pdp/libem/aar.s +++ b/mach/pdp/libem/aar.s @@ -1,10 +1,11 @@ -/ $Header$ -.text -.globl aar~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define aar~ +! $Header$ -/r0 : descriptor address -/r1 : element number -/base address is on stack +!r0 : descriptor address +!r1 : element number +!base address is on stack aar~: sub (r0),r1 mul 04(r0),r1 diff --git a/mach/pdp/libem/adf.s b/mach/pdp/libem/adf.s index 2c4c7aaf4..421666c19 100644 --- a/mach/pdp/libem/adf.s +++ b/mach/pdp/libem/adf.s @@ -1,9 +1,10 @@ -/ $Header$ -.text -.globl adf~ -.globl setfloat~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define adf~ +.extern setfloat~ +! $Header$ -/size in r0 +!size in r0 adf~: mov (sp)+,r1 jsr pc,setfloat~ diff --git a/mach/pdp/libem/adi.s b/mach/pdp/libem/adi.s index b2d4dd62b..dde47f990 100644 --- a/mach/pdp/libem/adi.s +++ b/mach/pdp/libem/adi.s @@ -1,9 +1,10 @@ -/ $Header$ -.text -.globl adi~ -.globl unknown~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define adi~ +.extern unknown~ +! $Header$ -/size in r0 +!size in r0 adi~: mov (sp)+,r1 cmp r0,$04 diff --git a/mach/pdp/libem/and.s b/mach/pdp/libem/and.s index a9c34951e..b31f0db0e 100644 --- a/mach/pdp/libem/and.s +++ b/mach/pdp/libem/and.s @@ -1,8 +1,9 @@ -/ $Header$ -.text -.globl and~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define and~ +! $Header$ -/ size in r0 +! size in r0 and~: mov (sp)+,r3 mov sp,r1 diff --git a/mach/pdp/libem/cff.s b/mach/pdp/libem/cff.s index afdc3688f..9fe105069 100644 --- a/mach/pdp/libem/cff.s +++ b/mach/pdp/libem/cff.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl cff~ -.globl setfloat~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define cff~ +.extern setfloat~ +! $Header$ cff~: mov (sp)+,r1 diff --git a/mach/pdp/libem/cfi.s b/mach/pdp/libem/cfi.s index 72ebe6e13..078ccbb18 100644 --- a/mach/pdp/libem/cfi.s +++ b/mach/pdp/libem/cfi.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl cfi~ -.globl setfloat~,setint~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define cfi~ +.extern setfloat~,setint~ +! $Header$ cfi~: mov (sp)+,r1 diff --git a/mach/pdp/libem/cif.s b/mach/pdp/libem/cif.s index d5272747d..62149bec4 100644 --- a/mach/pdp/libem/cif.s +++ b/mach/pdp/libem/cif.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl cif~,cuf~ -.globl setint~,setfloat~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define cif~,cuf~ +.extern setint~,setfloat~ +! $Header$ cif~: mov (sp)+,r1 diff --git a/mach/pdp/libem/cii.s b/mach/pdp/libem/cii.s index fe1e6c9ec..0b23a5016 100644 --- a/mach/pdp/libem/cii.s +++ b/mach/pdp/libem/cii.s @@ -1,9 +1,10 @@ -/ $Header$ -.text -.globl cii~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define cii~ +! $Header$ -/convert int to int -/ 1 byte -> ? : sign extension +!convert int to int +! 1 byte -> ? : sign extension cii~: mov (sp)+,r3 mov (sp)+,r0 @@ -18,5 +19,5 @@ cii~: tst (sp) 4: sxt -(sp) sob r0,4b -1: sub r0,sp / if out of sob loop r0==0 +1: sub r0,sp ! if out of sob loop r0==0 3: jmp (r3) diff --git a/mach/pdp/libem/ciu.s b/mach/pdp/libem/ciu.s index bf1ad2dd5..c3243d480 100644 --- a/mach/pdp/libem/ciu.s +++ b/mach/pdp/libem/ciu.s @@ -1,6 +1,8 @@ -/ $Header$ -.text -.globl cuu~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define cuu~ +! $Header$ + cuu~: mov (sp)+,r1 mov (sp)+,r0 @@ -9,5 +11,5 @@ cuu~: asr r0 2: clr -(sp) sob r0,2b -1: sub r0,sp / if out of sob loop r0==0 +1: sub r0,sp ! if out of sob loop r0==0 jmp (r1) diff --git a/mach/pdp/libem/cmf.s b/mach/pdp/libem/cmf.s index 733b1200b..c601b7bc6 100644 --- a/mach/pdp/libem/cmf.s +++ b/mach/pdp/libem/cmf.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl cmf~ -.globl setfloat~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define cmf~ +.extern setfloat~ +! $Header$ cmf~: jsr pc,setfloat~ diff --git a/mach/pdp/libem/cmi.s b/mach/pdp/libem/cmi.s index 792a12b8a..8a431225b 100644 --- a/mach/pdp/libem/cmi.s +++ b/mach/pdp/libem/cmi.s @@ -1,9 +1,10 @@ -/ $Header$ -.text -.globl cmi~ -.globl cmi4~,unknown~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define cmi~ +.extern cmi4~,unknown~ +! $Header$ -/ Size in r0 +! Size in r0 cmi~: cmp r0,$02 bne 1f diff --git a/mach/pdp/libem/cmi4.s b/mach/pdp/libem/cmi4.s index ffc0b76aa..4e088391c 100644 --- a/mach/pdp/libem/cmi4.s +++ b/mach/pdp/libem/cmi4.s @@ -1,6 +1,7 @@ -/ $Header$ -.text -.globl cmi4~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define cmi4~ +! $Header$ cmi4~: mov (sp)+,r1 @@ -17,5 +18,5 @@ cmi4~: 1: dec r0 3: - add $10,sp + add $010,sp jmp (r1) diff --git a/mach/pdp/libem/cms.s b/mach/pdp/libem/cms.s index 964538baf..c7815ebce 100644 --- a/mach/pdp/libem/cms.s +++ b/mach/pdp/libem/cms.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl cms~ -.globl save~,retu~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define cms~ +.extern save~,retu~ +! $Header$ cms~: jsr pc,save~ diff --git a/mach/pdp/libem/cmu.s b/mach/pdp/libem/cmu.s index 8c37c8548..549dfa978 100644 --- a/mach/pdp/libem/cmu.s +++ b/mach/pdp/libem/cmu.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl cmu~ -.globl unknown~,cmu4~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define cmu~ +.extern unknown~,cmu4~ +! $Header$ cmu~: cmp r0,$02 diff --git a/mach/pdp/libem/cmu4.s b/mach/pdp/libem/cmu4.s index 6525354c0..0581d7bbf 100644 --- a/mach/pdp/libem/cmu4.s +++ b/mach/pdp/libem/cmu4.s @@ -1,6 +1,7 @@ -/ $Header$ - .text - .globl cmu4~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define cmu4~ +! $Header$ cmu4~: mov (sp)+,r1 clr r0 @@ -16,5 +17,5 @@ cmu4~: 1: dec r0 3: - add $10,sp + add $010,sp jmp (r1) diff --git a/mach/pdp/libem/csa.s b/mach/pdp/libem/csa.s index 0e5f97518..5edb4fe51 100644 --- a/mach/pdp/libem/csa.s +++ b/mach/pdp/libem/csa.s @@ -1,9 +1,10 @@ -/ $Header$ -.text -.globl csa~ -.globl fat~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define csa~ +.extern fat~ +! $Header$ -ECASE = 20. +ECASE = 024 csa~: sub 02(r0),r1 diff --git a/mach/pdp/libem/csb.s b/mach/pdp/libem/csb.s index f1505415f..7257e764f 100644 --- a/mach/pdp/libem/csb.s +++ b/mach/pdp/libem/csb.s @@ -1,9 +1,10 @@ -/ $Header$ -.text -.globl csb~ -.globl fat~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define csb~ +.extern fat~ +! $Header$ -ECASE = 20. +ECASE = 024 csb~: mov (r0)+,-(sp) diff --git a/mach/pdp/libem/dup.s b/mach/pdp/libem/dup.s index 9d5863eb5..136cafc9e 100644 --- a/mach/pdp/libem/dup.s +++ b/mach/pdp/libem/dup.s @@ -1,6 +1,7 @@ -/ $Header$ -.text -.globl dup~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define dup~ +! $Header$ dup~: mov (sp)+,r3 diff --git a/mach/pdp/libem/dvf.s b/mach/pdp/libem/dvf.s index 329479696..6755739fe 100644 --- a/mach/pdp/libem/dvf.s +++ b/mach/pdp/libem/dvf.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl dvf~ -.globl setfloat~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define dvf~ +.extern setfloat~ +! $Header$ dvf~: mov (sp)+,r1 diff --git a/mach/pdp/libem/dvi.s b/mach/pdp/libem/dvi.s index 0eb13ce78..38d4aae2e 100644 --- a/mach/pdp/libem/dvi.s +++ b/mach/pdp/libem/dvi.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl dvi~ -.globl unknown~,dvi4~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define dvi~ +.extern unknown~,dvi4~ +! $Header$ dvi~: mov (sp)+,r3 diff --git a/mach/pdp/libem/dvi4.s b/mach/pdp/libem/dvi4.s index d47af6950..de2018c16 100644 --- a/mach/pdp/libem/dvi4.s +++ b/mach/pdp/libem/dvi4.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl dvi4~ -.globl save~,retu~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define dvi4~ +.extern save~,retu~ +! $Header$ dvi4~: jsr pc,save~ diff --git a/mach/pdp/libem/dvu.s b/mach/pdp/libem/dvu.s index e27d99fb5..605b63897 100644 --- a/mach/pdp/libem/dvu.s +++ b/mach/pdp/libem/dvu.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl dvu~ -.globl unknown~,dvu4~,dvu2~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define dvu~ +.extern unknown~,dvu4~,dvu2~ +! $Header$ dvu~: mov (sp)+,r3 diff --git a/mach/pdp/libem/dvu2.s b/mach/pdp/libem/dvu2.s index 841edbe6b..31184a618 100644 --- a/mach/pdp/libem/dvu2.s +++ b/mach/pdp/libem/dvu2.s @@ -1,6 +1,7 @@ -/ $Header$ -.text -.globl dvu2~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define dvu2~ +! $Header$ dvu2~: clr r0 mov 04(sp),r1 diff --git a/mach/pdp/libem/dvu4.s b/mach/pdp/libem/dvu4.s index d2daa4fdc..cb40130b1 100644 --- a/mach/pdp/libem/dvu4.s +++ b/mach/pdp/libem/dvu4.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl dvu4~ -.globl save~,retu~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define dvu4~ +.extern save~,retu~ +! $Header$ dvu4~: jsr pc,save~ diff --git a/mach/pdp/libem/eret.s b/mach/pdp/libem/eret.s index bf942fec7..dd821a32d 100644 --- a/mach/pdp/libem/eret.s +++ b/mach/pdp/libem/eret.s @@ -1,5 +1,6 @@ -/ $Header$ - .globl eret +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define eret +! $Header$ eret: mov r5,sp diff --git a/mach/pdp/libem/exg.s b/mach/pdp/libem/exg.s index 9a1985634..0ad99b1f0 100644 --- a/mach/pdp/libem/exg.s +++ b/mach/pdp/libem/exg.s @@ -1,6 +1,7 @@ -/ $Header$ - .text - .globl exg~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define exg~ +! $Header$ + exg~: jsr pc,save~ mov sp,r4 sub r0,sp diff --git a/mach/pdp/libem/fef.s b/mach/pdp/libem/fef.s index 30a4225ca..088ebd074 100644 --- a/mach/pdp/libem/fef.s +++ b/mach/pdp/libem/fef.s @@ -1,7 +1,7 @@ -/ $Header$ -.text -.globl fef~ -.globl setfloat~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define fef~ +.extern setfloat~ +! $Header$ fef~: mov (sp)+,r1 diff --git a/mach/pdp/libem/fif.s b/mach/pdp/libem/fif.s index 2fa507880..e342141ad 100644 --- a/mach/pdp/libem/fif.s +++ b/mach/pdp/libem/fif.s @@ -1,7 +1,7 @@ -/ $Header$ -.text -.globl fif~ -.globl setfloat~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define fif~ +.extern setfloat~ +! $Header$ fif~: mov (sp)+,r1 diff --git a/mach/pdp/libem/gto.s b/mach/pdp/libem/gto.s index 61e4bbff1..b4f2a8627 100644 --- a/mach/pdp/libem/gto.s +++ b/mach/pdp/libem/gto.s @@ -1,19 +1,20 @@ -/ $Header$ -.text -.globl gto~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define gto~ +! $Header$ gto~: mov (sp)+,r4 mov 4(r4),r5 mov 2(r4),sp mov (r4),pc -/ -/ mov (sp)+,r3 -/1: cmp 4(r3),r5 -/ jeq 2f -/ mov 2(r5),r4 -/ mov 4(r5),r2 -/ mov (r5),r5 -/ br 1b -/2: mov 2(r3),sp -/ jmp *(r3) +! +! mov (sp)+,r3 +!1: cmp 4(r3),r5 +! jeq 2f +! mov 2(r5),r4 +! mov 4(r5),r2 +! mov (r5),r5 +! br 1b +!2: mov 2(r3),sp +! jmp *(r3) diff --git a/mach/pdp/libem/head_em.s b/mach/pdp/libem/head_em.s index 6bc948f1a..b3504e85e 100644 --- a/mach/pdp/libem/head_em.s +++ b/mach/pdp/libem/head_em.s @@ -1,36 +1,34 @@ -/ $Header$ - .globl LINO_AD,FILN_AD - .globl ERANGE,ESET,EHEAP,EILLINS,ECASE - .globl hol0,trppc~,trpim~,reghp~ +# +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define LINO_AD,FILN_AD +.define ERANGE,ESET,EHEAP,EILLINS,ECASE +.define hol0,trppc~,trpim~,reghp~ +! $Header$ -rti = 2 -stst = 170300 ^ tst +#define float 1 +#define hardfp 1 -.float = 1 / this should be parameterized somehow -.hardfp = 1 / only relevant if .float on +LINO_AD = 0 +FILN_AD = 4 -LINO_AD = 0. -FILN_AD = 4. +ERANGE = 1 +ESET = 2 +EFOVFL = 4 +EFUNFL = 5 +EFDIVZ = 7 +EFUND = 011 +ECONV = 012 +EHEAP = 021 +EILLINS = 022 +ECASE = 024 -ERANGE = 1. -ESET = 2. -EFOVFL = 4. -EFUNFL = 5. -EFDIVZ = 7. -EFUND = 9. -ECONV = 10. -EHEAP = 17. -EILLINS = 18. -ECASE = 20. - -.if .float -/ .globl fltused; fltused: -.if 1 - .hardfp -/ sys 48.;4.;fptrap / if not commented it will appear as undefined -.endif - sys 48.;8.;sig8 - ldfps $7600 -.endif +#ifdef float +#ifndef hardfp +! sys 060;.data2 4,fptrap / if not commented it will appear as undefined +#endif + sys 060;.data2 010,sig8 + ldfps $07600 +#endif mov 2(sp),r0 clr -2(r0) mov sp,r0 @@ -47,30 +45,30 @@ ECASE = 20. 1: mov r0,4(sp) jsr pc,_m_a_i_n -/ next two lines for as long as tail needs printf -/ mov r0,-(sp) -/ jsr pc,*$_exit - sys 1. +! next two lines for as long as tail needs printf +! mov r0,-(sp) +! jsr pc,*$_exit + sys 1 - .data -hol0: 0;0 / line no - 0;0 / file -trppc~: 0 -trpim~: 0 -reghp~: _end + .sect .data +hol0: .data2 0,0 ! line no + .data2 0,0 ! file +trppc~: .data2 0 +trpim~: .data2 0 +reghp~: .data2 _end - .text + .sect .text sig8: -.if .float +#ifdef float mov r0,-(sp) stst r0 mov 1f(r0),-(sp) jsr pc,trp~ - sys 48.;8.;sig8 + sys 060;.data2 010,sig8 mov (sp)+,r0 rti - .data -1: EILLINS; EILLINS; EFDIVZ; ECONV; EFOVFL; EFUNFL; EFUND; EILLINS - .text -.endif + .sect .data +1: .data2 EILLINS, EILLINS, EFDIVZ, ECONV, EFOVFL, EFUNFL, EFUND, EILLINS + .sect .text +#endif diff --git a/mach/pdp/libem/hlt.s b/mach/pdp/libem/hlt.s index a6bd5be45..0fae864f9 100644 --- a/mach/pdp/libem/hlt.s +++ b/mach/pdp/libem/hlt.s @@ -1,6 +1,7 @@ -/ $Header$ -.text -.globl hlt~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define hlt~ +! $Header$ exit = 1 @@ -8,4 +9,4 @@ hlt~: mov (sp)+,r0 bne 1f sys exit -1: 4 +1: .data2 4 diff --git a/mach/pdp/libem/iaar.s b/mach/pdp/libem/iaar.s index 302dd6328..50ebf751f 100644 --- a/mach/pdp/libem/iaar.s +++ b/mach/pdp/libem/iaar.s @@ -1,9 +1,10 @@ -/ $Header$ -.text -.globl iaar~ -.globl aar~,trp~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define iaar~ +.extern aar~,trp~ +! $Header$ -EILLINS = 18. +EILLINS = 022 iaar~: mov (sp)+,r0 diff --git a/mach/pdp/libem/ilar.s b/mach/pdp/libem/ilar.s index 936fb3fef..363725275 100644 --- a/mach/pdp/libem/ilar.s +++ b/mach/pdp/libem/ilar.s @@ -1,9 +1,10 @@ -/ $Header$ -.text -.globl ilar~ -.globl lar~,trp~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define ilar~ +.extern lar~,trp~ +! $Header$ -EILLINS = 18. +EILLINS = 022 ilar~: mov (sp)+,r0 diff --git a/mach/pdp/libem/inn.s b/mach/pdp/libem/inn.s index 5d3266130..c2903b576 100644 --- a/mach/pdp/libem/inn.s +++ b/mach/pdp/libem/inn.s @@ -1,6 +1,7 @@ -/ $Header$ -.text -.globl inn~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define inn~ +! $Header$ inn~: mov r0,-(sp) @@ -18,5 +19,5 @@ inn~: add (sp)+,sp tst (sp)+ jmp (r1) -.data -bits: .byte 1,2,4,10,20,40,100,200 +.sect .data +bits: .data1 1,2,4,010,020,040,0100,0200 diff --git a/mach/pdp/libem/isar.s b/mach/pdp/libem/isar.s index f1a505a05..0f720af2c 100644 --- a/mach/pdp/libem/isar.s +++ b/mach/pdp/libem/isar.s @@ -1,9 +1,10 @@ -/ $Header$ -.text -.globl isar~ -.globl sar~,trp~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define isar~ +.extern sar~,trp~ +! $Header$ -EILLINS = 18. +EILLINS = 022 isar~: mov (sp)+,r0 diff --git a/mach/pdp/libem/lar.s b/mach/pdp/libem/lar.s index ce4f92e9e..23b1a0c2d 100644 --- a/mach/pdp/libem/lar.s +++ b/mach/pdp/libem/lar.s @@ -1,6 +1,7 @@ -/ $Header$ -.text -.globl lar~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define lar~ +! $Header$ lar~: mov (sp)+,r3 diff --git a/mach/pdp/libem/los2.s b/mach/pdp/libem/los2.s index 1caccea2b..a47c60887 100644 --- a/mach/pdp/libem/los2.s +++ b/mach/pdp/libem/los2.s @@ -1,6 +1,7 @@ -/ $Header$ -.text -.globl los2~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define los2~ +! $Header$ los2~: mov (sp)+,r3 diff --git a/mach/pdp/libem/mlf.s b/mach/pdp/libem/mlf.s index b4f274001..2e34f94fc 100644 --- a/mach/pdp/libem/mlf.s +++ b/mach/pdp/libem/mlf.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl mlf~ -.globl setfloat~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define mlf~ +.extern setfloat~ +! $Header$ mlf~: mov (sp)+,r1 diff --git a/mach/pdp/libem/mli.s b/mach/pdp/libem/mli.s index d9826fcbb..24702f303 100644 --- a/mach/pdp/libem/mli.s +++ b/mach/pdp/libem/mli.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl mli~ -.globl unknown~,mli4~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define mli~ +.extern unknown~,mli4~ +! $Header$ mli~: cmp r0,$04 diff --git a/mach/pdp/libem/mli4.s b/mach/pdp/libem/mli4.s index 1051223c3..be85ddd06 100644 --- a/mach/pdp/libem/mli4.s +++ b/mach/pdp/libem/mli4.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl mli4~ -.globl save~,retu~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define mli4~ +.extern save~,retu~ +! $Header$ mli4~: jsr pc,save~ diff --git a/mach/pdp/libem/mlu.s b/mach/pdp/libem/mlu.s index 9bd1328b1..dc4c18a95 100644 --- a/mach/pdp/libem/mlu.s +++ b/mach/pdp/libem/mlu.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl mlu~ -.globl unknown~,mlu4~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define mlu~ +.extern unknown~,mlu4~ +! $Header$ mlu~: cmp r0,$04 diff --git a/mach/pdp/libem/mlu4.s b/mach/pdp/libem/mlu4.s index 798bbaa63..895657e5e 100644 --- a/mach/pdp/libem/mlu4.s +++ b/mach/pdp/libem/mlu4.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl mlu4~ -.globl save~,retu~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define mlu4~ +.extern save~,retu~ +! $Header$ mlu4~: jsr pc,save~ diff --git a/mach/pdp/libem/mon.s b/mach/pdp/libem/mon.s index a3d8fd8e5..f5d110295 100644 --- a/mach/pdp/libem/mon.s +++ b/mach/pdp/libem/mon.s @@ -1,25 +1,26 @@ -/ $Header$ -.text -.globl mon~ -.globl sigtrp~,save~,retu~,save1~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +! $Header$ +.sect .text +.define mon~ +.extern sigtrp~,save~,retu~,save1~ indir = 0 fork = 2 -getpid = 20. -sigtrp = 48. -EBADMON = 25. +getpid = 024 +sigtrp = 060 +EBADMON = 031 HBMASK = 0177400 REG01M = 030 REG1M = 020 ERRMASK = 040 -/ Associated with every monitor call is a descriptor. -/ The low order three bits describe how values are returned, -/ the next two bits specify if arguments are expected in -/ r0 and/or r1, the next bit is not used, and the next -/ three bits specify the number of arguments disregarding -/ arguments in registers. +! Associated with every monitor call is a descriptor. +! The low order three bits describe how values are returned, +! the next two bits specify if arguments are expected in +! r0 and/or r1, the next bit is not used, and the next +! three bits specify the number of arguments disregarding +! arguments in registers. mon~: cmp 02(sp),$sigtrp @@ -37,7 +38,7 @@ mon~: bne 2f jbr fork~ 2: bic $HBMASK,r2 - bis $sys,r2 + bis $0104400,r2 ! sys = 0104400 mov r2,9f bit $REG01M,r3 beq 1f @@ -50,7 +51,7 @@ mon~: mov $[9f+2],r2 1: mov (sp)+,(r2)+ sob r3,1b -2: sys indir ; 9f +2: sys indir ; .data2 9f bcs 2f clr r3 4: asr r4 @@ -79,68 +80,68 @@ err: jsr pc,trp~ tst (sp)+ jmp retu~ -.data -.even -9: .=.+12. -args: ERRMASK / 0 : error - 010 / 1 : exit(st); --- - 07 / 2 : fork(); e10 - 0215 / 3 : read(addr,nb,fild); e-0 - 0215 / 4 : write(addr,nb,fild); e-0 - 0205 / 5 : open(str,flag); e-0 - 014 / 6 : close(fild); e-- - 07 / 7 : wait(); e10 - 0205 / 8 : creat(str,mode); e-0 - 0204 / 9 : link(str1,str2); e-- - 0104 /10 : unlink(str); e-- - ERRMASK /11 : error - 0104 /12 : chdir(str); e-- - 03 /13 : time(); -10 - 0304 /14 : mknod(str,mode,addr); e-- - 0204 /15 : chmod(str,mode); e-- - 0304 /16 : chown(str,owner,grp); e-- - ERRMASK /17 : error - 0204 /18 : stat(str,buf); e-- - 0217 /19 : lseek(high,low,fild); e10 - 01 /20 : getpid(); --0 - 0304 /21 : mount(str1,str2,fl); e-- - 0104 /22 : umount(str); e-- - 014 /23 : setuid(uid); e-- - 03 /24 : getuid(); -01 - 024 /25 : stime(high,low); e-- - 0315 /26 : ptrace(pid,addr,req,d); e-0 - 011 /27 : alarm(sec); --0 - 0114 /28 : fstat(buf,fild); e-- - 0 /29 : pause(); --- - 0204 /30 : utime(str,timep); e-- - ERRMASK /31 : error - ERRMASK /32 : error - 0204 /33 : access(str,mode): e-- - 010 /34 : nice(incr); --- - 0100 /35 : ftime(bufp); --- - 0 /36 : sync(); --- - 0114 /37 : kill(sig,pid); e-- - ERRMASK /38 : error - ERRMASK /39 : error - ERRMASK /40 : error - 025 /41 : dup(fild,newfild); e-0 - 07 /42 : pipe(); e10 - 0100 /43 : times(buf); --- - 0400 /44 : profil(buff,siz,off,sc); --- - ERRMASK /45 : error - 014 /46 : setgid(gid); e-- - 03 /47 : getgid(); -01 - 0 /48 : sigtrp(trap,sig); e-0; SPECIAL TREATMENT - ERRMASK /49 : error - ERRMASK /50 : error - 0104 /51 : acct(file); e-- - 0304 /52 : phys(seg,siz,phaddr); e-- - 0104 /53 : lock(flag); e-- - 0304 /54 : ioctl(fild,req,argp); e-- - ERRMASK /55 : error - 0204 /56 : mpxcall(cmd,vec); e-- - ERRMASK /57 : error - ERRMASK /58 : error - 0304 /59 : exece(name,argv,envp); e-- - 0104 /60 : umask(complmode); e-- - 0104 /61 : chroot(str); e-- +.sect .data +.align 1 +9: .space 12 +args: .data2 ERRMASK ! 0 : error + .data2 010 ! 1 : exit(st); --- + .data2 07 ! 2 : fork(); e10 + .data2 0215 ! 3 : read(addr,nb,fild); e-0 + .data2 0215 ! 4 : write(addr,nb,fild); e-0 + .data2 0205 ! 5 : open(str,flag); e-0 + .data2 014 ! 6 : close(fild); e-- + .data2 07 ! 7 : wait(); e10 + .data2 0205 ! 8 : creat(str,mode); e-0 + .data2 0204 ! 9 : link(str1,str2); e-- + .data2 0104 !10 : unlink(str); e-- + .data2 ERRMASK !11 : error + .data2 0104 !12 : chdir(str); e-- + .data2 03 !13 : time(); -10 + .data2 0304 !14 : mknod(str,mode,addr); e-- + .data2 0204 !15 : chmod(str,mode); e-- + .data2 0304 !16 : chown(str,owner,grp); e-- + .data2 ERRMASK !17 : error + .data2 0204 !18 : stat(str,buf); e-- + .data2 0217 !19 : lseek(high,low,fild); e10 + .data2 01 !20 : getpid(); --0 + .data2 0304 !21 : mount(str1,str2,fl); e-- + .data2 0104 !22 : umount(str); e-- + .data2 014 !23 : setuid(uid); e-- + .data2 03 !24 : getuid(); -01 + .data2 024 !25 : stime(high,low); e-- + .data2 0315 !26 : ptrace(pid,addr,req,d); e-0 + .data2 011 !27 : alarm(sec); --0 + .data2 0114 !28 : fstat(buf,fild); e-- + .data2 0 !29 : pause(); --- + .data2 0204 !30 : utime(str,timep); e-- + .data2 ERRMASK !31 : error + .data2 ERRMASK !32 : error + .data2 0204 !33 : access(str,mode): e-- + .data2 010 !34 : nice(incr); --- + .data2 0100 !35 : ftime(bufp); --- + .data2 0 !36 : sync(); --- + .data2 0114 !37 : kill(sig,pid); e-- + .data2 ERRMASK !38 : error + .data2 ERRMASK !39 : error + .data2 ERRMASK !40 : error + .data2 025 !41 : dup(fild,newfild); e-0 + .data2 07 !42 : pipe(); e10 + .data2 0100 !43 : times(buf); --- + .data2 0400 !44 : profil(buff,siz,off,sc); --- + .data2 ERRMASK !45 : error + .data2 014 !46 : setgid(gid); e-- + .data2 03 !47 : getgid(); -01 + .data2 0 !48 : sigtrp(trap,sig); e-0; SPECIAL TREATMENT + .data2 ERRMASK !49 : error + .data2 ERRMASK !50 : error + .data2 0104 !51 : acct(file); e-- + .data2 0304 !52 : phys(seg,siz,phaddr); e-- + .data2 0104 !53 : lock(flag); e-- + .data2 0304 !54 : ioctl(fild,req,argp); e-- + .data2 ERRMASK !55 : error + .data2 0204 !56 : mpxcall(cmd,vec); e-- + .data2 ERRMASK !57 : error + .data2 ERRMASK !58 : error + .data2 0304 !59 : exece(name,argv,envp); e-- + .data2 0104 !60 : umask(complmode); e-- + .data2 0104 !61 : chroot(str); e-- diff --git a/mach/pdp/libem/ngf.s b/mach/pdp/libem/ngf.s index a167ee887..955eec345 100644 --- a/mach/pdp/libem/ngf.s +++ b/mach/pdp/libem/ngf.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl ngf~ -.globl setfloat~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define ngf~ +.extern setfloat~ +! $Header$ ngf~: jsr pc,setfloat~ diff --git a/mach/pdp/libem/ngi.s b/mach/pdp/libem/ngi.s index 8e4a246f4..56bd37b0a 100644 --- a/mach/pdp/libem/ngi.s +++ b/mach/pdp/libem/ngi.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl ngi~ -.globl unknown~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define ngi~ +.extern unknown~ +! $Header$ ngi~: mov (sp)+,r1 diff --git a/mach/pdp/libem/nop.s b/mach/pdp/libem/nop.s index 77539cc3f..77f9e29fb 100644 --- a/mach/pdp/libem/nop.s +++ b/mach/pdp/libem/nop.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl nop~ -.globl hol0,prf~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define nop~ +.extern hol0,prf~ +! $Header$ nop~: mov hol0,-(sp) @@ -9,5 +10,5 @@ nop~: jsr pc,prf~ add $04,sp rts pc -.data -fmt: +.sect .data +fmt: .asciz "test %d\n" diff --git a/mach/pdp/libem/prf.s b/mach/pdp/libem/prf.s index 3b6567e54..d946b775f 100644 --- a/mach/pdp/libem/prf.s +++ b/mach/pdp/libem/prf.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl prf~ -.globl save~,retu~,hol0,_printf +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define prf~ +.extern save~,retu~,hol0,_printf +! $Header$ prf~: jsr pc,save~ @@ -9,7 +10,7 @@ prf~: mov hol0+4,r0 beq 1f mov r0,r2 - mov $40.,r1 + mov $050,r1 3: movb (r2)+,r3 beq 2f cmpb r3,$0177 @@ -29,6 +30,6 @@ prf~: 1: mov $name,r0 br 2b -.data -fmt: <"%s", sp = %d, line %d: \0> -name: <_unknown file_\0> +.sect .data +fmt: .asciz "\"%s\", sp = %d, line %d: " +name: .asciz "_unknown file_" diff --git a/mach/pdp/libem/printf.s b/mach/pdp/libem/printf.s index aad9ff708..d6217a0db 100644 --- a/mach/pdp/libem/printf.s +++ b/mach/pdp/libem/printf.s @@ -1,6 +1,7 @@ -/ $Header$ -.text -.globl _printf +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define _printf +! $Header$ write = 4 @@ -54,10 +55,10 @@ ready: mov $buff,9f mov r4,9f+2 sys write -9: 0; 0 +9: .data2 0, 0 mov (sp)+,r4 mov (sp)+,r3 mov (sp)+,r2 rts pc -.data -buff: .=.+256. +.sect .bss +buff: .space 256 diff --git a/mach/pdp/libem/rck.s b/mach/pdp/libem/rck.s index d0faaac16..75c90bed4 100644 --- a/mach/pdp/libem/rck.s +++ b/mach/pdp/libem/rck.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl rck~ -.globl trp~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define rck~ +.extern trp~ +! $Header$ ERANGE = 1 diff --git a/mach/pdp/libem/ret.s b/mach/pdp/libem/ret.s index 8fc40f4f4..097ff980b 100644 --- a/mach/pdp/libem/ret.s +++ b/mach/pdp/libem/ret.s @@ -1,9 +1,10 @@ -/ $Header$ -.text -.globl ret~,lfr~,retar -.globl unknown~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define ret~,lfr~ +.extern unknown~, retar +! $Header$ -/ Size in r0 +! Size in r0 ret~: mov r0,r1 beq 1f diff --git a/mach/pdp/libem/rmi.s b/mach/pdp/libem/rmi.s index d7f5e88cf..047789079 100644 --- a/mach/pdp/libem/rmi.s +++ b/mach/pdp/libem/rmi.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl rmi~ -.globl unknown~,rmi4~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define rmi~ +.extern unknown~,rmi4~ +! $Header$ rmi~: mov (sp)+,r3 diff --git a/mach/pdp/libem/rmi4.s b/mach/pdp/libem/rmi4.s index b3417ca0d..349cc4c88 100644 --- a/mach/pdp/libem/rmi4.s +++ b/mach/pdp/libem/rmi4.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl rmi4~ -.globl save~,retu~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define rmi4~ +.extern save~,retu~ +! $Header$ rmi4~: jsr pc,save~ diff --git a/mach/pdp/libem/rmu.s b/mach/pdp/libem/rmu.s index 995d89479..733639898 100644 --- a/mach/pdp/libem/rmu.s +++ b/mach/pdp/libem/rmu.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl rmu~ -.globl rmu2~,rmu4~,unknown~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define rmu~ +.extern rmu2~,rmu4~,unknown~ +! $Header$ rmu~: mov (sp)+,r3 diff --git a/mach/pdp/libem/rmu2.s b/mach/pdp/libem/rmu2.s index 5e98c3617..a19bba7c8 100644 --- a/mach/pdp/libem/rmu2.s +++ b/mach/pdp/libem/rmu2.s @@ -1,6 +1,7 @@ -/ $Header$ -.text -.globl rmu2~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define rmu2~ +! $Header$ rmu2~: mov 04(sp),r1 diff --git a/mach/pdp/libem/rmu4.s b/mach/pdp/libem/rmu4.s index e406f1d91..3a2bdc179 100644 --- a/mach/pdp/libem/rmu4.s +++ b/mach/pdp/libem/rmu4.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl rmu4~ -.globl save~,retu~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define rmu4~ +.extern save~,retu~ +! $Header$ rmu4~: jsr pc,save~ diff --git a/mach/pdp/libem/rol.s b/mach/pdp/libem/rol.s index e0c75b300..1315a6594 100644 --- a/mach/pdp/libem/rol.s +++ b/mach/pdp/libem/rol.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl rol~ -.globl save~,retu~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define rol~ +.extern save~,retu~ +! $Header$ rol~: jsr pc,save~ diff --git a/mach/pdp/libem/ror.s b/mach/pdp/libem/ror.s index f2d50f9c6..28fd78ad9 100644 --- a/mach/pdp/libem/ror.s +++ b/mach/pdp/libem/ror.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl ror~ -.globl save~,retu~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define ror~ +.extern save~,retu~ +! $Header$ ror~: asr r0 diff --git a/mach/pdp/libem/sar.s b/mach/pdp/libem/sar.s index 5e13b441a..84de120f2 100644 --- a/mach/pdp/libem/sar.s +++ b/mach/pdp/libem/sar.s @@ -1,6 +1,7 @@ -/ $Header$ -.text -.globl sar~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define sar~ +! $Header$ sar~: mov (sp)+,r3 diff --git a/mach/pdp/libem/save.s b/mach/pdp/libem/save.s index 7eac28664..3da35e0aa 100644 --- a/mach/pdp/libem/save.s +++ b/mach/pdp/libem/save.s @@ -1,6 +1,7 @@ -/ $Header$ -.text -.globl save~,retu~,savearea +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define save~,retu~,savearea +! $Header$ save~: mov r5,savearea @@ -19,7 +20,6 @@ retu~: mov -(r5),r5 rts pc -.data -.even +.sect .bss savearea: - .=.+12. + .space 12 diff --git a/mach/pdp/libem/sbf.s b/mach/pdp/libem/sbf.s index 2950aa2ed..2a06d7313 100644 --- a/mach/pdp/libem/sbf.s +++ b/mach/pdp/libem/sbf.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl sbf~ -.globl setfloat~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define sbf~ +.extern setfloat~ +! $Header$ sbf~: mov (sp)+,r1 diff --git a/mach/pdp/libem/sbi.s b/mach/pdp/libem/sbi.s index 315c156fb..6d594b7c3 100644 --- a/mach/pdp/libem/sbi.s +++ b/mach/pdp/libem/sbi.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl sbi~ -.globl unknown~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define sbi~ +.extern unknown~ +! $Header$ sbi~: mov (sp)+,r1 diff --git a/mach/pdp/libem/set.s b/mach/pdp/libem/set.s index 2ae3e522e..17899d970 100644 --- a/mach/pdp/libem/set.s +++ b/mach/pdp/libem/set.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl set~ -.globl save~,retu~,trp~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define set~ +.extern save~,retu~,trp~ +! $Header$ ESET = 2 @@ -11,7 +12,7 @@ set~: asr r0 1: clr -(sp) sob r0,1b - div $8.,r0 + div $010,r0 cmp r0,r2 blo 2f mov $ESET,-(sp) @@ -21,5 +22,5 @@ set~: bisb bits(r1),(r0) jmp retu~ -.data -bits: .byte 1,2,4,10,20,40,100,200 +.sect .data +bits: .data1 1,2,4,010,020,040,0100,0200 diff --git a/mach/pdp/libem/setfl.s b/mach/pdp/libem/setfl.s index 238f9ef35..90535e8a3 100644 --- a/mach/pdp/libem/setfl.s +++ b/mach/pdp/libem/setfl.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl setfloat~,setint~ -.globl unknown~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define setfloat~,setint~ +.extern unknown~ +! $Header$ setfloat~: cmp r0,$8. diff --git a/mach/pdp/libem/sigtrp.s b/mach/pdp/libem/sigtrp.s index 5ffaaab77..214826a7c 100644 --- a/mach/pdp/libem/sigtrp.s +++ b/mach/pdp/libem/sigtrp.s @@ -1,40 +1,39 @@ -/ $Header$ -.text -.globl sigtrp~ -.globl trp~,save~,retu~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define sigtrp~ +.define trp~,save~,retu~ +! $Header$ indir = 0 -signal = 48. +signal = 060 -rti = 2 - -sig1: mov sig.trp+0.,-(sp) +sig1: mov sig.trp+0,-(sp) br 1f -sig2: mov sig.trp+2.,-(sp) +sig2: mov sig.trp+2,-(sp) br 1f -sig3: mov sig.trp+4.,-(sp) +sig3: mov sig.trp+4,-(sp) br 1f -sig4: mov sig.trp+6.,-(sp) +sig4: mov sig.trp+6,-(sp) br 1f -sig5: mov sig.trp+8.,-(sp) +sig5: mov sig.trp+010,-(sp) br 1f -sig6: mov sig.trp+10.,-(sp) +sig6: mov sig.trp+012,-(sp) br 1f -sig7: mov sig.trp+12.,-(sp) +sig7: mov sig.trp+014,-(sp) br 1f -sig10: mov sig.trp+18.,-(sp) +sig10: mov sig.trp+022,-(sp) br 1f -sig11: mov sig.trp+20.,-(sp) +sig11: mov sig.trp+024,-(sp) br 1f -sig12: mov sig.trp+22.,-(sp) +sig12: mov sig.trp+026,-(sp) br 1f -sig13: mov sig.trp+24.,-(sp) +sig13: mov sig.trp+030,-(sp) br 1f -sig14: mov sig.trp+026.,-(sp) +sig14: mov sig.trp+032,-(sp) br 1f -sig15: mov sig.trp+028.,-(sp) +sig15: mov sig.trp+034,-(sp) br 1f -sig16: mov sig.trp+030.,-(sp) +sig16: mov sig.trp+036,-(sp) br 1f 1: jsr pc,trp~ @@ -46,12 +45,12 @@ sigtrp~: mov (sp)+,r1 mov (sp)+,r0 ble sig.bad - cmp r0,$16. + cmp r0,$020 bhi sig.bad mov r0,call+02 asl r0 mov sig.trp-2(r0),r3 - cmp r1,$256. + cmp r1,$0400 bhis 1f mov sig.adr-2(r0),r2 bne 2f @@ -68,7 +67,7 @@ sigbad: inc r2 2: mov r1,sig.trp-2(r0) mov r2,call+04 - sys indir ; call + sys indir ; .data2 call bcs sigbad asr r0 bcc 1f @@ -79,15 +78,16 @@ sigbad: clr -(sp) jmp retu~ -.data -call: sys signal; 0; 0 +.sect .data +call: sys signal + .data2 0, 0 sig.trp: - -2; -2; -2; -2 - -2; -2; -2; -2 - -2; -2; -2; -2 - -2; -2; -2; -2 + .data2 -2, -2, -2, -2 + .data2 -2, -2, -2, -2 + .data2 -2, -2, -2, -2 + .data2 -2, -2, -2, -2 sig.adr: - sig1; sig2; sig3; sig4 - sig5; sig6; sig7; 0 - 0; sig10; sig11; sig12 - sig13; sig14; sig15; sig16 + .data2 sig1, sig2, sig3, sig + .data2 sig5, sig6, sig7, 0 + .data2 0, sig10, sig11, sig12 + .data2 sig13, sig14, sig15, sig16 diff --git a/mach/pdp/libem/sim.s b/mach/pdp/libem/sim.s index 8052f9eaf..0c2a147ca 100644 --- a/mach/pdp/libem/sim.s +++ b/mach/pdp/libem/sim.s @@ -1,15 +1,17 @@ -/ $Header$ -.text -.globl sim~ -.globl trpim~ +# +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define sim~ +.extern trpim~ +! $Header$ -.float = 1 +#define float sim~: mov (sp)+,r3 mov (sp)+,r0 mov r0,trpim~ -.if .float +#ifdef float stfps r1 bis $07400,r1 bit $020,r0 @@ -25,5 +27,5 @@ sim~: beq 0f bic $0400,r1 0: ldfps r1 -.endif +#endif jmp (r3) diff --git a/mach/pdp/libem/sli.s b/mach/pdp/libem/sli.s index cf704d2dc..731528411 100644 --- a/mach/pdp/libem/sli.s +++ b/mach/pdp/libem/sli.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl sli~ -.globl unknown~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define sli~ +.extern unknown~ +! $Header$ sli~: mov (sp)+,r3 diff --git a/mach/pdp/libem/sri.s b/mach/pdp/libem/sri.s index 2d3dc3852..15275741f 100644 --- a/mach/pdp/libem/sri.s +++ b/mach/pdp/libem/sri.s @@ -1,9 +1,10 @@ -/ $Header$ -.text -.globl sri~ -.globl unknown~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define sri~ +.extern unknown~ +! $Header$ -/ Size in r0 +! Size in r0 sri~: mov (sp)+,r3~ cmp r0,$02 diff --git a/mach/pdp/libem/sru.s b/mach/pdp/libem/sru.s index 7450c73dd..13b1a073a 100644 --- a/mach/pdp/libem/sru.s +++ b/mach/pdp/libem/sru.s @@ -1,7 +1,8 @@ -/ $Header$ -.text -.globl sru~ -.globl unknown~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define sru~ +.extern unknown~ +! $Header$ sru~: neg 2(sp) diff --git a/mach/pdp/libem/sto2.s b/mach/pdp/libem/sto2.s index 9609fd305..d4857f5ac 100644 --- a/mach/pdp/libem/sto2.s +++ b/mach/pdp/libem/sto2.s @@ -1,6 +1,7 @@ -/ $Header$ -.text -.globl sto2~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define sto2~ +! $Header$ sto2~: mov (sp)+,r3 diff --git a/mach/pdp/libem/strhp.s b/mach/pdp/libem/strhp.s index 8b70738cc..8e9b10dbd 100644 --- a/mach/pdp/libem/strhp.s +++ b/mach/pdp/libem/strhp.s @@ -1,11 +1,12 @@ -/ $Header$ -.text -.globl strhp~ -.globl fat~,reghp~,_end +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define strhp~ +.extern fat~,reghp~,_end +! $Header$ indir = 0 -break = 17. -EHEAP = 17. +break = 021 +EHEAP = 021 strhp~: mov (sp)+,r0 @@ -16,10 +17,10 @@ strhp~: add $01777,r1 bic $01777,r1 mov r1,2f+2 - sys indir ; 2f + sys indir ; .data2 2f bcs 3f 1: jmp (r0) 3: mov $EHEAP,-(sp) jmp fat~ -.data -2: sys break; _end +.sect .data +2: sys break; .data2 _end diff --git a/mach/pdp/libem/trp.s b/mach/pdp/libem/trp.s index a2084431e..99cb77a17 100644 --- a/mach/pdp/libem/trp.s +++ b/mach/pdp/libem/trp.s @@ -1,12 +1,13 @@ -/ $Header$ -.text -.globl trp~,fat~ -.globl trppc~,trpim~,savearea,retar - write=4. +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define trp~,fat~ +.extern trppc~,trpim~,savearea,retar +! $Header$ + write=4 fat~: jsr pc,trp~ - 4 + .data2 4 trp~: mov r0,-(sp) @@ -14,7 +15,7 @@ trp~: mov 02(sp),04(sp) mov (sp),02(sp) mov r1,(sp) - cmp r0,$16. + cmp r0,$020 jhis 0f mov $01,r1 ashc r0,r1 @@ -50,7 +51,7 @@ trp~: clr trppc~ jsr pc,(r0) tst (sp)+ - mov $retar+16.,r2 + mov $retar+020,r2 mov (sp)+,-(r2) mov (sp)+,-(r2) mov (sp)+,-(r2) @@ -59,7 +60,7 @@ trp~: mov (sp)+,-(r2) mov (sp)+,-(r2) mov (sp)+,-(r2) - mov $savearea+12.,r2 + mov $savearea+014,r2 mov (sp)+,-(r2) mov (sp)+,-(r2) mov (sp)+,-(r2) @@ -78,18 +79,18 @@ trp~: mov (sp)+,r0 rts pc 9: mov (sp)+,r0 - mov $buf+11,r1 + mov $buf+011,r1 mov $4,r2 1: mov r0,r3 - bic $177770,r3 + bic $0177770,r3 bisb r3,-(r1) ash $-3,r0 sob r2,1b mov $2,r0 - sys write;buf;11. - 4 + sys write;.data2 buf, 013 + .data2 4 -.data -retar: .=.+16. +.sect .data +retar: .space 16 retend: -buf: +buf: .ascii "err 00000\n" diff --git a/mach/pdp/libem/unknown.s b/mach/pdp/libem/unknown.s index d76bea0d8..2b412c357 100644 --- a/mach/pdp/libem/unknown.s +++ b/mach/pdp/libem/unknown.s @@ -1,9 +1,10 @@ -/ $Header$ -.text -.globl unknown~ -.globl fat~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.sect .text +.define unknown~ +! $Header$ +.extern fat~ -EILLSIZ = 19. +EILLSIZ = 023 unknown~: mov $EILLSIZ,-(sp) diff --git a/mach/pdp/libem/xor.s b/mach/pdp/libem/xor.s index fd0ae60f0..5dc58f5f3 100644 --- a/mach/pdp/libem/xor.s +++ b/mach/pdp/libem/xor.s @@ -1,6 +1,7 @@ -/ $Header$ -.globl xor~ -.globl save~,retu~ +.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text +.define xor~ +.extern save~,retu~ +! $Header$ xor~: jsr pc,save~