Auto-translate all libc assembly sources
authorNick Downing <nick@ndcode.org>
Thu, 11 Aug 2022 04:07:46 +0000 (14:07 +1000)
committerNick Downing <nick@ndcode.org>
Thu, 11 Aug 2022 04:07:46 +0000 (14:07 +1000)
78 files changed:
usr/src/libc/crt/aldiv.s
usr/src/libc/crt/almul.s
usr/src/libc/crt/alrem.s
usr/src/libc/crt/cerror.s
usr/src/libc/crt/csv.s
usr/src/libc/crt/ldiv.s
usr/src/libc/crt/lmul.s
usr/src/libc/crt/lrem.s
usr/src/libc/crt/mcount.s
usr/src/libc/csu/crt0.s
usr/src/libc/csu/fcrt0.s
usr/src/libc/csu/fmcrt0.s
usr/src/libc/csu/mcrt0.s
usr/src/libc/gen/abort.s
usr/src/libc/gen/cuexit.s
usr/src/libc/gen/fakcu.s
usr/src/libc/gen/fakfp.s
usr/src/libc/gen/frexp11.s
usr/src/libc/gen/ldexp11.s
usr/src/libc/gen/ldfps.s
usr/src/libc/gen/modf11.s
usr/src/libc/gen/setjmp.s
usr/src/libc/stdio/doprnt.s
usr/src/libc/stdio/ffltpr.s
usr/src/libc/stdio/fltpr.s
usr/src/libc/sys/access.s
usr/src/libc/sys/acct.s
usr/src/libc/sys/alarm.s
usr/src/libc/sys/chdir.s
usr/src/libc/sys/chmod.s
usr/src/libc/sys/chown.s
usr/src/libc/sys/chroot.s
usr/src/libc/sys/close.s
usr/src/libc/sys/creat.s
usr/src/libc/sys/dup.s
usr/src/libc/sys/execl.s
usr/src/libc/sys/execle.s
usr/src/libc/sys/execv.s
usr/src/libc/sys/execve.s
usr/src/libc/sys/exit.s
usr/src/libc/sys/fork.s
usr/src/libc/sys/fstat.s
usr/src/libc/sys/getgid.s
usr/src/libc/sys/getpid.s
usr/src/libc/sys/getuid.s
usr/src/libc/sys/ioctl.s
usr/src/libc/sys/kill.s
usr/src/libc/sys/link.s
usr/src/libc/sys/lock.s
usr/src/libc/sys/lseek.s
usr/src/libc/sys/mknod.s
usr/src/libc/sys/mount.s
usr/src/libc/sys/mpxcall.s
usr/src/libc/sys/nice.s
usr/src/libc/sys/open.s
usr/src/libc/sys/pause.s
usr/src/libc/sys/phys.s
usr/src/libc/sys/pipe.s
usr/src/libc/sys/profil.s
usr/src/libc/sys/ptrace.s
usr/src/libc/sys/read.s
usr/src/libc/sys/sbrk.s
usr/src/libc/sys/setgid.s
usr/src/libc/sys/setuid.s
usr/src/libc/sys/signal.s
usr/src/libc/sys/stat.s
usr/src/libc/sys/stime.s
usr/src/libc/sys/sync.s
usr/src/libc/sys/time.s
usr/src/libc/sys/times.s
usr/src/libc/sys/umask.s
usr/src/libc/sys/umount.s
usr/src/libc/sys/unlink.s
usr/src/libc/sys/utime.s
usr/src/libc/sys/wait.s
usr/src/libc/sys/write.s
usr/src/libc/v6/syscall.s
usr/src/libc/v6/time.s

index d1c3706..564e16e 100644 (file)
-/ Long quotient
+; Long quotient
 
 .globl aldiv
 .globl csv, cret
 aldiv:
        jsr     r5,csv
-       mov     8.(r5),r3
+       mov     8(r5),r3
        sxt     r4
-       bpl     1f
+       bpl     0$
        neg     r3
-1:
-       cmp     r4,6.(r5)
+0$:
+       cmp     r4,6(r5)
        bne     hardldiv
        mov     4(r5),r1
        mov     2(r1),r2
        mov     (r1),r1
-       bge     1f
+       bge     1$
        neg     r1
        neg     r2
        sbc     r1
        com     r4
-1:
+1$:
        mov     r4,-(sp)
        clr     r0
        div     r3,r0
-       mov     r0,r4           /high quotient
+       mov     r0,r4           ;high quotient
        mov     r1,r0
        mov     r2,r1
        div     r3,r0
-       bvc     1f
-       sub     r3,r0           / this is the clever part
+       bvc     2$
+       sub     r3,r0           ; this is the clever part
        div     r3,r0
        tst     r1
        sxt     r1
-       add     r1,r0           / cannot overflow!
-1:
+       add     r1,r0           ; cannot overflow!
+2$:
        mov     r0,r1
        mov     r4,r0
        tst     (sp)+
-       bpl     9f
+       bpl     3$
        neg     r0
        neg     r1
        sbc     r0
-9:
-       mov     4.(r5),r2
+3$:
+       mov     4(r5),r2
        mov     r0,(r2)+
        mov     r1,(r2)
        jmp     cret
 
-/ The divisor is known to be >= 2^15 so only 16 cycles are needed.
+; The divisor is known to be >= 2^15 so only 16 cycles are needed.
 hardldiv:
        clr     -(sp)
-       mov     4.(r5),r0
+       mov     4(r5),r0
        mov     2(r0),r2
        mov     (r0),r1
-       bpl     1f
+       bpl     0$
        com     (sp)
        neg     r1
        neg     r2
        sbc     r1
-1:
+0$:
        clr     r0
-       mov     6.(r5),r3
-       bge     1f
+       mov     6(r5),r3
+       bge     1$
        neg     r3
-       neg     8.(r5)
+       neg     8(r5)
        sbc     r3
        com     (sp)
-1:
-       mov     $16.,r4
-1:
+1$:
+       mov     #16,r4
+2$:
        clc
        rol     r2
        rol     r1
        rol     r0
        cmp     r3,r0
-       bgt     3f
-       blt     2f
-       cmp     8.(r5),r1
-       blos    2f
-3:
-       sob     r4,1b
-       br      1f
-2:
-       sub     8.(r5),r1
+       bgt     3$
+       blt     4$
+       cmp     8(r5),r1
+       blos    4$
+3$:
+       sob     r4,2$
+       br      5$
+4$:
+       sub     8(r5),r1
        sbc     r0
        sub     r3,r0
        inc     r2
-       sob     r4,1b
-1:
+       sob     r4,2$
+5$:
        mov     r2,r1
        clr     r0
        tst     (sp)+
-       beq     1f
+       beq     6$
        neg     r0
        neg     r1
        sbc     r0
-1:
-       mov     4.(r5),r2
+6$:
+       mov     4(r5),r2
        mov     r0,(r2)+
        mov     r1,(r2)
        jmp     cret
index d1d8b84..be552f3 100644 (file)
@@ -1,7 +1,7 @@
-/
-/ 32-bit multiplication routine for fixed pt hardware.
-/  Implements *= operator
-/ Credit to an unknown author who slipped it under the door.
+;
+; 32-bit multiplication routine for fixed pt hardware.
+;  Implements *= operator
+; Credit to an unknown author who slipped it under the door.
 .globl almul
 .globl csv, cret
 
@@ -11,9 +11,9 @@ almul:
        mov     2(r4),r2
        sxt     r1
        sub     (r4),r1
-       mov     8.(r5),r0
+       mov     8(r5),r0
        sxt     r3
-       sub     6.(r5),r3
+       sub     6(r5),r3
        mul     r0,r1
        mul     r2,r3
        add     r1,r3
index 720bd54..3c700bb 100644 (file)
@@ -1,92 +1,92 @@
-/ Long remainder
+; Long remainder
 
 .globl alrem
 .globl csv, cret
 alrem:
        jsr     r5,csv
-       mov     8.(r5),r3
+       mov     8(r5),r3
        sxt     r4
-       bpl     1f
+       bpl     0$
        neg     r3
-1:
-       cmp     r4,6.(r5)
+0$:
+       cmp     r4,6(r5)
        bne     hardlrem
-       mov     4.(r5),r0
+       mov     4(r5),r0
        mov     2(r0),r2
        mov     (r0),r1
        mov     r1,r4
-       bge     1f
+       bge     1$
        neg     r1
        neg     r2
        sbc     r1
-1:
+1$:
        clr     r0
        div     r3,r0
        mov     r1,r0
        mov     r2,r1
        div     r3,r0
-       bvc     1f
+       bvc     2$
        sub     r3,r0
        div     r3,r0
        tst     r1
-       beq     9f
+       beq     3$
        add     r3,r1
-1:
+2$:
        tst     r4
-       bpl     9f
+       bpl     3$
        neg     r1
-9:
+3$:
        sxt     r0
-       mov     4.(r5),r3
+       mov     4(r5),r3
        mov     r0,(r3)+
        mov     r1,(r3)
        jmp     cret
 
-/ The divisor is known to be >= 2^15.  Only 16 cycles are
-/ needed to get a remainder.
+; The divisor is known to be >= 2^15.  Only 16 cycles are
+; needed to get a remainder.
 hardlrem:
-       mov     4.(r5),r0
+       mov     4(r5),r0
        mov     2(r0),r2
        mov     (r0),r1
-       bpl     1f
+       bpl     0$
        neg     r1
        neg     r2
        sbc     r1
-1:
+0$:
        clr     r0
-       mov     6.(r5),r3
-       bge     1f
+       mov     6(r5),r3
+       bge     1$
        neg     r3
-       neg     8.(r5)
+       neg     8(r5)
        sbc     r3
-1:
-       mov     $16.,r4
-1:
+1$:
+       mov     #16,r4
+2$:
        clc
        rol     r2
        rol     r1
        rol     r0
        cmp     r3,r0
-       blt     2f
-       bgt     3f
-       cmp     8.(r5),r1
-       blos    2f
-3:
-       sob     r4,1b
-       br      1f
-2:
-       sub     8.(r5),r1
+       blt     3$
+       bgt     4$
+       cmp     8(r5),r1
+       blos    3$
+4$:
+       sob     r4,2$
+       br      5$
+3$:
+       sub     8(r5),r1
        sbc     r0
        sub     r3,r0
-       sob     r4,1b
-1:
-       mov     4.(r5),r3
+       sob     r4,2$
+5$:
+       mov     4(r5),r3
        tst     (r3)
-       bge     1f
+       bge     6$
        neg     r0
        neg     r1
        sbc     r0
