Adapted to use of new assembler & linker
authorkeie <none@none>
Tue, 4 Jun 1985 10:57:42 +0000 (10:57 +0000)
committerkeie <none@none>
Tue, 4 Jun 1985 10:57:42 +0000 (10:57 +0000)
36 files changed:
mach/m68k2/libem/ara.s
mach/m68k2/libem/cii.s
mach/m68k2/libem/cmi.s
mach/m68k2/libem/cmp.s
mach/m68k2/libem/cms.s
mach/m68k2/libem/cmu.s
mach/m68k2/libem/csa.s
mach/m68k2/libem/csb.s
mach/m68k2/libem/cuu.s
mach/m68k2/libem/cvf.s
mach/m68k2/libem/dia.s
mach/m68k2/libem/dvi.s
mach/m68k2/libem/dvu.s
mach/m68k2/libem/end.s
mach/m68k2/libem/exg.s
mach/m68k2/libem/fat.s
mach/m68k2/libem/ffp.s [new file with mode: 0644]
mach/m68k2/libem/gto.s
mach/m68k2/libem/inn.s
mach/m68k2/libem/los.s
mach/m68k2/libem/lpb.s
mach/m68k2/libem/lxa.s
mach/m68k2/libem/lxl.s
mach/m68k2/libem/mli.s
mach/m68k2/libem/mlu.s
mach/m68k2/libem/mon.s
mach/m68k2/libem/nop.s
mach/m68k2/libem/printf.s
mach/m68k2/libem/rck.s
mach/m68k2/libem/ret.s
mach/m68k2/libem/set.s
mach/m68k2/libem/shp.s
mach/m68k2/libem/sig.s
mach/m68k2/libem/sts.s
mach/m68k2/libem/trp.s
mach/m68k2/libsys/head_em.s

index 3c3f179..41869eb 100644 (file)
@@ -1,12 +1,16 @@
 .define .sar
 .define .lar
 .define .aar
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
        !register usage:
        ! a0 : descriptor address
        ! d0 : index
        ! a1 : base address
-       .text
+       .sect .text
 .aar:
        move.l  (sp)+,d2        ! return address
        move.l  (sp)+,a0
index 045d7c7..3859107 100644 (file)
@@ -1,6 +1,10 @@
 .define        .cii
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-       .text
+       .sect .text
 .cii:
        move.l  (sp)+,a0        ! return address
        move    (sp)+,d0        ! destination size
index dd5e554..6de1fee 100644 (file)
@@ -1,8 +1,12 @@
 .define        .cmi, .cmi_
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
        ! NUM == 4
        ! result in d1
-       .text
+       .sect .text
 .cmi:
 .cmi_:
        move.l  (sp)+,a0
index f2d962f..15b95b1 100644 (file)
@@ -1,6 +1,10 @@
 .define        .cmp
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-       .text
+       .sect .text
 .cmp:
        move.l  (sp)+,a0        ! return address
        move.l  #1,d1
index 1ff61a8..18101dc 100644 (file)
@@ -1,8 +1,12 @@
 .define        .cms
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
        ! d0 contains set size
 
-       .text
+       .sect .text
 .cms:
        move.l  (sp)+,d2        ! return address
        move.l  sp,a0
index 624e2cb..87b8a18 100644 (file)
@@ -1,7 +1,11 @@
 .define .cmu
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
        ! d0 : # bytes of 1 block
-       .text
+       .sect .text
 .cmu:
        move.l  (sp)+,d2        ! reta
        move.l  sp,a0           ! top block
index 9d3e036..b16313d 100644 (file)
@@ -1,6 +1,10 @@
 .define .csa
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-       .text
+       .sect .text
 .csa:
        move.l  (sp)+,a0        ! case descriptor
        move    (sp)+,d0        ! index
index c36ecf0..5d25385 100644 (file)
@@ -1,6 +1,10 @@
 .define .csb
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-       .text
+       .sect .text
 .csb:
        move.l  (sp)+,a0        ! case descriptor
        move    (sp)+,d0        ! index
