1: .globl alterchar
2: .globl plausible
3: .globl stats
4: .globl allocate, release
5: .globl copy
6: .globl bufchar, getbuf
7: .globl swap
8: .globl w, r, a, l
9: .globl w1, flag, u1, fixct
10: /
11: / routine to rewrite the character pointer to by
12: / read pointer. The read pointer is advanced.
13: / the string is extended if necessary.
14: / there is no error return.
15: /
16: / movb ch,r0
17: / mov ...,r1
18: / jsr pc,alterchar
19: / mov r1,...
20: /
21: alterchar:
22: mov r2,-(sp)
23: mov r1,-(sp)
24: mov r0,nchar
25: jsr pc,plausible
26: inc stats+8.
27: 1: cmp r(r1),l(r1) /W,L
28: blt 3f
29: mov l(r1),r0
30: inc r0
31: sub a(r1),r0 /W-A+1
32: jsr pc,allocate
33: mov (sp),r0
34: jsr pc,copy
35: jsr pc,swap
36: jsr pc,release
37: mov (sp),r1
38: /
39: 3: mov r(r1),r0
40: jsr pc,bufchar
41: bec 2f
42: jsr pc,getbuf
43:
44: 2: movb nchar,(r0)
45: mov nchar,r0 /to preserve r0 for user
46: inc r(r1)
47: mov $1,w1(r2)
48: cmp r(r1),w(r1)
49: ble 3f
50: mov r(r1),w(r1)
51: 3:
52: inc flag
53: bne 1f
54: jsr pc,fixct
55: br 2f
56: 1:
57: mov flag,u1(r2)
58: 2:
59: mov (sp)+,r1
60: mov (sp)+,r2
61: rts pc
62: /
63: nchar: .=.+2
Defined functions
alterchar
declared in line
1; defined in line
21; used 4 times
nchar
defined in line
63; used 3 times