-1:
+6$:
        mov     r0,(r3)+
        mov     r1,(r3)
        jmp     cret
index d7e2231..2ca7ee3 100644 (file)
@@ -1,12 +1,12 @@
-/ C return sequence which
-/ sets errno, returns -1.
+; C return sequence which
+; sets errno, returns -1.
 
 .globl cerror
 .comm  _errno,2
 
 cerror:
        mov     r0,_errno
-       mov     $-1,r0
+       mov     #-1,r0
        mov     r5,sp
        mov     (sp)+,r5
        rts     pc
index 858b79b..b000c46 100644 (file)
@@ -1,4 +1,4 @@
-/ C register save and restore -- version 7/75
+; C register save and restore -- version 7/75
 
 .globl csv
 .globl cret
@@ -9,7 +9,7 @@ csv:
        mov     r4,-(sp)
        mov     r3,-(sp)
        mov     r2,-(sp)
-       jsr     pc,(r0)         / jsr part is sub $2,sp
+       jsr     pc,(r0)         ; jsr part is sub $2,sp
 
 cret:
        mov     r5,r2
index 31aafe2..c3be6b0 100644 (file)
@@ -1,95 +1,95 @@
-/ Long quotient
+; Long quotient
 
 .globl ldiv
 .globl csv, cret
 
 ldiv:
        jsr     r5,csv
-       mov     10.(r5),r3
+       mov     10(r5),r3
        sxt     r4
-       bpl     1f
+       bpl     0$
        neg     r3
-1:
-       cmp     r4,8.(r5)
+0$:
+       cmp     r4,8(r5)
        bne     hardldiv
-       mov     6.(r5),r2
-       mov     4.(r5),r1
-       bge     1f
+       mov     6(r5),r2
+       mov     4(r5),r1
+       bge     1$
        neg     r1
        neg     r2
        sbc     r1
        com     r4
-1:
+1$:
        mov     r4,-(sp)
        clr     r0
        div     r3,r0
-       mov     r0,r4           /high quotient
+       mov     r0,r4           ;high quotient
        mov     r1,r0
        mov     r2,r1
        div     r3,r0
-       bvc     1f
-       sub     r3,r0           / this is the clever part
+       bvc     2$
+       sub     r3,r0           ; this is the clever part
        div     r3,r0
        tst     r1
        sxt     r1
-       add     r1,r0           / cannot overflow!
-1:
+       add     r1,r0           ; cannot overflow!
+2$:
        mov     r0,r1
        mov     r4,r0
        tst     (sp)+
-       bpl     9f
+       bpl     3$
        neg     r0
        neg     r1
        sbc     r0
-9:
+3$:
        jmp     cret
 
-/ The divisor is known to be >= 2^15 so only 16 cycles are needed.
+; The divisor is known to be >= 2^15 so only 16 cycles are needed.
 hardldiv:
        clr     -(sp)
-       mov     6.(r5),r2
-       mov     4.(r5),r1
-       bpl     1f
+       mov     6(r5),r2
+       mov     4(r5),r1
+       bpl     0$
        com     (sp)
        neg     r1
        neg     r2
        sbc     r1
-1:
+0$:
        clr     r0
-       mov     8.(r5),r3
-       bge     1f
+       mov     8(r5),r3
+       bge     1$
        neg     r3
-       neg     10.(r5)
+       neg     10(r5)
        sbc     r3
        com     (sp)
-1:
-       mov     $16.,r4
-1:
+1$:
+       mov     #16,r4
+2$:
        clc
        rol     r2
        rol     r1
        rol     r0
        cmp     r3,r0
-       bgt     3f
-       blt     2f
-       cmp     10.(r5),r1
-       blos    2f
-3:
-       sob     r4,1b
-       br      1f
-2:
-       sub     10.(r5),r1
+       bgt     3$
+       blt     4$
+       cmp     10(r5),r1
+       blos    4$
+3$:
+       sob     r4,2$
+       br      5$
+4$:
+       sub     10(r5),r1
        sbc     r0
        sub     r3,r0
        inc     r2
-       sob     r4,1b
-1:
+       sob     r4,2$
+5$:
        mov     r2,r1
        clr     r0
        tst     (sp)+
-       beq     1f
+       beq     6$
        neg     r0
        neg     r1
        sbc     r0
-1:
+6$:
        jmp     cret
index 1d24660..98f9a66 100644 (file)
@@ -1,7 +1,7 @@
-/
-/ 32-bit multiplication routine for fixed pt hardware.
-/  Implements * operator
-/ Credit to an unknown author who slipped it under the door.
+;
+; 32-bit multiplication routine for fixed pt hardware.
+;  Implements * operator
+; Credit to an unknown author who slipped it under the door.
 .globl lmul
 .globl csv, cret
 
@@ -10,9 +10,9 @@ lmul:
        mov     6(r5),r2
        sxt     r1
        sub     4(r5),r1
-       mov     10.(r5),r0
+       mov     10(r5),r0
        sxt     r3
-       sub     8.(r5),r3
+       sub     8(r5),r3
        mul     r0,r1
        mul     r2,r3
        add     r1,r3
index b37a3d8..e98975e 100644 (file)
@@ -1,85 +1,85 @@
-/ Long remainder
+; Long remainder
 
 .globl lrem
 .globl csv, cret
 
 lrem:
        jsr     r5,csv
-       mov     10.(r5),r3
+       mov     10(r5),r3
        sxt     r4
-       bpl     1f
+       bpl     0$
        neg     r3
-1:
-       cmp     r4,8.(r5)
+0$:
+       cmp     r4,8(r5)
        bne     hardlrem
-       mov     6.(r5),r2
-       mov     4.(r5),r1
+       mov     6(r5),r2
+       mov     4(r5),r1
        mov     r1,r4
-       bge     1f
+       bge     1$
        neg     r1
        neg     r2
        sbc     r1
-1:
+1$:
        clr     r0
        div     r3,r0
        mov     r1,r0
        mov     r2,r1
        div     r3,r0
-       bvc     1f
+       bvc     2$
        sub     r3,r0
        div     r3,r0
        tst     r1
-       beq     9f
+       beq     3$
        add     r3,r1
-1:
+2$:
        tst     r4
-       bpl     9f
+       bpl     3$
        neg     r1
-9:
+3$:
        sxt     r0
        jmp     cret
 
-/ The divisor is known to be >= 2^15.  Only 16 cycles are
-/ needed to get a remainder.
+; The divisor is known to be >= 2^15.  Only 16 cycles are
+; needed to get a remainder.
 hardlrem:
-       mov     6.(r5),r2
-       mov     4.(r5),r1
-       bpl     1f
+       mov     6(r5),r2
+       mov     4(r5),r1
+       bpl     0$
        neg     r1
        neg     r2
        sbc     r1
-1:
+0$:
        clr     r0
-       mov     8.(r5),r3
-       bge     1f
+       mov     8(r5),r3
+       bge     1$
        neg     r3
-       neg     10.(r5)
+       neg     10(r5)
        sbc     r3
-1:
-       mov     $16.,r4
-1:
+1$:
+       mov     #16,r4
+2$:
        clc
        rol     r2
        rol     r1
        rol     r0
        cmp     r3,r0
-       blt     2f
-       bgt     3f
-       cmp     10.(r5),r1
-       blos    2f
-3:
-       sob     r4,1b
-       br      1f
-2:
-       sub     10.(r5),r1
+       blt     3$
+       bgt     4$
+       cmp     10(r5),r1
+       blos    3$
+4$:
+       sob     r4,2$
+       br      5$
+3$:
+       sub     10(r5),r1
        sbc     r0
        sub     r3,r0
-       sob     r4,1b
-1:
+       sob     r4,2$
+5$:
        tst     4(r5)
-       bge     1f
+       bge     6$
        neg     r0
        neg     r1
        sbc     r0
-1:
+6$:
        jmp     cret
index a3d91d2..ca781c0 100644 (file)
@@ -1,20 +1,20 @@
-/ count subroutine calls during profiling
+; count subroutine calls during profiling
 
 .globl mcount
 .comm  countbase,2
 
 mcount:
        mov     (r0),r1
-       bne     1f
+       bne     0$
        mov     countbase,r1
-       beq     2f
-       add     $6,countbase
+       beq     1$
+       add     #6,countbase
        mov     (sp),(r1)+
        mov     r1,(r0)
-1:
+0$:
        inc     2(r1)
-       bne     2f
+       bne     1$
        inc     (r1)
-2:
+1$:
        rts     pc
 
index 816c7fd..bd8121a 100644 (file)
@@ -1,36 +1,36 @@
-/ C runtime startoff
+; C runtime startoff
 
 .globl _exit, _environ
 .globl start
 .globl _main
-exit = 1.
+exit = 1
 
 start:
        setd
        mov     2(sp),r0
        clr     -2(r0)
        mov     sp,r0
-       sub     $4,sp
+       sub     #4,sp
        mov     4(sp),(sp)
        tst     (r0)+
        mov     r0,2(sp)
-1:
+0$:
        tst     (r0)+
-       bne     1b
+       bne     0$
        cmp     r0,*2(sp)
-       blo     1f
+       blo     1$
        tst     -(r0)
-1:
+1$:
        mov     r0,4(sp)
        mov     r0,_environ
        jsr     pc,_main
        cmp     (sp)+,(sp)+
        mov     r0,(sp)
-       jsr     pc,*$_exit
+       jsr     pc,*#_exit
        sys     exit
 
-.bss
+.area  bss
 _environ:
-       .=.+2
-.data
-       .=.+2           / loc 0 for I/D; null ptr points here.
+       .ds     2
+.area  data
+       .ds     2               ; loc 0 for I/D; null ptr points here.
index a61ca3b..dd4494d 100644 (file)
@@ -1,39 +1,41 @@
-/ C runtime startoff
-/ with floating point interpreter
+; C runtime startoff
+; with floating point interpreter
 
 .globl fptrap
 .globl _exit
 .globl _main
 .globl _environ
-exit = 1.
-signal = 48.
+exit = 1
+signal = 48
 
 start:
-       sys     signal; 4; fptrap
+       sys     signal
+.dw    4
+.dw    fptrap
        setd
        mov     2(sp),r0
        clr     -2(r0)
        mov     sp,r0
-       sub     $4,sp
+       sub     #4,sp
        mov     4(sp),(sp)
        tst     (r0)+
        mov     r0,2(sp)
-1:
+0$:
        tst     (r0)+
-       bne     1b
+       bne     0$
        cmp     r0,*2(sp)
-       blo     1f
+       blo     1$
        tst     -(r0)