index d1db8f5..fb3989c 100644 (file)
@@ -1,8 +1,12 @@
 .define        .ciu
 .define        .cui
 .define        .cuu
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-       .text
+       .sect .text
 .ciu:
 .cui:
 .cuu:
index d0b081d..dc2c5d2 100644 (file)
@@ -1,6 +1,10 @@
 .define        .cfi,.cif,.cfu,.cuf,.cff
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-       .text
+       .sect .text
 
        ! this is a dummy float conversion routine
 .cfi:
index 849f29e..dd7e6a0 100644 (file)
@@ -1,12 +1,16 @@
 .define        .diagnos
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
 space  = 040
 del    = 0177
 
-       .text
+       .sect .text
 .diagnos:
        move.w  hol0,-(sp)
-       move.l  hol0+FILN_AD,d2
+       move.l  hol0+4,d2
        beq     1f
        move.l  d2,a0
        move.l  #40,d0
@@ -31,7 +35,7 @@ del   = 0177
        move.l  #unknwn,d2
        bra     2b
 
-       .data
+       .sect .data
 fmt:   .asciz "%s, line %d: "
 unknwn:        .asciz "unknown file"
 .align 2
index 508f667..a17ad0f 100644 (file)
@@ -1,7 +1,11 @@
 .define .dvi
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
  ! signed long divide
-       .text
+       .sect .text
 .dvi:
        move.l  (sp)+,a0        ! return address
        move.l  (sp)+,d0
index 2c3dea8..7efdd44 100644 (file)
@@ -1,4 +1,8 @@
 .define .dvu
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
  ! unsigned long divide
  ! register usage:
@@ -6,7 +10,7 @@
  !         d1 dividend
  ! exit  : d1 quotient
  !         d2 remainder
-       .text
+       .sect .text
 .dvu:
        move.l  (sp)+,a1        ! return address
        move.l  (sp)+,d0
index e05364b..37e1cef 100644 (file)
@@ -1,14 +1,16 @@
 .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
-       .align 2
+       .sect .text
 endtext:
 _etext:
-       .data
-       .align 2
+       .sect .data
 enddata:
 _edata:
-       .bss
-       .align 2
-endbss:
+       .sect .end
 _end:
+endbss:
index 042f80f..8d9da16 100644 (file)
@@ -1,7 +1,11 @@
 .define .exg
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
        ! d0 : exchange size in bytes
-       .text
+       .sect .text
 .exg:
        move.l  (sp)+,d2        ! return address
        move.l  sp,a1
index fe2e078..9c1e2b9 100644 (file)
@@ -1,6 +1,10 @@
 .define        .fat
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-       .text
+       .sect .text
 .fat:
        jsr     .trp    
        jmp     EXIT
diff --git a/mach/m68k2/libem/ffp.s b/mach/m68k2/libem/ffp.s
new file mode 100644 (file)
index 0000000..d6bd130
--- /dev/null
@@ -0,0 +1,18 @@
+.define .cmf8, .cif8, .dvf8, .adf8, .ngf8, .mlf8, .fif8, .fef8, .cff4
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+
+.sect .text
+.cmf8:
+.cif8:
+.dvf8:
+.adf8:
+.ngf8:
+.mlf8:
+.fif8:
+.fef8:
+.cff4:
+       move.w  #EILLINS,-(sp)
+       jmp     .fat
index c78ca22..3a394f8 100644 (file)
@@ -1,4 +1,8 @@
 .define .gto
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 .extern .gto
 
 .gto:
@@ -69,7 +73,7 @@ etabd:
 etaba:
        move.l  d2,a1
        jmp     (a1)            ! return
-.data
-savd0: .long 0
-savd1: .long 0
-.text
+.sect .data
+savd0: .data4 0
+savd1: .data4 0
+.sect .text
index 79d057c..28c60db 100644 (file)
@@ -1,9 +1,13 @@
 .define .inn
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
 ! d0 : set size in bytes
 ! d1 : bitnumber
 
