diff --git a/mach/z8000/libem/LIST b/mach/z8000/libem/LIST index f7d9999d..dde4ae89 100644 --- a/mach/z8000/libem/LIST +++ b/mach/z8000/libem/LIST @@ -1,4 +1,4 @@ -tail_em.s.a +libem_s.a aar.s blm.s cii.s diff --git a/mach/z8000/libem/Makefile b/mach/z8000/libem/Makefile index 486aa5d7..b94059f9 100644 --- a/mach/z8000/libem/Makefile +++ b/mach/z8000/libem/Makefile @@ -1,11 +1,12 @@ +all: install: ../../install head_em.s head_em - ../../install tail_em.s.a tail_em + ../../install libem_s.a tail_em cmp: -../../compare head_em.s head_em - -../../compare tail_em.s.a tail_em + -../../compare libem_s.a tail_em clean: @@ -13,5 +14,5 @@ opr : make pr | opr pr: - @pr head_em.s - @arch pv tail_em.s.a | pr -h `pwd`/tail_em.s.a + @pr `pwd`/head_em.s + @arch pv libem_s.a | pr -h `pwd`/libem_s.a diff --git a/mach/z8000/libem/aar.s b/mach/z8000/libem/aar.s index 1cf46784..3b004cf9 100644 --- a/mach/z8000/libem/aar.s +++ b/mach/z8000/libem/aar.s @@ -1,4 +1,9 @@ .define aar +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text !R1 contains description address !R3 contains element number diff --git a/mach/z8000/libem/blm.s b/mach/z8000/libem/blm.s index de643ebb..12b61e6a 100644 --- a/mach/z8000/libem/blm.s +++ b/mach/z8000/libem/blm.s @@ -1,4 +1,9 @@ .define blm +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text !size in R0 blm: diff --git a/mach/z8000/libem/cii.s b/mach/z8000/libem/cii.s index 686f1036..9d25a9c6 100644 --- a/mach/z8000/libem/cii.s +++ b/mach/z8000/libem/cii.s @@ -1,4 +1,9 @@ .define cii +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text cii: popl saveret, *RR14 diff --git a/mach/z8000/libem/cmi.s b/mach/z8000/libem/cmi.s index 5459aec8..1980f9f8 100644 --- a/mach/z8000/libem/cmi.s +++ b/mach/z8000/libem/cmi.s @@ -1,4 +1,9 @@ .define cmi +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text !size in R0 cmi: diff --git a/mach/z8000/libem/cmi4.s b/mach/z8000/libem/cmi4.s index ac3ff4e1..4cb9859b 100644 --- a/mach/z8000/libem/cmi4.s +++ b/mach/z8000/libem/cmi4.s @@ -1,4 +1,9 @@ .define cmi4 +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text cmi4: popl saveret, *RR14 diff --git a/mach/z8000/libem/cms.s b/mach/z8000/libem/cms.s index cfe26c4c..1747739e 100644 --- a/mach/z8000/libem/cms.s +++ b/mach/z8000/libem/cms.s @@ -1,4 +1,9 @@ .define cms +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text cms: popl saveret, *RR14 diff --git a/mach/z8000/libem/cmu.s b/mach/z8000/libem/cmu.s index c3b96136..e7fda3e4 100644 --- a/mach/z8000/libem/cmu.s +++ b/mach/z8000/libem/cmu.s @@ -1,4 +1,9 @@ .define cmu +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text !size in R0 cmu: diff --git a/mach/z8000/libem/cmu4.s b/mach/z8000/libem/cmu4.s index 2135b2d0..9ea7df38 100644 --- a/mach/z8000/libem/cmu4.s +++ b/mach/z8000/libem/cmu4.s @@ -1,4 +1,9 @@ .define cmu4 +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text cmu4: popl saveret, *RR14 diff --git a/mach/z8000/libem/csa.s b/mach/z8000/libem/csa.s index e4fd1b96..4822fb9e 100644 --- a/mach/z8000/libem/csa.s +++ b/mach/z8000/libem/csa.s @@ -1,4 +1,9 @@ .define csa +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text !R1 contains address of jump table !R2 contains case index diff --git a/mach/z8000/libem/csb.s b/mach/z8000/libem/csb.s index de145d96..f6db0101 100644 --- a/mach/z8000/libem/csb.s +++ b/mach/z8000/libem/csb.s @@ -1,4 +1,9 @@ .define csb +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text !R1 contains address of jump table !R2 contains case index diff --git a/mach/z8000/libem/cuu.s b/mach/z8000/libem/cuu.s index 7e60c5e8..ac7466a9 100644 --- a/mach/z8000/libem/cuu.s +++ b/mach/z8000/libem/cuu.s @@ -1,4 +1,9 @@ .define cuu +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text cuu: popl RR2, *RR14 diff --git a/mach/z8000/libem/dup.s b/mach/z8000/libem/dup.s index 74aa6809..f27743b7 100644 --- a/mach/z8000/libem/dup.s +++ b/mach/z8000/libem/dup.s @@ -1,4 +1,9 @@ .define dup +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text dup: popl saveret, *RR14 diff --git a/mach/z8000/libem/dvu2.s b/mach/z8000/libem/dvu2.s index d1403722..1b2687be 100644 --- a/mach/z8000/libem/dvu2.s +++ b/mach/z8000/libem/dvu2.s @@ -1,4 +1,9 @@ .define dvu2 +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text dvu2: popl saveret, *RR14 diff --git a/mach/z8000/libem/dvu4.s b/mach/z8000/libem/dvu4.s index d5fc9617..63cdc40e 100644 --- a/mach/z8000/libem/dvu4.s +++ b/mach/z8000/libem/dvu4.s @@ -1,4 +1,9 @@ .define dvu4 +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text dvu4: popl saveret, *RR14 diff --git a/mach/z8000/libem/end.s b/mach/z8000/libem/end.s index c35d844a..37e1cef2 100644 --- a/mach/z8000/libem/end.s +++ b/mach/z8000/libem/end.s @@ -1,14 +1,16 @@ -.define endtext, enddata, endbss, _etext, _edata, _end +.define endtext,enddata,endbss,_etext,_edata,_end +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .end ! only for declaration of _end and endbss. - .text + .sect .text endtext: _etext: - .align 2 - .data - .align 2 + .sect .data enddata: _edata: - .bss - .align 2 -endbss: + .sect .end _end: +endbss: diff --git a/mach/z8000/libem/exg.s b/mach/z8000/libem/exg.s index 79061cc2..540ff874 100644 --- a/mach/z8000/libem/exg.s +++ b/mach/z8000/libem/exg.s @@ -1,4 +1,9 @@ .define exg +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text !size (bytes) in R0 exg: diff --git a/mach/z8000/libem/gto.s b/mach/z8000/libem/gto.s index 4c78b235..1fd78696 100644 --- a/mach/z8000/libem/gto.s +++ b/mach/z8000/libem/gto.s @@ -1,4 +1,9 @@ .define gto +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text gto: pop R3, *RR14 diff --git a/mach/z8000/libem/head_em.s b/mach/z8000/libem/head_em.s index 202fcbcb..fa8e20a0 100644 --- a/mach/z8000/libem/head_em.s +++ b/mach/z8000/libem/head_em.s @@ -1,6 +1,11 @@ .define EXIT, F_DUM .define ERANGE, ESET, EHEAP, EILLINS, EODDZ, ECASE, EBADMON .define hol0, trppc, trpim, reghp, argv, envp +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text EXIT = 0 F_DUM = 0 @@ -13,8 +18,8 @@ EODDZ = 19 ECASE = 20 EBADMON = 25 -.text - !clear .bss +.sect .text + !clear .sect .bss ldk R2, $0 ld R3, $endbss ld R0, R3 @@ -38,20 +43,20 @@ EBADMON = 25 ldl RR14, $0xC00017FC sc $0 -.bss +.sect .bss begbss: -.data +.sect .data hol0: - .word 0,0 ! line no - .word 0,0 ! file + .data2 0,0 ! line no + .data2 0,0 ! file trppc: - .word 0 + .data2 0 trpim: - .word 0 + .data2 0 argv: envp: - .word 1f - .word 0 + .data2 1f + .data2 0 1: .asciz "program" reghp: - .word endbss + .data2 endbss diff --git a/mach/z8000/libem/inn.s b/mach/z8000/libem/inn.s index ba8ac0f4..11dd15d3 100644 --- a/mach/z8000/libem/inn.s +++ b/mach/z8000/libem/inn.s @@ -1,4 +1,9 @@ .define inn +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text !bitnr in R1 !size (bytes) in R2 diff --git a/mach/z8000/libem/lar.s b/mach/z8000/libem/lar.s index bf82bbb6..83e69ab2 100644 --- a/mach/z8000/libem/lar.s +++ b/mach/z8000/libem/lar.s @@ -1,4 +1,9 @@ .define lar +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text !R1 contains description address !R3 contains element number diff --git a/mach/z8000/libem/los2.s b/mach/z8000/libem/los2.s index a6b9d3e6..ca6c21c7 100644 --- a/mach/z8000/libem/los2.s +++ b/mach/z8000/libem/los2.s @@ -1,4 +1,9 @@ .define los2 +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text los2: popl saveret, *RR14 diff --git a/mach/z8000/libem/mon.s b/mach/z8000/libem/mon.s index 3d971be1..407a9c57 100644 --- a/mach/z8000/libem/mon.s +++ b/mach/z8000/libem/mon.s @@ -1,4 +1,9 @@ .define mon +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text mon: popl saveret, *RR14 diff --git a/mach/z8000/libem/noop.s b/mach/z8000/libem/noop.s index f6c16c0a..2042941e 100644 --- a/mach/z8000/libem/noop.s +++ b/mach/z8000/libem/noop.s @@ -1,9 +1,14 @@ .define noop +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text noop: push *RR14, hol0 push *RR14, $fmt calr prf ret -.data +.sect .data fmt: .asciz "test %d\n" diff --git a/mach/z8000/libem/prf.s b/mach/z8000/libem/prf.s index 9491b142..e892f84e 100644 --- a/mach/z8000/libem/prf.s +++ b/mach/z8000/libem/prf.s @@ -1,4 +1,9 @@ .define prf +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text prf: ld R0, hol0+4 !pointer to filename @@ -29,8 +34,8 @@ prf: ret 1: ld R0, $name jr 2b -.data +.sect .data fmt1: .asciz "%s, sp = %x, line %d:\n" name: .asciz "_unknown file_" saveprf: - .long 0 + .data4 0 diff --git a/mach/z8000/libem/printf.s b/mach/z8000/libem/printf.s index 0e511b9d..56ca133c 100755 --- a/mach/z8000/libem/printf.s +++ b/mach/z8000/libem/printf.s @@ -1,4 +1,9 @@ .define printf +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text printf: popl saveret, *RR14 @@ -77,6 +82,6 @@ printn: inc R3 ret -.data +.sect .data buff: .space 256 diff --git a/mach/z8000/libem/rck.s b/mach/z8000/libem/rck.s index cf36d8c4..9d33b4b6 100644 --- a/mach/z8000/libem/rck.s +++ b/mach/z8000/libem/rck.s @@ -1,4 +1,9 @@ .define rck +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text rck: ld R0, RR14($4) diff --git a/mach/z8000/libem/rmu2.s b/mach/z8000/libem/rmu2.s index 1bdcb4d4..5dbd8236 100644 --- a/mach/z8000/libem/rmu2.s +++ b/mach/z8000/libem/rmu2.s @@ -1,4 +1,9 @@ .define rmu2 +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text rmu2: popl saveret, *RR14 diff --git a/mach/z8000/libem/rmu4.s b/mach/z8000/libem/rmu4.s index 1604f734..74f10d54 100644 --- a/mach/z8000/libem/rmu4.s +++ b/mach/z8000/libem/rmu4.s @@ -1,4 +1,9 @@ .define rmu4 +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text rmu4: popl saveret, *RR14 diff --git a/mach/z8000/libem/sar.s b/mach/z8000/libem/sar.s index 509003a2..721c0461 100644 --- a/mach/z8000/libem/sar.s +++ b/mach/z8000/libem/sar.s @@ -1,4 +1,9 @@ .define sar +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text !R1 contains description address !R3 contains element number diff --git a/mach/z8000/libem/save.s b/mach/z8000/libem/save.s index ef704dd5..66a1715d 100644 --- a/mach/z8000/libem/save.s +++ b/mach/z8000/libem/save.s @@ -1,8 +1,13 @@ .define saveret .define savereg +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text -.data +.sect .data saveret: - .long 0 + .data4 0 savereg: .space 20 diff --git a/mach/z8000/libem/sigtrp.s b/mach/z8000/libem/sigtrp.s index e69de29b..c9890d7e 100644 --- a/mach/z8000/libem/sigtrp.s +++ b/mach/z8000/libem/sigtrp.s @@ -0,0 +1,5 @@ +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text diff --git a/mach/z8000/libem/strhp.s b/mach/z8000/libem/strhp.s index a987aa31..db6bc5a0 100644 --- a/mach/z8000/libem/strhp.s +++ b/mach/z8000/libem/strhp.s @@ -1,4 +1,9 @@ .define strhp +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text strhp: popl RR2, *RR14 diff --git a/mach/z8000/libem/sts2.s b/mach/z8000/libem/sts2.s index 2c404ca2..37e06af2 100644 --- a/mach/z8000/libem/sts2.s +++ b/mach/z8000/libem/sts2.s @@ -1,4 +1,9 @@ .define sts2 +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text sts2: popl saveret, *RR14 diff --git a/mach/z8000/libem/trp.s b/mach/z8000/libem/trp.s index f9efd641..82ed1df9 100644 --- a/mach/z8000/libem/trp.s +++ b/mach/z8000/libem/trp.s @@ -1,4 +1,9 @@ .define trp, fatal +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text fatal: calr trp @@ -34,5 +39,5 @@ trp: 3: push *RR14, $err calr printf sc $EXIT -.data +.sect .data err: .asciz "trap error %d\n" diff --git a/mach/z8000/libem/unknown.s b/mach/z8000/libem/unknown.s index e3e2e819..c7ac93d3 100644 --- a/mach/z8000/libem/unknown.s +++ b/mach/z8000/libem/unknown.s @@ -1,4 +1,9 @@ .define unknown +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text unknown: push *RR14, $EODDZ diff --git a/mach/z8000/libem/xset.s b/mach/z8000/libem/xset.s index 7ed57945..8a6369af 100644 --- a/mach/z8000/libem/xset.s +++ b/mach/z8000/libem/xset.s @@ -1,4 +1,9 @@ .define xset +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text !bitnr in R1 !size (bytes) in R0