-1:
+1$:
        mov     r0,4(sp)
        mov     r0,_environ
        jsr     pc,_main
        cmp     (sp)+,(sp)+
        mov     r0,(sp)
-       jsr     pc,*$_exit
+       jsr     pc,*#_exit
        sys     exit
-.bss
+.area  bss
 _environ:
-       .=.+2
-.data
-       .=.+2
+       .ds     2
+.area  data
+       .ds     2
index 330b387..b1cbf63 100644 (file)
@@ -1,9 +1,9 @@
-/ C runtime startoff including monitoring
+; C runtime startoff including monitoring
 
-cbufs  = 300.
-exit   = 1.
-write  = 4.
-signal = 48.
+cbufs  = 300
+exit   = 1
+write  = 4
+signal = 48
 
 .globl _monitor
 .globl _sbrk
@@ -17,56 +17,63 @@ signal      = 48.
 
 
 start:
-       sys     signal; 4; fptrap
+       sys     signal
+.dw    4
+.dw    fptrap
        setd
        mov     2(sp),r0
        clr     -2(r0)
        mov     sp,r0
-       sub     $4,sp
+       sub     #4,sp
        mov     4(sp),(sp)
        tst     (r0)+
        mov     r0,2(sp)
-1:
+0$:
        tst     (r0)+
-       bne     1b
+       bne     0$
        cmp     r0,*2(sp)
-       blo     1f
+       blo     1$
        tst     -(r0)
-1:
+1$:
        mov     r0,4(sp)
        mov     r0,_environ
 
-       mov     $_etext,r1
-       sub     $eprol,r1
-       add     $7,r1
-       ash     $-3,r1
-       bic     $!17777,r1
-       mov     $cbufs,-(sp)
-       add     $3*[cbufs+1],r1
+       mov     #_etext,r1
+       sub     #eprol,r1
+       add     #7,r1
+       ash     #-3,r1
+       bic     #!0o17777,r1
+       mov     #cbufs,-(sp)
+       add     #3*[cbufs+1],r1
        mov     r1,-(sp)
        asl     r1
        mov     r1,-(sp)
        jsr     pc,_sbrk
        tst     (sp)+
-       cmp     r0,$-1
-       beq     9f
+       cmp     r0,#-1
+       beq     2$
        mov     r0,-(sp)
-       add     $6,r0
+       add     #6,r0
        mov     r0,countbase
-       mov     $_etext,-(sp)
-       mov     $eprol,-(sp)
+       mov     #_etext,-(sp)
+       mov     #eprol,-(sp)
        jsr     pc,_monitor
-       add     $10.,sp
+       add     #10,sp
        jsr     pc,_main
        cmp     (sp)+,(sp)+
        mov     r0,(sp)
        jsr     pc,_exit
 
-9:
-       mov     $2,r0
-       sys     write; 8f; 9f-8f
+2$:
+       mov     #2,r0
+       sys     write
+.dw    3$
+.dw    4$-3$
 
-.data; 8: <No space for monitor buffer\n>; 9:.even; .text
+.area  data
+3$: .ascii     /No space for monitor buffer\n/
+4$:.even
+.area  text
 
 _exit:
        mov     r5,-(sp)
@@ -78,10 +85,10 @@ _exit:
        mov     4(r5),r0
        sys     exit
 eprol:
-.bss
+.area  bss
 _environ:
-       .=.+2
+       .ds     2
 countbase:
-       .=.+2
-.data
-       .=.+2
+       .ds     4
+.area  data
+       .ds     30
index 3c1a21c..32cd511 100644 (file)
@@ -1,6 +1,6 @@
-/ C runtime startoff including monitoring
+; C runtime startoff including monitoring
 
-cbufs  = 300.
+cbufs  = 300
 exit   = 1
 write  = 4
 
@@ -19,51 +19,56 @@ start:
        mov     2(sp),r0
        clr     -2(r0)
        mov     sp,r0
-       sub     $4,sp
+       sub     #4,sp
        mov     4(sp),(sp)
        tst     (r0)+
        mov     r0,2(sp)
-1:
+0$:
        tst     (r0)+
-       bne     1b
+       bne     0$
        cmp     r0,*2(sp)
-       blo     1f
+       blo     1$
        tst     -(r0)
-1:
+1$:
        mov     r0,4(sp)
        mov     r0,_environ
 
-       mov     $_etext,r1
-       sub     $eprol,r1
-       add     $7,r1
-       ash     $-3,r1
-       bic     $!17777,r1
-       mov     $cbufs,-(sp)
-       add     $3*[cbufs+1],r1
+       mov     #_etext,r1
+       sub     #eprol,r1
+       add     #7,r1
+       ash     #-3,r1
+       bic     #!0o17777,r1
+       mov     #cbufs,-(sp)
+       add     #3*[cbufs+1],r1
        mov     r1,-(sp)
        asl     r1
        mov     r1,-(sp)
        jsr     pc,_sbrk
        tst     (sp)+
-       cmp     r0,$-1
-       beq     9f
+       cmp     r0,#-1
+       beq     2$
        mov     r0,-(sp)
-       add     $6,r0
+       add     #6,r0
        mov     r0,countbase
-       mov     $_etext,-(sp)
-       mov     $eprol,-(sp)
+       mov     #_etext,-(sp)
+       mov     #eprol,-(sp)
        jsr     pc,_monitor
-       add     $10.,sp
+       add     #10,sp
        jsr     pc,_main
        cmp     (sp)+,(sp)+
        mov     r0,(sp)
        jsr     pc,_exit
 
-9:
-       mov     $2,r0
-       sys     write; 8f; 9f-8f
+2$:
+       mov     #2,r0
+       sys     write
+.dw    3$
+.dw    4$-3$
 
-.data; 8: <No space for monitor buffer\n>; 9:.even; .text
+.area  data
+3$: .ascii     /No space for monitor buffer\n/
+4$:.even
+.area  text
 
 _exit:
        mov     r5,-(sp)
@@ -75,10 +80,10 @@ _exit:
        mov     4(r5),r0
        sys     exit
 eprol:
-.bss
+.area  bss
 _environ:
-       .=.+2
+       .ds     2
 countbase:
-       .=.+2
-.data
-       .=.+2
+       .ds     4
+.area  data
+       .ds     30
index 6bdb9ad..0d67956 100644 (file)
@@ -1,4 +1,4 @@
-/ C library -- abort
+; C library -- abort
 
 .globl _abort
 iot    = 4
index f4ffb99..497ba40 100644 (file)
@@ -1,7 +1,7 @@
-/ C library -- exit
+; C library -- exit
 
-/ exit(code)
-/ code is return in r0 to system
+; exit(code)
+; code is return in r0 to system
 
 .globl _exit
 .globl __cleanup
index f8d74f6..53eb6e0 100644 (file)
@@ -1,5 +1,5 @@
-/
-/ dummy cleanup routine if none supplied by user.
+;
+; dummy cleanup routine if none supplied by user.
 
 .globl __cleanup
 
index 6af0922..262093f 100644 (file)
@@ -1,12 +1,14 @@
-/ fakefp -- fake floating point simulator
+; fakefp -- fake floating point simulator
 
 .globl fptrap
-signal = 48.
+signal = 48
 rti = 2
 
 fptrap:
-       sub     $2,(sp)
+       sub     #2,(sp)
        mov     r0,-(sp)
-       sys     signal; 4; 0
+       sys     signal
+.dw    4
+.dw    0
        mov     (sp)+,r0
        rti
index 46fc518..65b3bec 100644 (file)
@@ -1,7 +1,7 @@
-/  double frexp(x, ip)
-/  double x; int *ip;
-/  returns a fractional part 1/16 <= |value| < 1
-/ and stores an exponent so x = value * 2^(*ip)
+;  double frexp(x, ip)
+;  double x; int *ip;
+;  returns a fractional part 1/16 <= |value| < 1
+; and stores an exponent so x = value * 2^(*ip)
 
 .globl _frexp
 .globl csv, cret
@@ -12,5 +12,5 @@ _frexp:
        movei   fr0,r0
        clr     r1
        movie   r1,fr0
-       mov     r0,*12.(r5)
+       mov     r0,*12(r5)
        jmp     cret
index 1abb9d5..9c99e32 100644 (file)
@@ -1,31 +1,34 @@
-/ double ldexp(number, exp)
-/ double number
-/  -- returns number * 2^exp
+; double ldexp(number, exp)
+; double number
+;  -- returns number * 2^exp
 
 .globl _ldexp
 .globl csv, cret
 
-ERANGE = 34.
+ERANGE = 34
 
 _ldexp:
        jsr     r5,csv
        movf    4(r5),fr0
        movei   fr0,r0
-       add     12.(r5),r0
+       add     12(r5),r0
        movie   r0,fr0
        cfcc
-       bvc     1f
-       bmi     2f
+       bvc     0$
+       bmi     1$
        movf    huge,fr0
-       br      3f
-2:
+       br      2$
+1$:
        movf    huge,fr0
        negf    fr0
-3:
-       mov     $ERANGE,_errno
-1:
+2$:
+       mov     #ERANGE,_errno
+0$:
        jmp     cret
 
        .comm   _errno,2
-       .data
-huge:  077777; 0177776; 0177777; 0177777
+       .area   data
+huge:  .dw     0o77777
+.dw    0o177776
+.dw    0o177777
+.dw    0o177777
index 800cf62..fc6ca1d 100644 (file)
@@ -1,6 +1,6 @@
-ldfps = 170100^tst
-/
-/ ldfps(number);
+ldfps = 0o170100^tst
+;
+; ldfps(number);
 
 .globl _ldfps
 _ldfps:
index cec82ca..5556fe1 100644 (file)
@@ -1,15 +1,15 @@
-/ double modf(x, *fp)
-/ double x, *fp;
-/ return fractional part
-/ stash integer part (as double)
+; double modf(x, *fp)
+; double x, *fp;
+; return fractional part
+; stash integer part (as double)
 
 .globl _modf
 .globl csv, cret
-one    = 040200
+one    = 0o40200
 
 _modf:
        jsr     r5,csv
        movf    4(r5),fr0
-       modf    $one,fr0
-       movf    fr1,*12.(r5)
+       modf    #one,fr0
+       movf    fr1,*12(r5)
        jmp     cret
index 00dabcd..054c998 100644 (file)
@@ -1,12 +1,12 @@
-/ C library -- setjmp, longjmp
+; C library -- setjmp, longjmp
 