-       .text
+       .sect .text
 .inn:
        move.l  (sp)+,d2        ! return address
        move.w  (sp)+,d1
index 5bc40cc..84b6832 100644 (file)
@@ -1,8 +1,12 @@
 .define .los
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
        ! d0 : # bytes
        ! a0 : source address
-       .text
+       .sect .text
 .los:
        move.l  (sp)+,a1
        move.w  (sp)+,d0
index 3256773..177fac4 100644 (file)
@@ -1,4 +1,8 @@
 .define .lpb
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 .extern .lpb
 .lpb:
        ! convert local to argument base
index ff0df42..9172a3d 100644 (file)
@@ -1,4 +1,8 @@
 .define .lxa
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 .extern .lxa
 .lxa:
        ! #levels (>= 0) on stack
index 7ab2354..e41f831 100644 (file)
@@ -1,4 +1,8 @@
 .define .lxl
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 .extern .lxl
 .lxl:
        ! #levels on stack (> 0)
index fdf9242..a0aa9a4 100644 (file)
@@ -1,7 +1,11 @@
 .define .mli
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
 
-       .text
+       .sect .text
 .mli:
        move.l  (sp)+,a0
        move.l  (sp)+,d1
index b8522da..f3146c0 100644 (file)
@@ -1,11 +1,15 @@
 .define .mlu
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
  ! entry : d0 multiplicand
  !         d1 multiplier
  ! exit  : d0 high order result
  !         d1 low order result
 
-       .text
+       .sect .text
 .mlu:
        move.l  (sp)+,a1
        move.l  (sp)+,d1
index dabe65a..dffaaed 100644 (file)
@@ -1,5 +1,9 @@
 .define .mon
-       .text
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+       .sect .text
 .mon:
        move.l  (sp)+,a0
        pea     fmt
@@ -7,6 +11,6 @@
        add     #6,sp
        jmp     EXIT
 
-       .data
+       .sect .data
 fmt:   .asciz "system call %d not implemented"
 .align 2
index f7dd9db..47e242c 100644 (file)
@@ -1,6 +1,10 @@
 .define .nop
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-       .text
+       .sect .text
 .nop:
        move.w  hol0,-(sp)
        pea     fmt
@@ -8,6 +12,6 @@
        add     #6,sp
        rts
 
-       .data
+       .sect .data
 fmt:   .asciz "test %d\n"
 .align 2
index cc79a69..044484d 100644 (file)
@@ -1,6 +1,10 @@
 .define _printn
 .define _printf
-.text
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
+.sect .text
 _putchar:
        move.w  #1,-(sp)
        pea     7(sp)
@@ -10,14 +14,14 @@ _putchar:
        rts
 _printf:
        link    a6,#-12
-.data
+.sect .data
 _12:
-       .short  28786
-       .short  26990
-       .short  29798
-       .short  11875
-       .short  0
-.text
+       .data2  28786
+       .data2  26990
+       .data2  29798
+       .data2  11875
+       .data2  0
+.sect .text
        pea     8+4(a6)
        move.l  (sp)+,-6(a6)
 I004:
@@ -138,15 +142,15 @@ I002:
        rts
 _printn:
        link    a6,#-2
-.data
+.sect .data
 _15:
-       .short  12337
-       .short  12851
-       .short  13365
-       .short  13879
-       .short  14393
-       .short  0
-.text
+       .data2  12337
+       .data2  12851
+       .data2  13365
+       .data2  13879
+       .data2  14393
+       .data2  0
+.sect .text
        move.w  8+0(a6),-(sp)
        move.w  #10,-(sp)
        move.w  (sp)+,d0
index 52af333..73bae4a 100644 (file)
@@ -1,6 +1,10 @@
 .define .rck
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-       .text
+       .sect .text
 .rck:
        move.l  (sp)+,a1
        move.l  (sp)+,a0        ! descriptor address
