diff --git a/mach/z8000/libem/LIST b/mach/z8000/libem/LIST index f7d9999d1..dde4ae892 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 486aa5d73..b94059f95 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 1cf467841..3b004cf92 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 de643ebb4..12b61e6a7 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 686f10363..9d25a9c6f 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 5459aec81..1980f9f8a 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 ac3ff4e14..4cb9859b1 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 cfe26c4c2..1747739ec 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 c3b961361..e7fda3e45 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 2135b2d0a..9ea7df389 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 e4fd1b96c..4822fb9e7 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 de145d96b..f6db01014 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 7e60c5e88..ac7466a9f 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 74aa68096..f27743b7c 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 d1403722f..1b2687bef 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 d5fc9617e..63cdc40ed 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 c35d844a4..37e1cef2c 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 79061cc2c..540ff8741 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 4c78b2355..1fd786968 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 202fcbcb1..fa8e20a04 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 ba8ac0f40..11dd15d3c 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 bf82bbb64..83e69ab2b 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 a6b9d3e62..ca6c21c72 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 3d971be12..407a9c576 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 f6c16c0a0..2042941e7 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 9491b142d..e892f84ed 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 0e511b9d7..56ca133cd 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 cf36d8c4b..9d33b4b69 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 1bdcb4d49..5dbd82363 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 1604f734a..74f10d54a 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 509003a2c..721c0461d 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 ef704dd52..66a1715dc 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 e69de29bb..c9890d7ea 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 a987aa31f..db6bc5a09 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 2c404ca2c..37e06af2a 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 f9efd6419..82ed1df9a 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 e3e2e8191..c7ac93d3d 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 7ed579453..8a6369af2 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