-/      longjmp(a,v)
-/ will generate a "return(v)" from
-/ the last call to
-/      setjmp(a)
-/ by restoring sp, r5, pc from `a'
-/ and doing a return.
-/
+;      longjmp(a,v)
+; will generate a "return(v)" from
+; the last call to
+;      setjmp(a)
+; by restoring sp, r5, pc from `a'
+; and doing a return.
+;
 
 .globl _setjmp
 .globl _longjmp
@@ -24,19 +24,19 @@ _longjmp:
        jsr     r5,csv
        mov     4(r5),r1
        mov     6(r5),r0
-       bne     1f
-       mov     $1,r0
-1:
+       bne     0$
+       mov     #1,r0
+0$:
        cmp     (r5),(r1)
-       beq     1f
+       beq     1$
        mov     (r5),r5
-       bne     1b
-/ panic -- r2-r4 lost
+       bne     0$
+; panic -- r2-r4 lost
        mov     (r1)+,r5
        mov     (r1)+,sp
        mov     (r1),(sp)
        rts     pc
-1:
+1$:
        mov     4(r1),2(r5)
        jmp     cret
 
index bed67a0..b4f5e6e 100644 (file)
@@ -1,11 +1,11 @@
-/ C library -- conversions
+; C library -- conversions
 
-width=-8.
-formp=-10.
-rjust=-12.
-ndfnd=-14.
-ndigit=-16.
-zfill=-18.
+width=-8
+formp=-10
+rjust=-12
+ndfnd=-14
+ndigit=-16
+zfill=-18
 .globl __doprnt
 
 .globl pfloat
@@ -18,88 +18,105 @@ zfill=-18.
 
 __doprnt:
        jsr     r5,csv
-       sub     $128.+12.,sp
-       mov     4(r5),formp(r5)         / format
+       sub     #128+12,sp
+       mov     4(r5),formp(r5)         ; format
        mov     6(r5),r4
 loop:
        mov     sp,r3
        mov     formp(r5),r1
-2:
+0$:
        movb    (r1)+,r2
-       beq     2f
-       cmp     r2,$'%
-       beq     2f
+       beq     1$
+       cmp     r2,#'%
+       beq     1$
        movb    r2,(r3)+
-       br      2b
-2:
+       br      0$
+1$:
        mov     r1,formp(r5)
        cmp     r3,sp
-       beq     2f
+       beq     2$
        mov     sp,r0
-       mov     8(r5),-(sp)
+       mov     0o10(r5),-(sp)
        clr     -(sp)
        mov     r3,-(sp)
        sub     r0,(sp)
        mov     r0,-(sp)
        jsr     pc,__strout
-       add     $8,sp
-2:
+       add     #0o10,sp
+2$:
        tst     r2
-       bne     2f
+       bne     3$
        jmp     cret
-2:
+3$:
        mov     sp,r3
-2:
+4$:
        clr     rjust(r5)
        clr     ndigit(r5)
-       mov     $' ,zfill(r5)
-       cmpb    *formp(r5),$'-
-       bne     2f
+       mov     #' ,zfill(r5)
+       cmpb    *formp(r5),#'-
+       bne     5$
        inc     formp(r5)
        inc     rjust(r5)
-2:
-       cmpb    *formp(r5),$'0
-       bne     2f
-       mov     $'0,zfill(r5)
-2:
+5$:
+       cmpb    *formp(r5),#'0
+       bne     6$
+       mov     #'0,zfill(r5)
+6$:
        jsr     r3,gnum
        mov     r1,width(r5)
        clr     ndfnd(r5)
-       cmp     r0,$'.
-       bne     1f
+       cmp     r0,#'.
+       bne     7$
        jsr     r3,gnum
        mov     r1,ndigit(r5)
-1:
-       mov     $swtab,r1
-1:
+7$:
+       mov     #swtab,r1
+8$:
        mov     (r1)+,r2
-       bne     2f
+       bne     9$
        movb    r0,(r3)+
        jmp     prbuf
-2:
+9$:
        cmp     r0,(r1)+
-       bne     1b
+       bne     8$
        jmp     (r2)
-       .data
+       .area   data
 swtab:
-       decimal;        'd
-       octal;          'o
-       hex;            'x
-       float;          'f
-       scien;          'e
-       general;        'g
-       charac;         'c
-       string;         's
-       longorunsg;     'l
-       longorunsg;     'L
-       unsigned;       'u
-       remote;         'r
-       long;           'D
-       loct;           'O
-       lhex;           'X
-       lunsigned;      'U
-       0;  0
-       .text
+       .dw     decimal
+.dw    'd
+       .dw     octal
+.dw    'o
+       .dw     hex
+.dw    'x
+       .dw     float
+.dw    'f
+       .dw     scien
+.dw    'e
+       .dw     general
+.dw    'g
+       .dw     charac
+.dw    'c
+       .dw     string
+.dw    's
+       .dw     longorunsg
+.dw    'l
+       .dw     longorunsg
+.dw    'L
+       .dw     unsigned
+.dw    'u
+       .dw     remote
+.dw    'r
+       .dw     long
+.dw    'D
+       .dw     loct
+.dw    'O
+       .dw     lhex
+.dw    'X
+       .dw     lunsigned
+.dw    'U
+       .dw     0
+.dw    0
+       .area   text
 
 general:
        mov     ndigit(r5),r0
@@ -110,144 +127,144 @@ general:
 longorunsg:
        movb    *formp(r5),r0
        inc     formp(r5)
-       cmp     r0,$'o
+       cmp     r0,#'o
        beq     loct
-       cmp     r0,$'x
+       cmp     r0,#'x
        beq     lhex
-       cmp     r0,$'d
+       cmp     r0,#'d
        beq     long
-       cmp     r0,$'u
+       cmp     r0,#'u
        beq     lunsigned
        dec     formp(r5)
        br      unsigned
 
 octal:
        clr     r0
-       br      1f
+       br      0$
 loct:
        mov     (r4)+,r0
-1:
-       mov     $8.,r2
-       br      2f
+0$:
+       mov     #8,r2
+       br      1$
 
 hex:
        clr     r0
-       br      1f
+       br      0$
 
 lhex:
        mov     (r4)+,r0
-1:
-       mov     $16.,r2
-2:
+0$:
+       mov     #16,r2
+1$:
        mov     (r4)+,r1
        br      compute
 
 decimal:
        mov     (r4)+,r1
        sxt     r0
-       bmi     3f
-       br      2f
+       bmi     0$
+       br      1$
 
 unsigned:
        clr     r0
-       br      1f
+       br      0$
 
 long:
        mov     (r4)+,r0
-       bge     1f
+       bge     0$
        mov     (r4)+,r1
-3:
+1$:
        neg     r0
        neg     r1
        sbc     r0
-       movb    $'-,(r3)+
-       br      2f
+       movb    #'-,(r3)+
+       br      2$
 
 lunsigned:
        mov     (r4)+,r0
-1:
+0$:
        mov     (r4)+,r1
-2:
-       mov     $10.,r2
+1$:
+       mov     #10,r2
 
-/
-/ Algorithm courtesy Keith Davis
-/
+;
+; Algorithm courtesy Keith Davis
+;
 compute:
        mov     r5,-(sp)
        mov     r4,-(sp)
        mov     r0,r4
        mov     ndigit(r5),r0
        mov     r1,r5
-       ashc    $0,r4
-       beq     1f
+       ashc    #0,r4
+       beq     0$
        tst     r0
-       beq     1f
-       movb    $'0,(r3)+
-1:
-       jsr     pc,1f
+       beq     0$
+       movb    #'0,(r3)+
+0$:
+       jsr     pc,1$
        mov     (sp)+,r4
        mov     (sp)+,r5
        br      prbuf
 
-1:
+1$:
        clr     r0
        mov     r4,r1
-       beq     2f
+       beq     2$
        div     r2,r0
        mov     r0,r4
        mov     r1,r0
-2:
+2$:
        mov     r5,r1
        asl     r2
        div     r2,r0
        asr     r2
        asl     r0
        cmp     r2,r1
-       bgt     2f
+       bgt     3$
        sub     r2,r1
        inc     r0
-2:
+3$:
        mov     r1,-(sp)
        mov     r0,r5
-       bne     2f
+       bne     4$
        tst     r4
-       beq     1f
-2:
-       jsr     pc,1b
-1:
+       beq     5$
+4$:
+       jsr     pc,1$
+5$:
        mov     (sp)+,r0
-       add     $'0,r0
-       cmp     r0,$'9
-       ble     1f
-       add     $'a-'0-10.,r0
-1:
+       add     #'0,r0
+       cmp     r0,#'9
+       ble     6$
+       add     #'a-'0-10,r0
+6$:
        movb    r0,(r3)+
        rts     pc
        
 charac:
-       mov     $' ,zfill(r5)
+       mov     #' ,zfill(r5)
        mov     (r4)+,r0
-       bic     $!377,r0
+       bic     #!0o377,r0
        beq     prbuf
        movb    r0,(r3)+
        br      prbuf
 
 string:
-       mov     $' ,zfill(r5)
+       mov     #' ,zfill(r5)
        mov     ndigit(r5),r1
        mov     (r4),r2
        mov     r2,r3
-       bne     1f
-       mov     $nulstr,r2
+       bne     0$
+       mov     #nulstr,r2
        mov     r2,r3
        mov     r2,(r4)
-1:
+0$:
        tstb    (r2)+
-       beq     1f
+       beq     1$
        inc     r3
-       sob     r1,1b
-1:
+       sob     r1,0$
+1$:
        mov     (r4)+,r2
        br      prstr
 
@@ -261,9 +278,9 @@ scien:
        mov     ndigit(r5),r0
        inc     r0
        tst     ndfnd(r5)
-       bne     1f
-       mov     $7,r0
-1:
+       bne     0$
+       mov     #7,r0
+0$:
        mov     pc,r2
        jsr     pc,pscien
        br      prbuf
@@ -279,45 +296,45 @@ prstr:
        sub     r2,r3
        mov     width(r5),r1
        sub     r3,r1
-       bge     1f
+       bge     0$
        clr     r1
-1:
+0$:
        tst     rjust(r5)
-       bne     1f
+       bne     1$
        neg     r1
-1:
+1$:
        mov     zfill(r5),-(sp)
-       mov     8(r5),-(sp)
+       mov     0o10(r5),-(sp)
        mov     r1,-(sp)
        mov     r3,-(sp)
        mov     r2,-(sp)
        jsr     pc,__strout
-       add     $10.,sp
+       add     #10,sp
        jmp     loop
 
 gnum:
        clr     ndfnd(r5)
        clr     r1
-1:
+0$:
        movb    *formp(r5),r0
        inc     formp(r5)