index a1b394d..c18c42a 100644 (file)
@@ -1,6 +1,10 @@
 .define .ret
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-       .text
+       .sect .text
 .ret:
        beq 3f
        cmp #2,d0
index 7d32c69..42111bb 100644 (file)
@@ -1,8 +1,12 @@
 .define .set
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
        ! d0 : setsize in bytes
        ! d1 : bitnumber
-       .text
+       .sect .text
 .set:
        move.l  (sp)+,a0
        move.w  (sp)+,d1
index 88421e4..912af4f 100644 (file)
@@ -1,6 +1,10 @@
 .define        .strhp
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-       .text
+       .sect .text
 .strhp:
        move.l  (sp)+,a0
        move.l  (sp)+,d0        ! heap pointer
index 3fa3e0b..f93c9f8 100644 (file)
@@ -1,6 +1,10 @@
 .define        .sig
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-       .text
+       .sect .text
 .sig:
        move.l  (sp)+,a0
        move.l  (sp)+,a1        ! trap pc
index 937c930..3c1bf91 100644 (file)
@@ -1,8 +1,12 @@
 .define .sts
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
        ! d0 : # bytes
        ! a0 : destination address
-       .text
+       .sect .text
 .sts:
        move.l  (sp)+,a1
        move.w  (sp)+,d0
index 36045db..bd6f15d 100644 (file)
@@ -1,6 +1,10 @@
 .define        .trp
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-       .text
+       .sect .text
 .trp:
        move.l  (sp)+,a1        ! return address
        move.w  (sp)+,d0        ! error number
@@ -30,7 +34,7 @@
        jsr     .diagnos
        jmp     EXIT
 
-       .data
-.rettrp: .long 0
+       .sect .data
+.rettrp: .data4 0
 fmt:   .asciz "trap %d called\n"
 .align 2
index 7c7eb12..a47d8ee 100644 (file)
@@ -1,21 +1,16 @@
-.define        CERASE,CKILL,CSTOP,CSTART
 .define .lino,.filn
-
-.define F_DUM,EXIT
-
+.define EXIT
 .define        begtext,begdata,begbss
 .define        EARRAY,ERANGE,ESET,EIDIVZ,EHEAP,EILLINS,ECASE,EBADGTO
 .define        hol0,.reghp,.limhp,.trpim,.trppc
-.define        LINO_AD,FILN_AD
+.sect .text
+.sect .rom
+.sect .data
+.sect .bss
 
-! EM runtime start-off for the Bleasdale 68000 system
 
 
-CERASE = 010
-CKILL  = 030
-CSTART = 021
-CSTOP  = 023
-F_DUM  = 0
+! EM runtime start-off for the Bleasdale 68000 system
 
 
 LINO_AD        = 0
@@ -30,8 +25,7 @@ EILLINS       = 18
 ECASE  = 20
 EBADGTO = 27
 
-.base 0x20000
-       .text
+       .sect .text
 begtext:
        ! Bleasdale puts the argument and environment vectors
        ! themselves on top of the stack, instead of POINTERS
@@ -57,30 +51,27 @@ begtext:
        ! envp pointer.
 
        add.l   #2,sp !convert argc from 4-byte to 2-byte
-       pea     endbss
-       jsr     _brk
-       add.l   #4,sp
        jsr     _m_a_i_n
        add     #010,sp
 EXIT:
        jsr     __exit
 
-       .data
+       .sect .data
 begdata:
 hol0:
 .lino:
-       .short  0,0     ! lino
+       .data2  0,0     ! lino
 .filn:
-       .long   0       ! filn
+       .data4  0       ! filn
 .reghp:
-       .long   endbss
+       .data4  endbss
 .limhp:
-       .long   endbss
+       .data4  endbss
 .trppc:
-       .long   0
+       .data4  0
 .trpim:
-       .short  0
+       .data2  0
 
 
-       .bss
-begbss:
+       .sect .bss
+begbss: !initialization is not needed because ALL entries are in zero space!