1: / C runtime startoff including monitoring
   2: 
   3: cbufs   = 150.
   4: 
   5: .globl  _monitor
   6: .globl  _sbrk
   7: .globl  _main
   8: .globl  _exit
   9: .globl  _etext
  10: .comm   countbase,2
  11: 
  12: .comm   savr5,2
  13: 
  14: start:
  15:         setd
  16:         mov     sp,r0
  17:         mov     (r0),-(sp)
  18:         tst     (r0)+
  19:         mov     r0,2(sp)
  20: 
  21:         mov     $_etext,r1
  22:         sub     $eprol,r1
  23:         add     $7,r1
  24:         ash     $-3,r1
  25:         bic     $!17777,r1
  26:         mov     $cbufs,-(sp)
  27:         add     $3*[cbufs+1],r1
  28:         mov     r1,-(sp)
  29:         asl     r1
  30:         mov     r1,-(sp)
  31:         jsr     pc,_sbrk
  32:         tst     (sp)+
  33:         cmp     r0,$-1
  34:         beq     9f
  35:         mov     r0,-(sp)
  36:         add     $6,r0
  37:         mov     r0,countbase
  38:         mov     $_etext,-(sp)
  39:         mov     $eprol,-(sp)
  40:         jsr     pc,_monitor
  41:         add     $10.,sp
  42:         jsr     pc,_main
  43:         cmp     (sp)+,(sp)+
  44:         jsr     pc,_exit
  45: 
  46: 9:
  47:         mov     $2,r0
  48:         sys     write; 8f; 9f-8f
  49: 
  50: .data; 8: <No space for monitor buffer\n>; 9:.even; .text
  51: 
  52: _exit:
  53:         mov     r5,-(sp)
  54:         mov     sp,r5
  55:         clr     -(sp)
  56:         jsr     pc,_monitor
  57:         tst     (sp)+
  58:         mov     4(r5),r0
  59:         sys     exit
  60: eprol:

Defined functions

_exit declared in line 8; defined in line 52; used 2 times
  • in line 8, 44
cbufs defined in line 3; used 2 times
eprol defined in line 60; used 2 times
start defined in line 14; never used

Defined variables

countbase defined in line 10; used 1 times
  • in line 37
savr5 defined in line 12; never used
Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 689
Valid CSS Valid XHTML 1.0 Strict