-       sub     $'0,r0
-       cmp     r0,$'*-'0
-       bne     2f
+       sub     #'0,r0
+       cmp     r0,#'*-'0
+       bne     1$
        mov     (r4)+,r0
-       br      3f
-2:
-       cmp     r0,$9.
-       bhi     1f
-3:
+       br      2$
+1$:
+       cmp     r0,#9
+       bhi     3$
+2$:
        inc     ndfnd(r5)
-       mul     $10.,r1
+       mul     #10,r1
        add     r0,r1
-       br      1b
-1:
-       add     $'0,r0
+       br      0$
+3$:
+       add     #'0,r0
        rts     r3
 
-.data
+.area  data
 nulstr:
-       <(null)\0>
+       .ascii  /(null)\0/
index d816bf8..fa7519e 100644 (file)
@@ -1,4 +1,4 @@
-/ C library-- fake floating output
+; C library-- fake floating output
 
 .globl pfloat
 .globl pscien
@@ -7,6 +7,6 @@
 pfloat:
 pscien:
 pgen:
-       add     $8,r4
-       movb    $'?,(r3)+
+       add     #0o10,r4
+       movb    #'?,(r3)+
        rts     pc
index 51cf7da..05bf103 100644 (file)
@@ -1,4 +1,4 @@
-/ C library-- floating output
+; C library-- floating output
 
 .globl pfloat
 .globl pscien
 .globl _fcvt
 .globl _gcvt
 
-fltused:               / force loading
+fltused:               ; force loading
 
 pgen:
        mov     r3,-(sp)
        mov     r0,-(sp)
        tst     r2
-       bne     1f
-       mov     $6,(sp)
-1:
+       bne     0$
+       mov     #6,(sp)
+0$:
        movf    (r4)+,fr0
        movf    fr0,-(sp)
        jsr     pc,_gcvt
-       add     $8+2+2,sp
-1:
+       add     #0o10+2+2,sp
+1$:
        tstb    (r3)+
-       bne     1b
+       bne     1$
        dec     r3
        rts     pc
 
 pfloat:
-       mov     $sign,-(sp)
-       mov     $decpt,-(sp)
+       mov     #sign,-(sp)
+       mov     #decpt,-(sp)
        tst     r2
-       bne     1f
-       mov     $6,r0
-1:
+       bne     0$
+       mov     #6,r0
+0$:
        mov     r0,-(sp)
        mov     r0,ndigit
        movf    (r4)+,fr0
        movf    fr0,-(sp)
        jsr     pc,_fcvt
-       add     $8+2+2+2,sp
+       add     #0o10+2+2+2,sp
        tst     sign
-       beq     1f
-       movb    $'-,(r3)+
-1:
+       beq     1$
+       movb    #'-,(r3)+
+1$:
        mov     decpt,r2
-       bgt     1f
-       movb    $'0,(r3)+
-1:
+       bgt     2$
+       movb    #'0,(r3)+
+2$:
        mov     r2,r1
-       ble     1f
-2:
+       ble     3$
+4$:
        movb    (r0)+,(r3)+
-       sob     r1,2b
-1:
+       sob     r1,4$
+3$:
        mov     ndigit,r1
-       beq     1f
-       movb    $'.,(r3)+
-1:
+       beq     5$
+       movb    #'.,(r3)+
+5$:
        neg     r2
-       ble     1f
-2:
+       ble     6$
+7$:
        dec     r1
-       blt     1f
-       movb    $'0,(r3)+
-       sob     r2,2b
-1:
+       blt     6$
+       movb    #'0,(r3)+
+       sob     r2,7$
+6$:
        tst     r1
-       ble     2f
-1:
+       ble     8$
+9$:
        movb    (r0)+,(r3)+
-       sob     r1,1b
-2:
+       sob     r1,9$
+8$:
        rts     pc
 
 pscien:
-       mov     $sign,-(sp)
-       mov     $decpt,-(sp)
+       mov     #sign,-(sp)
+       mov     #decpt,-(sp)
        mov     r0,-(sp)
        mov     r0,ndigit
        tst     r2
-       bne     1f
-       mov     $6,(sp)
-1:
+       bne     0$
+       mov     #6,(sp)
+0$:
        movf    (r4)+,fr0
        movf    fr0,-(sp)
        jsr     pc,_ecvt
-       add     $8+2+2+2,sp
+       add     #0o10+2+2+2,sp
        tst     sign
-       beq     1f
-       movb    $'-,(r3)+
-1:
-       cmpb    (r0),$'0
-       bne     1f
+       beq     1$
+       movb    #'-,(r3)+
+1$:
+       cmpb    (r0),#'0
+       bne     2$
        inc     decpt
-1:
+2$:
        movb    (r0)+,(r3)+
-       movb    $'.,(r3)+
+       movb    #'.,(r3)+
        mov     ndigit,r1
        dec     r1
-       ble     1f
-2:
+       ble     3$
+4$:
        movb    (r0)+,(r3)+
-       sob     r1,2b
-1:
-       movb    $'e,(r3)+
+       sob     r1,4$
+3$:
+       movb    #'e,(r3)+
        mov     decpt,r2
        dec     r2
        mov     r2,r1
-       bge     1f
-       movb    $'-,(r3)+
+       bge     5$
+       movb    #'-,(r3)+
        neg     r1
-       br      2f
-1:
-       movb    $'+,(r3)+
-2:
+       br      6$
+5$:
+       movb    #'+,(r3)+
+6$:
        clr     r0
-       div     $10.,r0
-       add     $'0,r0
+       div     #10,r0
+       add     #'0,r0
        movb    r0,(r3)+
-       add     $'0,r1
+       add     #'0,r1
        movb    r1,(r3)+
        rts     pc
-.data
-sign:  .=.+2
-ndigit:        .=.+2
-decpt: .=.+2
+.area  data
+sign:  .ds     2
+ndigit:        .ds     4
+decpt: .ds     6
index 78c88ef..7cc958e 100644 (file)
@@ -1,26 +1,29 @@
-/ access(file, request)
-/  test ability to access file in all indicated ways
-/  1 - read
-/  2 - write
-/  4 - execute
+; access(file, request)
+;  test ability to access file in all indicated ways
+;  1 - read
+;  2 - write
+;  4 - execute
 
 .globl _access
 .globl csv, cret
 .comm  _errno,2
 
-.access = 33.
+.access = 33
 
 _access:
        jsr     r5,csv
-       mov     4(r5),0f+2
-       mov     6(r5),0f+4
+       mov     4(r5),0$+2
+       mov     6(r5),0$+4
        clr     r0
-       sys     0; 0f
-.data
-0:     sys     .access; ..; ..
-.text
-       bec     1f
+       sys     0
+.dw    0$
+.area  data
+0$:    sys     .access
+..
+..
+.area  text
+       bec     1$
        mov     r0,_errno
-       mov     $-1,r0
-1:
+       mov     #-1,r0
+1$:
        jmp     cret
index ecbbe47..1827075 100644 (file)
@@ -1,22 +1,24 @@
-/ C library -- acct
+; C library -- acct
 
-/ error = acct(string);
+; error = acct(string);
 
 .globl _acct
 .globl cerror
-.acct = 51.
+.acct = 51
 
 _acct:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .acct; 0:..
+.area  data
+1$:
+       sys     .acct
+0$:..
index e5f0068..6380d61 100644 (file)
@@ -1,7 +1,7 @@
-/ C library - alarm
+; C library - alarm
 
 .globl _alarm
-.alarm = 27.
+.alarm = 27
 
 _alarm:
        mov     r5,-(sp)
index 646f5e8..aeca1d5 100644 (file)
@@ -1,22 +1,24 @@
-/ C library -- chdir
+; C library -- chdir
 
-/ error = chdir(string);
+; error = chdir(string);
 
 .globl _chdir
 .globl cerror
-.chdir = 12.
+.chdir = 12
 
 _chdir:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .chdir; 0:..
+.area  data
+1$:
+       sys     .chdir
+0$:..
index da58b90..766c933 100644 (file)
@@ -1,23 +1,26 @@
-/ C library -- chmod
+; C library -- chmod
 
-/ error = chmod(string, mode);
+; error = chmod(string, mode);
 
 .globl _chmod
 .globl cerror
-.chmod = 15.
+.chmod = 15
 
 _chmod:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       mov     6(r5),0$+2
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .chmod; 0:..; ..
+.area  data
+1$:
+       sys     .chmod
+0$:..
+..
index 09dc3ee..971e442 100644 (file)
@@ -1,24 +1,28 @@
-/ C library -- chown
+; C library -- chown
 
-/ error = chown(string, owner);
+; error = chown(string, owner);
 
 .globl _chown,
 .globl cerror
-.chown = 16.
+.chown = 16
 
 _chown:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
-       mov     8(r5),0f+4
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       mov     6(r5),0$+2
+       mov     0o10(r5),0$+4
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .chown; 0:..; ..; ..
+.area  data
+1$:
+       sys     .chown
+0$:..
+..
+..
index b7e3814..7fab403 100644 (file)
@@ -1,22 +1,24 @@
-/ C library -- chroot
+; C library -- chroot
 
-/ error = chroot(string);
+; error = chroot(string);
 
 .globl _chroot
 .globl cerror
-.chroot = 61.
+.chroot = 61
 
 _chroot:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .chroot; 0:..
+.area  data
+1$:
+       sys     .chroot
+0$:..
index a540e6f..5b0e42f 100644 (file)
@@ -1,19 +1,19 @@
-/ C library -- close
+; C library -- close
 
-/ error =  close(file);
+; error =  close(file);
 
 .globl _close,
 .globl cerror
-.close = 6.
+.close = 6
 
 _close:
        mov     r5,-(sp)
        mov     sp,r5
        mov     4(r5),r0
        sys     .close
-       bec     1f
+       bec     0$
        jmp     cerror
-1:
+0$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
index d9e3178..a1dea1a 100644 (file)
@@ -1,24 +1,27 @@
-/ C library -- creat
+; C library -- creat
 
-/ file = creat(string, mode);
-/
-/ file == -1 if error
+; file = creat(string, mode);
+;
+; file == -1 if error
 
 .globl _creat
 .globl cerror
-.creat = 8.
+.creat = 8
 
 _creat:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       mov     6(r5),0$+2
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .creat; 0:..; ..
+.area  data
+1$:
+       sys     .creat
+0$:..
+..
index 907df94..850f526 100644 (file)
@@ -1,28 +1,28 @@
-/ C library -- dup
+; C library -- dup
 
-/      f = dup(of [ ,nf])
-/      f == -1 for error
+;      f = dup(of [ ,nf])
+;      f == -1 for error
 
 .globl _dup,_dup2
 .globl cerror
