1: /
2: /
3:
4: / PDP-11 assembler pass 0
5:
6: jmp start
7: go:
8: jsr pc,assem
9: movb pof,r0
10: sys write; outbuf; 512.
11: jes wrterr
12: movb pof,r0
13: sys close
14: movb fbfil,r0
15: sys close
16: tstb errflg
17: bne aexit
18: jsr r5,fcreat; a.tmp3
19: mov r0,r1
20: mov symend,0f
21: sub $usymtab,0f
22: sys indir; 9f
23: jes wrterr
24: .data
25: 9: sys write; usymtab; 0:..
26: .text
27: mov r1,r0
28: sys close
29: sys exec; fpass2; 1f
30: mov $fpass2,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: mov $3,r0
38: sys exit
39: .data
40: 1:
41: fpass2
42: globfl
43: ovflag
44: outfl
45: outfp:
46: outfile
47: a.tmp1
48: a.tmp2
49: a.tmp3
50: 0
51: fpass2:
52: </lib/as2\0>
53: globfl:
54: unglob=.+1
55: <-\0\0>
56: ovflag:
57: ovloc=.+1
58: <-\0\0>
59: outfl:
60: <-o\0>
61: outfile:
62: <a.out\0>
63: 3:
64: <-g\0>
65: .even
66: .text
67:
68: filerr:
69: mov r4,-(sp)
70: mov r0,r4
71: mov r4,0f
72: clr r0
73: 1:
74: tstb (r4)+
75: beq 1f
76: inc r0
77: br 1b
78: 1:
79: mov r0,1f
80: mov $1,r0
81: sys indir; 9f
82: .data
83: 9: sys write; 0:0; 1:0
84: .text
85: mov r5,0f
86: mov $1,0f+2
87: tstb 1(r5)
88: beq 1f
89: mov $2,0f+2
90: 1:
91: mov $1,r0
92: sys indir; 9f
93: .data
94: 9: sys write; 0:0; 1
95: .text
96: tst (r5)+
97: mov (sp)+,r4
98: rts r5
99:
100: fcreat:
101: mov r4,-(sp)
102: mov (r5)+,r4
103: mov r4,0f
104: 1:
105: sys indir; 9f
106: .data
107: 9: sys stat; 0:..; outbuf
108: .text
109: bec 2f
110: mov r4,0f
111: sys indir; 9f
112: .data
113: 9: sys creat; 0:..; 444
114: .text
115: bes 2f
116: mov (sp)+,r4
117: rts r5
118: 2:
119: incb 9.(r4)
120: cmpb 9.(r4),$'z
121: blos 1b
122: mov r4,r0
123: jsr r5,filerr; "?\n
124: mov $3,r0
125: sys exit
126:
127: .=.+2
128: wrterr:
129: mov $1,r0
130: sys write; 9f; 9f-8f
131: inc errflg
132: jbr aexit
133: 9: <as: Write error on temp file.\n>; 8:
Defined functions
aexit
defined in line
33; used 2 times
go
defined in line
7;
never used
Defined variables
outfl
defined in line
59; used 1 times
outfp
defined in line
45;
never used
ovloc
defined in line
57;
never used