1: /
2: /
3:
4: / PDP-11 assembler pass 0
5:
6: indir = 0
7:
8: jmp start
9: go:
10: jsr pc,assem
11: movb pof,r0
12: sys write; outbuf; 512.
13: movb pof,r0
14: sys close
15: movb fbfil,r0
16: sys close
17: tstb errflg
18: bne aexit
19: jsr r5,fcreat; a.tmp3
20: mov r0,r1
21: mov symend,0f
22: sub $usymtab,0f
23: sys indir; 9f
24: .data
25: 9: sys write; usymtab; 0:..
26: .text
27: mov r1,r0
28: sys close
29: sys exec; 2f; 1f
30: mov $2f,r0
31: jsr r5,filerr; "?\n
32:
33: aexit:
34: sys unlink; a.tmp1
35: sys unlink; a.tmp2
36: sys unlink; a.tmp3
37: sys exit
38: .data
39: 1:
40: 2f
41: a.tmp1
42: a.tmp2
43: a.tmp3
44: unglob:
45: 3f
46: 0
47: .text
48: 2:
49: fpass2:
50: </lib/as2\0>
51: 3:
52: <-g\0>
53: .even
54:
55: filerr:
56: mov r4,-(sp)
57: mov r0,r4
58: mov r4,0f
59: clr r0
60: 1:
61: tstb (r4)+
62: beq 1f
63: inc r0
64: br 1b
65: 1:
66: mov r0,1f
67: mov $1,r0
68: sys indir; 9f
69: .data
70: 9: sys write; 0:0; 1:0
71: .text
72: mov r5,0f
73: mov $1,r0
74: sys indir; 9f
75: .data
76: 9: sys write; 0:0; 2
77: .text
78: tst (r5)+
79: mov (sp)+,r4
80: rts r5
81:
82: fcreat:
83: mov r4,-(sp)
84: mov (r5)+,r4
85: mov r4,0f
86: 1:
87: sys indir; 9f
88: .data
89: 9: sys stat; 0:..; outbuf
90: .text
91: bec 2f
92: mov r4,0f
93: sys indir; 9f
94: .data
95: 9: sys creat; 0:..; 444
96: .text
97: bes 2f
98: mov (sp)+,r4
99: rts r5
100: 2:
101: incb 9.(r4)
102: cmpb 9.(r4),$'z
103: blos 1b
104: mov r4,r0
105: jsr r5,filerr; "?\n
106: sys exit
Defined functions
aexit
defined in line
33; used 1 times
go
defined in line
9;
never used
indir
defined in line
6; used 5 times
Defined variables