-.dup = 41.
+.dup = 41
 
 _dup2:
        mov     r5,-(sp)
        mov     sp,r5
        mov     4(r5),r0
-       bis     $100,r0
-       br      1f
+       bis     #0o100,r0
+       br      0$
 
 _dup:
        mov     r5,-(sp)
        mov     sp,r5
        mov     4(r5),r0
-1:
+0$:
        mov     6(r5),r1
        sys     .dup
-       bec     1f
+       bec     1$
        jmp     cerror
-1:
+1$:
        mov     (sp)+,r5
        rts     pc
index 3195d81..e7a6390 100644 (file)
@@ -1,23 +1,27 @@
-/ C library -- execl
+; C library -- execl
 
-/ execl(file, arg1, arg2, ... , 0);
-/
-/ environment automatically passed
+; execl(file, arg1, arg2, ... , 0);
+;
+; environment automatically passed
 
 .globl _execl
 .globl cerror, _environ
-.exece = 59.
+.exece = 59
 
 _execl:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
+       mov     4(r5),0$
        mov     r5,r0
-       add     $6,r0
-       mov     r0,0f+2
-       mov     _environ,0f+4
-       sys     0; 9f
+       add     #6,r0
+       mov     r0,0$+2
+       mov     _environ,0$+4
+       sys     0
+.dw    1$
        jmp     cerror
-.data
-9:
-       sys     .exece; 0:..; ..; ..
+.area  data
+1$:
+       sys     .exece
+0$:..
+..
+..
index ccfd5e6..1ce10cd 100644 (file)
@@ -1,25 +1,29 @@
-/ C library -- execle
+; C library -- execle
 
-/ execle(file, arg1, arg2, ... , 0, env);
-/
+; execle(file, arg1, arg2, ... , 0, env);
+;
 
 .globl _execle
 .globl cerror
-.exece = 59.
+.exece = 59
 
 _execle:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
+       mov     4(r5),0$
        mov     r5,r0
-       add     $6,r0
-       mov     r0,0f+2
-1:
+       add     #6,r0
+       mov     r0,0$+2
+1$:
        tst     (r0)+
-       bne     1b
-       mov     (r0),0f+4
-       sys     0; 9f
+       bne     1$
+       mov     (r0),0$+4
+       sys     0
+.dw    2$
        jmp     cerror
-.data
-9:
-       sys     .exece; 0:..; ..; ..
+.area  data
+2$:
+       sys     .exece
+0$:..
+..
+..
index c4abfd0..fb63862 100644 (file)
@@ -1,23 +1,27 @@
-/ C library -- execv
+; C library -- execv
 
-/ execv(file, argv);
-/
-/ where argv is a vector argv[0] ... argv[x], 0
-/ last vector element must be 0
-/ environment passed automatically
+; execv(file, argv);
+;
+; where argv is a vector argv[0] ... argv[x], 0
+; last vector element must be 0
+; environment passed automatically
 
 .globl _execv,
 .globl cerror, _environ
-.exece = 59.
+.exece = 59
 
 _execv:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
-       mov     _environ,0f+4
-       sys     0; 9f
+       mov     4(r5),0$
+       mov     6(r5),0$+2
+       mov     _environ,0$+4
+       sys     0
+.dw    1$
        jmp     cerror
-.data
-9:
-       sys     .exece; 0:..; ..; ..
+.area  data
+1$:
+       sys     .exece
+0$:..
+..
+..
index a270d0c..fc0bef6 100644 (file)
@@ -1,22 +1,26 @@
-/ C library -- execve
+; C library -- execve
 
-/ execve(file, argv, env);
-/
-/ where argv is a vector argv[0] ... argv[x], 0
-/ last vector element must be 0
+; execve(file, argv, env);
+;
+; where argv is a vector argv[0] ... argv[x], 0
+; last vector element must be 0
 
 .globl _execve
 .globl cerror
-.exece = 59.
+.exece = 59
 
 _execve:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
-       mov     8(r5),0f+4
-       sys     0; 9f
+       mov     4(r5),0$
+       mov     6(r5),0$+2
+       mov     0o10(r5),0$+4
+       sys     0
+.dw    1$
        jmp     cerror
-.data
-9:
-       sys     .exece; 0:..; ..; ..
+.area  data
+1$:
+       sys     .exece
+0$:..
+..
+..
index 2fc69de..d451bbc 100644 (file)
@@ -1,11 +1,11 @@
-/ C library -- _exit
+; C library -- _exit
 
-/ _exit(code)
-/ code is return in r0 to system
-/ Same as plain exit, for user who want to define their own exit.
+; _exit(code)
+; code is return in r0 to system
+; Same as plain exit, for user who want to define their own exit.
 
 .globl __exit
-.exit = 1.
+.exit = 1
 
 __exit:
        mov     r5,-(sp)
index 3d248ff..69682c9 100644 (file)
@@ -1,26 +1,26 @@
-/ C library -- fork
+; C library -- fork
 
-/ pid = fork();
-/
-/ pid == 0 in child process; pid == -1 means error return
-/ in child, parents id is in par_uid if needed
+; pid = fork();
+;
+; pid == 0 in child process; pid == -1 means error return
+; in child, parents id is in par_uid if needed
 
 .globl _fork, _par_uid
 .globl cerror
-.fork = 2.
+.fork = 2
 
 _fork:
        mov     r5,-(sp)
        mov     sp,r5
        sys     .fork
-               br 1f
-       bec     2f
+               br 0$
+       bec     1$
        jmp     cerror
-1:
+0$:
        mov     r0,_par_uid
        clr     r0
-2:
+1$:
        mov     (sp)+,r5
        rts     pc
-.bss
-_par_uid: .=.+2
+.area  bss
+_par_uid: .ds  2
index 9c8bf77..7bdcb19 100644 (file)
@@ -1,27 +1,29 @@
-/ C library -- fstat
+; C library -- fstat
 
-/ error = fstat(file, statbuf);
+; error = fstat(file, statbuf);
 
-/ int statbuf[17] or
-/ char statbuf[34]
-/ as appropriate
+; int statbuf[17] or
+; char statbuf[34]
+; as appropriate
 
 .globl _fstat
 .globl cerror
-.fstat = 28.
+.fstat = 28
 
 _fstat:
        mov     r5,-(sp)
        mov     sp,r5
        mov     4(r5),r0
-       mov     6(r5),0f
-       sys     0; 9f
-       bec     1f
+       mov     6(r5),0$
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .fstat; 0:..
+.area  data
+1$:
+       sys     .fstat
+0$:..
index 0a017f1..6b88a00 100644 (file)
@@ -1,9 +1,9 @@
-/ C library -- getgid, getegid
+; C library -- getgid, getegid
 
-/ gid = getgid();
+; gid = getgid();
 
 .globl _getgid
-.getgid = 47.
+.getgid = 47
 
 _getgid:
        mov     r5,-(sp)
@@ -12,8 +12,8 @@ _getgid:
        mov     (sp)+,r5
        rts     pc
 
-/ gid = getegid();
-/ returns effective gid
+; gid = getegid();
+; returns effective gid
 
 .globl _getegid
 
index 4ed1dd3..0149178 100644 (file)
@@ -1,7 +1,7 @@
-/ getpid -- get process ID
+; getpid -- get process ID
 
 .globl _getpid
-.getpid        = 20.
+.getpid        = 20
 
 _getpid:
        mov     r5,-(sp)
index 5f2f639..0225d44 100644 (file)
@@ -1,9 +1,9 @@
-/ C library -- getuid, geteuid
+; C library -- getuid, geteuid
 
-/ uid = getuid();
+; uid = getuid();
 
 .globl _getuid
-.getuid = 24.
+.getuid = 24
 
 _getuid:
        mov     r5,-(sp)
@@ -13,8 +13,8 @@ _getuid:
        rts     pc
 
 
-/ uid = geteuid();
-/  returns effective uid
+; uid = geteuid();
+;  returns effective uid
 
 .globl _geteuid
 
index 8a1b821..7472ff8 100644 (file)
@@ -1,26 +1,30 @@
-/ C library -- ioctl
+; C library -- ioctl
 
-/ ioctl(fdes, command, arg)
-/ struct * arg;
-/
-/ result == -1 if error
+; ioctl(fdes, command, arg)
+; struct * arg;
+;
+; result == -1 if error
 
 .globl _ioctl, cerror
-.ioctl = 54.
+.ioctl = 54
 
 _ioctl:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
-       mov     8(r5),0f+4
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       mov     6(r5),0$+2
+       mov     0o10(r5),0$+4
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        mov     (sp)+,r5
        clr     r0
        rts     pc
-.data
-9:
-       sys     .ioctl; 0:..; ..; ..
+.area  data
+1$:
+       sys     .ioctl
+0$:..
+..
+..
index 0a28e4a..ff131d2 100644 (file)
@@ -1,21 +1,23 @@
-/ C library -- kill
+; C library -- kill
 
 .globl _kill, cerror
-.kill = 37.
+.kill = 37
 
 _kill:
        mov     r5,-(sp)
        mov     sp,r5
        mov     4(sp),r0
-       mov     6(sp),8f
-       sys     0; 9f
-       bec     1f
+       mov     6(sp),0$
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
 
-.data
-9:
-       sys     .kill; 8:..
+.area  data
+1$:
+       sys     .kill
+0$:..
index 525cd49..95629b5 100644 (file)
@@ -1,23 +1,26 @@
-/ C library -- link
+; C library -- link
 
-/ error = link(old-file, new-file);
+; error = link(old-file, new-file);
 
 .globl _link
 .globl cerror
-.link = 9.
+.link = 9
 
 _link:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       mov     6(r5),0$+2
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .link; 0:..; ..
+.area  data
+1$:
+       sys     .link
+0$:..
+..
index a5084b5..e73b33b 100644 (file)
@@ -1,22 +1,24 @@
-/ lock -- C library
+; lock -- C library
 
-/      lock(f)
+;      lock(f)
 
 .globl _lock, cerror
 
-.lock = 53.
+.lock = 53
 
 _lock:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       sys     0; 9f
-       .data
-9:
-       sys     .lock; 0:..
-       .text
-       bec     1f
+       mov     4(r5),0$
+       sys     0
+.dw    1$
+       .area   data
+1$:
+       sys     .lock
+0$:..
+       .area   text
+       bec     2$
        jmp     cerror
-1:
+2$:
        mov     (sp)+,r5
        rts     pc
index df0bfa7..9676807 100644 (file)
@@ -1,26 +1,30 @@
-/ C library -- lseek
+; C library -- lseek
 
