1: / kill process
   2: 
   3:         mov     (sp)+,r4
   4:         tst     (sp)+
   5: 
   6: loop:
   7:         dec     r4
   8:         ble     done
   9:         mov     (sp)+,r5
  10:         clr     r3
  11:         cmpb    (r5),$'-
  12:         bne     1f
  13:         inc     r5
  14:         clr     signo
  15: 1:
  16:         movb    (r5)+,r0
  17:         beq     1f
  18:         sub     $'0,r0
  19:         cmp     r0,$9
  20:         bhi     error
  21:         mul     $10.,r3
  22:         add     r0,r3
  23:         br      1b
  24: 1:
  25:         tst     signo
  26:         bne     1f
  27:         tst     r3
  28:         ble     error
  29:         cmp     r3,$12.
  30:         bgt     error
  31:         mov     r3,signo
  32:         br      loop
  33: 1:
  34:         mov     r3,r0
  35:         sys     37.; signo: 9.          / kill
  36:         bec     loop
  37:         mov     r3,r0
  38:         jsr     pc,decml
  39:         mov     $1,r0
  40:         sys     write; m1; em1-m1
  41:         br      loop
  42: 
  43: error:
  44:         mov     $1,r0
  45:         sys     write; m2; em2-m2
  46:         br      loop
  47: 
  48: done:
  49:         sys     exit
  50: 
  51: decml:
  52:         mov     r0,r1
  53:         clr     r0
  54:         div     $10.,r0
  55:         mov     r1,-(sp)
  56:         tst     r0
  57:         beq     1f
  58:         jsr     pc,decml
  59: 1:
  60:         mov     (sp)+,r0
  61:         add     $'0,r0
  62:         mov     r0,ch
  63:         mov     $1,r0
  64:         sys     write; ch; 1
  65:         rts     pc
  66: 
  67: m1:
  68:         <: not found\n>
  69: em1:
  70: m2:
  71:         <non-numeric arg\n>
  72: em2:
  73: .bss
  74: ch:     .=.+2

Defined functions

decml defined in line 51; used 2 times
done defined in line 48; used 1 times
  • in line 8
em1 defined in line 69; used 1 times
  • in line 40
em2 defined in line 72; used 1 times
  • in line 45
error defined in line 43; used 3 times
loop defined in line 6; used 4 times
m1 defined in line 67; used 2 times
  • in line 40(2)
m2 defined in line 70; used 2 times
  • in line 45(2)
signo defined in line 35; used 3 times

Defined variables

ch defined in line 74; used 2 times
Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 338
Valid CSS Valid XHTML 1.0 Strict