-/ error = lseek(file, offset, ptr);
-/ long offset
-/ long lseek()
+; error = lseek(file, offset, ptr);
+; long offset
+; long lseek()
 
 .globl _lseek, cerror
-.lseek = 19.
+.lseek = 19
 
 _lseek:
        mov     r5,-(sp)
        mov     sp,r5
        mov     4(r5),r0
-       mov     6(r5),0f
-       mov     8(r5),0f+2
-       mov     10.(r5),0f+4
-       sys     0; 9f
-       bec     1f
-       mov     $1,r1
+       mov     6(r5),0$
+       mov     0o10(r5),0$+2
+       mov     10(r5),0$+4
+       sys     0
+.dw    1$
+       bec     2$
+       mov     #1,r1
        jmp     cerror
-1:
+2$:
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .lseek; 0:..; ..; ..
+.area  data
+1$:
+       sys     .lseek
+0$:..
+..
+..
index 8064307..373e90b 100644 (file)
@@ -1,23 +1,27 @@
-/ C library -- mknod
+; C library -- mknod
 
-/ error = mknod(string, mode, major.minor);
+; error = mknod(string, mode, major.minor);
 
 .globl _mknod, cerror
 
-.mknod = 14.
+.mknod = 14
 _mknod:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
-       mov     8(r5),0f+4
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       mov     6(r5),0$+2
+       mov     0o10(r5),0$+4
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .mknod; 0:..; ..; ..
+.area  data
+1$:
+       sys     .mknod
+0$:..
+..
+..
index f3f38c2..1e515bc 100644 (file)
@@ -1,24 +1,28 @@
-/ C library -- mount
+; C library -- mount
 
-/ error = mount(dev, file, flag)
+; error = mount(dev, file, flag)
 
 .globl _mount,
 .globl cerror
-.mount = 21.
+.mount = 21
 
 _mount:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(sp),0f
-       mov     6(sp),0f+2
-       mov     8(sp),0f+4
-       sys     0; 9f
-       bec     1f
+       mov     4(sp),0$
+       mov     6(sp),0$+2
+       mov     0o10(sp),0$+4
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .mount; 0:..; ..; ..
+.area  data
+1$:
+       sys     .mount
+0$:..
+..
+..
index 2efecb5..93e1385 100644 (file)
@@ -3,16 +3,19 @@
 _mpxcall:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
+       mov     4(r5),0$
+       mov     6(r5),0$+2
 call:
-       sys     0; 9f
-       bec     1f
+       sys     0
+.dw    0$
+       bec     1$
        jmp     cerror
-1:
+1$:
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     56.; 0:..; ..
+.area  data
+0$:
+       sys     56
+2$:..
+..
 
index 3dda6d5..259af3b 100644 (file)
@@ -1,19 +1,19 @@
-/ C library-- nice
+; C library-- nice
 
-/ error = nice(hownice)
+; error = nice(hownice)
 
 .globl _nice,
 .globl cerror
-.nice = 34.
+.nice = 34
 
 _nice:
        mov     r5,-(sp)
        mov     sp,r5
        mov     4(sp),r0
        sys     .nice
-       bec     1f
+       bec     0$
        jmp     cerror
-1:
+0$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
index b69cbb8..c9eedff 100644 (file)
@@ -1,23 +1,26 @@
-/ C library -- open
+; C library -- open
 
-/ file = open(string, mode)
-/ file == -1 means error
+; file = open(string, mode)
+; file == -1 means error
 
 .globl _open,
 .globl cerror
-.open = 5.
+.open = 5
 
 _open:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       mov     6(r5),0$+2
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .open; 0:..; ..
+.area  data
+1$:
+       sys     .open
+0$:..
+..
index 1ebe761..913f8b8 100644 (file)
@@ -1,7 +1,7 @@
-/ C library - pause
+; C library - pause
 
 .globl _pause
-.pause = 29.
+.pause = 29
 
 _pause:
        mov     r5,-(sp)
index e1279a1..a644bf1 100644 (file)
@@ -1,24 +1,28 @@
-/ phys -- C library
+; phys -- C library
 
-/      phys(seg, size, physad)
+;      phys(seg, size, physad)
 
 .globl _phys, cerror
 
-.phys = 52.
+.phys = 52
 
 _phys:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
-       mov     8(r5),0f+4
-       sys     0; 9f
-       .data
-9:
-       sys     .phys; 0: ..; ..; ..
-       .text
-       bec     1f
+       mov     4(r5),0$
+       mov     6(r5),0$+2
+       mov     0o10(r5),0$+4
+       sys     0
+.dw    1$
+       .area   data
+1$:
+       sys     .phys
+0$: ..
+..
+..
+       .area   text
+       bec     2$
        jmp     cerror
-1:
+2$:
        mov     (sp)+,r5
        rts     pc
index 04c8e59..07616bf 100644 (file)
@@ -1,19 +1,19 @@
-/ pipe -- C library
+; pipe -- C library
 
-/      pipe(f)
-/      int f[2];
+;      pipe(f)
+;      int f[2];
 
 .globl _pipe, cerror
 
-.pipe = 42.
+.pipe = 42
 
 _pipe:
        mov     r5,-(sp)
        mov     sp,r5
        sys     .pipe
-       bec     1f
+       bec     0$
        jmp     cerror
-1:
+0$:
        mov     r2,-(sp)
        mov     4(r5),r2
        mov     r0,(r2)+
index bc4abb9..a32ac84 100644 (file)
@@ -1,18 +1,23 @@
-/ profil
+; profil
 
 .globl _profil
-.prof = 44.
+.prof = 44
 
 _profil:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
-       mov     10(r5),0f+4
-       mov     12(r5),0f+6
-       sys     0; 9f
+       mov     4(r5),0$
+       mov     6(r5),0$+2
+       mov     0o10(r5),0$+4
+       mov     0o12(r5),0$+6
+       sys     0
+.dw    1$
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .prof; 0:..; ..; ..; ..
+.area  data
+1$:
+       sys     .prof
+0$:..
+..
+..
+..
index d400429..6c5a5d2 100644 (file)
@@ -1,8 +1,8 @@
-/ ptrace -- C library
+; ptrace -- C library
 
-/      result = ptrace(req, pid, addr, data);
+;      result = ptrace(req, pid, addr, data);
 
-.ptrace = 26.
+.ptrace = 26
 indir = 0
 
 .globl _ptrace
@@ -11,18 +11,20 @@ indir = 0
 _ptrace:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4.(r5),0f+4
-       mov     6.(r5),0f+0
-       mov     8.(r5),0f+2
-       mov     10.(r5),r0
+       mov     4(r5),0$+4
+       mov     6(r5),0$+0
+       mov     8(r5),0$+2
+       mov     10(r5),r0
        clr     _errno
-       sys     indir; 9f
-       bec     1f
+       sys     indir
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        mov     (sp)+,r5
        rts     pc
 
-.data
-9:
-       sys     .ptrace; 0: .=.+6
+.area  data
+1$:
+       sys     .ptrace
+0$: .ds        8
index 5225cf6..a3e6f49 100644 (file)
@@ -1,24 +1,27 @@
-/ C library -- read
+; C library -- read
 
-/ nread = read(file, buffer, count);
-/ nread ==0 means eof; nread == -1 means error
+; nread = read(file, buffer, count);
+; nread ==0 means eof; nread == -1 means error
 
 .globl _read
 .globl cerror
-.read = 3.
+.read = 3
 
 _read:
        mov     r5,-(sp)
        mov     sp,r5
        mov     4(r5),r0
-       mov     6(r5),0f
-       mov     8(r5),0f+2
-       sys     0; 9f
-       bec     1f
+       mov     6(r5),0$
+       mov     0o10(r5),0$+2
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .read; 0:..; ..
+.area  data
+1$:
+       sys     .read
+0$:..
+..
index 78e15e0..da631d4 100644 (file)
@@ -1,45 +1,48 @@
-/old = sbrk(increment);
-/
-/sbrk gets increment more core, and returns a pointer
-/      to the beginning of the new core area
-/
+;old = sbrk(increment);
+;
+;sbrk gets increment more core, and returns a pointer
+;      to the beginning of the new core area
+;
 .globl _sbrk, _brk
 .globl _end, cerror
-.break = 17.
+.break = 17
 
 _sbrk:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       beq     1f
-       add     nd,0f
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       beq     1$
+       add     nd,0$
+       sys     0
+.dw    2$
+       bec     1$
        jmp     cerror
-1:
+1$:
        mov     nd,r0
        add     4(r5),nd
        mov     (sp)+,r5
        rts     pc
 
-/ brk(value)
-/ as described in man2.
-/ returns 0 for ok, -1 for error.
+; brk(value)
+; as described in man2.
+; returns 0 for ok, -1 for error.
 
 _brk:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        mov     4(r5),nd
        clr     r0
        mov     (sp)+,r5
        rts     pc
 
-.data
-9:
-       sys     .break; 0:..
-nd:    _end
+.area  data
+1$:
+       sys     .break
+0$:..
+nd:    .dw     _end
index d781e6e..90cf92c 100644 (file)
@@ -1,19 +1,19 @@
-/ C library -- setgid
+; C library -- setgid
 
-/ error = setgid(uid);
+; error = setgid(uid);
 
 .globl _setgid
 .globl cerror
-.setgid = 46.
+.setgid = 46
 
 _setgid:
        mov     r5,-(sp)
        mov     sp,r5
        mov     4(r5),r0
        sys     .setgid
-       bec     1f
+       bec     0$
        jmp     cerror
-1:
+0$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
index 25d2ef8..d13d670 100644 (file)
@@ -1,19 +1,19 @@
-/ C library -- setuid
+; C library -- setuid
 
-/ error = setuid(uid);
+; error = setuid(uid);
 
 .globl _setuid
 .globl cerror
-.setuid = 23.
+.setuid = 23
 
 _setuid:
        mov     r5,-(sp)
        mov     sp,r5
        mov     4(r5),r0
        sys     .setuid
-       bec     1f
+       bec     0$
        jmp     cerror
-1:
+0$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
index ee2896c..db73feb 100644 (file)
@@ -1,76 +1,97 @@
-/ C library -- signal
+; C library -- signal
 
-/ signal(n, 0); /* default action on signal(n) */
-/ signal(n, odd); /* ignore signal(n) */
-/ signal(n, label); /* goto label on signal(n) */
-/ returns old label, only one level.
+; signal(n, 0); /* default action on signal(n) */
+; signal(n, odd); /* ignore signal(n) */
+; signal(n, label); /* goto label on signal(n) */
+; returns old label, only one level.
 
 rtt    = 6
-.signal        = 48.
+.signal        = 48
 .globl _signal, cerror
 
 _signal:
        mov     r5,-(sp)
        mov     sp,r5
        mov     4(r5),r1
-       cmp     r1,$NSIG
-       bhis    2f
+       cmp     r1,#NSIG
+       bhis    0$
        mov     6(r5),r0
-       mov     r1,0f
+       mov     r1,1$
        asl     r1
        mov     dvect(r1),-(sp)
        mov     r0,dvect(r1)
-       mov     r0,0f+2
-       beq     1f
-       bit     $1,r0
-       bne     1f
+       mov     r0,1$+2
+       beq     2$
+       bit     #1,r0
+       bne     2$
        asl     r1
-       add     $tvect,r1
-       mov     r1,0f+2
-1:
-       sys     0; 9f
-       bes     3f
-       bit     $1,r0
-       beq     1f
+       add     #tvect,r1
+       mov     r1,1$+2
+2$:
+       sys     0
+.dw    3$
+       bes     4$
+       bit     #1,r0
+       beq     5$
        mov     r0,(sp)
-1:
+5$:
        mov     (sp)+,r0
        mov     (sp)+,r5
        rts     pc
-2:
-       mov     $22.,r0         / EINVAL
-3:
+0$:
+       mov     #22,r0          ; EINVAL
+4$:
        jmp     cerror
 
 NSIG = 0
 tvect:
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
-       jsr     r0,1f; NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
+       jsr     r0,0$
+NSIG=NSIG+1
 
-1:
+0$:
        mov     r1,-(sp)
        mov     r2,-(sp)
        mov     r3,-(sp)
        mov     r4,-(sp)
-       sub     $tvect+4,r0
+       sub     #tvect+4,r0
        asr     r0
        mov     r0,-(sp)
        asr     (sp)
@@ -82,8 +103,10 @@ tvect:
        mov     (sp)+,r1
        mov     (sp)+,r0
        rtt
-.data
-9:
-       sys     .signal; 0:..; ..
-.bss
-dvect: .=.+[NSIG*2]
+.area  data
+1$:
+       sys     .signal
+2$:..
+..
+.area  bss
+dvect: .ds     40
index 1ed4cbc..2e426f3 100644 (file)
@@ -1,23 +1,26 @@
-/ C library -- stat
+; C library -- stat
 
-/ error = stat(string, statbuf);
+; error = stat(string, statbuf);
 
 .globl _stat
 .globl cerror
-.stat = 18.
+.stat = 18
 
 _stat:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       mov     6(r5),0$+2
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .stat; 0:..; ..
+.area  data
+1$:
+       sys     .stat
+0$:..
+..
index beeb26d..2c39225 100644 (file)
@@ -1,8 +1,8 @@
-/ error = stime(&long)
+; error = stime(&long)
 
 .globl _stime
 .globl cerror
-.stime = 25.
+.stime = 25
 
 _stime:
        mov     r5,-(sp)
@@ -11,9 +11,9 @@ _stime:
        mov     (r1)+,r0
        mov     (r1),r1
        sys     .stime
-       bec     1f
+       bec     0$
        jmp     cerror
-1:
+0$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
index a99cd2f..22c174b 100644 (file)
@@ -1,5 +1,5 @@
 .globl _sync
-.sync = 36.
+.sync = 36
 
 _sync:
        mov     r5,-(sp)
index 3a56f6a..c373ae9 100644 (file)
@@ -1,11 +1,11 @@
-/ C library -- time
+; C library -- time
 
-/ tvec = time(tvec);
-/
-/ tvec[0], tvec[1] contain the time
+; tvec = time(tvec);
+;
+; tvec[0], tvec[1] contain the time
 
 .globl _time
-.time = 13.
+.time = 13
 
 
 _time:
@@ -14,24 +14,26 @@ _time:
        sys     .time
        mov     r2,-(sp)
        mov     4(r5),r2
-       beq     1f
+       beq     0$
        mov     r0,(r2)+
        mov     r1,(r2)+
-1:
+0$:
        mov     (sp)+,r2
        mov     (sp)+,r5
        rts     pc
 
 .globl _ftime
-.ftime = 35.
+.ftime = 35
 
 _ftime:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       sys     0; 9f
-       .data
-9:     sys     .ftime; 0:..
-       .text
+       mov     4(r5),0$
+       sys     0
+.dw    1$
+       .area   data
+1$:    sys     .ftime
+0$:..
+       .area   text
        mov     (sp)+,r5
        rts     pc
index 1ac8e4e..bfc2ee7 100644 (file)
@@ -1,15 +1,17 @@
-/ C library -- times
+; C library -- times
 
 .globl _times
-.times = 43.
+.times = 43
 
 _times:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       sys     0; 9f
+       mov     4(r5),0$
+       sys     0
+.dw    1$
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .times; 0:..
+.area  data
+1$:
+       sys     .times
+0$:..
index 4c88760..3c9c74d 100644 (file)
@@ -1,21 +1,23 @@
-/ C library -- umask
+; C library -- umask
 
-/ omask = umask(mode);
+; omask = umask(mode);
 
 .globl _umask
 .globl cerror
-.umask = 60.
+.umask = 60
 
 _umask:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .umask; 0:..
+.area  data
+1$:
+       sys     .umask
+0$:..
index a98a648..c9751a5 100644 (file)
@@ -1,23 +1,25 @@
-/ C library -- umount
+; C library -- umount
 
 .globl _umount
 .globl cerror
 indir  = 0
-.umount = 22.
+.umount = 22
 .comm  _errno,2
 
 _umount:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(sp),0f
-       sys     indir; 9f
-       bec     1f
+       mov     4(sp),0$
+       sys     indir
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
 
-.data
-9:
-       sys     .umount; 0:..
+.area  data
+1$:
+       sys     .umount
+0$:..
index 9aeb18a..76dc0fa 100644 (file)
@@ -1,22 +1,24 @@
-/ C library -- unlink
+; C library -- unlink
 
-/ error = unlink(string);
+; error = unlink(string);
 
 .globl _unlink,
 .globl cerror
-.unlink = 10.
+.unlink = 10
 
 _unlink:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .unlink; 0:..
+.area  data
+1$:
+       sys     .unlink
+0$:..
index 14a3071..63d0c71 100644 (file)
@@ -1,23 +1,26 @@
-/ C library -- utime
+; C library -- utime
 
-/ error = utime(string, timev);
+; error = utime(string, timev);
 
 .globl _utime
 .globl cerror
-.utime = 30.
+.utime = 30
 
 _utime:
        mov     r5,-(sp)
        mov     sp,r5
-       mov     4(r5),0f
-       mov     6(r5),0f+2
-       sys     0; 9f
-       bec     1f
+       mov     4(r5),0$
+       mov     6(r5),0$+2
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        clr     r0
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .utime; 0:..; ..
+.area  data
+1$:
+       sys     .utime
+0$:..
+..
index b4de107..f9a30da 100644 (file)
@@ -1,26 +1,26 @@
-/ C library -- wait
+; C library -- wait
 
-/ pid = wait(0);
-/   or,
-/ pid = wait(&status);
-/
-/ pid == -1 if error
-/ status indicates fate of process, if given
+; pid = wait(0);
+;   or,
+; pid = wait(&status);
+;
+; pid == -1 if error
+; status indicates fate of process, if given
 
 .globl _wait
 .globl cerror
-.wait = 7.
+.wait = 7
 
 _wait:
        mov     r5,-(sp)
        mov     sp,r5
        sys     .wait
-       bec     1f
+       bec     0$
        jmp     cerror
-1:
+0$:
        tst     4(r5)
-       beq     1f
-       mov     r1,*4(r5)       / status return
-1:
+       beq     1$
+       mov     r1,*4(r5)       ; status return
+1$:
        mov     (sp)+,r5
        rts     pc
index 505795c..50fbf6e 100644 (file)
@@ -1,25 +1,28 @@
-/ C library -- write
+; C library -- write
 
-/ nwritten = write(file, buffer, count);
-/
-/ nwritten == -1 means error
+; nwritten = write(file, buffer, count);
+;
+; nwritten == -1 means error
 
 .globl _write
 .globl cerror
-.write = 4.
+.write = 4
 
 _write:
        mov     r5,-(sp)
        mov     sp,r5
        mov     4(r5),r0
-       mov     6(r5),0f
-       mov     8(r5),0f+2
-       sys     0; 9f
-       bec     1f
+       mov     6(r5),0$
+       mov     0o10(r5),0$+2
+       sys     0
+.dw    1$
+       bec     2$
        jmp     cerror
-1:
+2$:
        mov     (sp)+,r5
        rts     pc
-.data
-9:
-       sys     .write; 0:..; ..
+.area  data
+1$:
+       sys     .write
+0$:..
+..
index d5ed33b..2823ee4 100644 (file)
@@ -1,14 +1,14 @@
-/ syscall
+; syscall
 
 .globl _syscall,csv,cret,cerror
 _syscall:
        jsr     r5,csv
        mov     r5,r2
-       add     $04,r2
-       mov     $9f,r3
+       add     #4,r2
+       mov     #0$,r3
        mov     (r2)+,r0
-       bic     $!0377,r0
-       bis     $sys,r0
+       bic     #!0o377,r0
+       bis     #sys,r0
        mov     r0,(r3)+
        mov     (r2)+,r0
        mov     (r2)+,r1
@@ -17,11 +17,12 @@ _syscall:
        mov     (r2)+,(r3)+
        mov     (r2)+,(r3)+
        mov     (r2)+,(r3)+
-       sys     0; 9f
-       bec     1f
+       sys     0
+.dw    0$
+       bec     1$
        jmp     cerror
-1:
+1$:
        jmp     cret
 
-       .data
-9:     .=.+12.
+       .area   data
+0$:    .ds     12
index 29bfbc4..d2c52c2 100644 (file)
@@ -1,11 +1,11 @@
-/ C library -- time
+; C library -- time
 
-/ tvec = time(tvec);
-/
-/ tvec[0], tvec[1] contain the time
+; tvec = time(tvec);
+;
+; tvec[0], tvec[1] contain the time
 
 .globl _time
-.time = 13.
+.time = 13
 
 
 _time:
@@ -14,10 +14,10 @@ _time:
        sys     .time
        mov     r2,-(sp)
        mov     4(r5),r2
-       beq     1f
+       beq     0$
        mov     r0,(r2)+
        mov     r1,(r2)+
-1:
+0$:
        mov     (sp)+,r2
        mov     (sp)+,r5
        rts     pc