1: / getchar() -- get a character from input file fin
2:
3: .globl _getchar
4: .comm _errno,2
5: .comm _fin,518.
6:
7: _getchar:
8: mov r5,-(sp)
9: mov sp,r5
10: dec _fin+2
11: bge 1f
12: mov $_fin+6,_fin+4
13: mov _fin,r0
14: sys read; _fin+6; 512.
15: bes badret
16: tst r0
17: beq badret
18: dec r0
19: mov r0,_fin+2
20: 1:
21: clr r0
22: bisb *_fin+4,r0
23: inc _fin+4
24: mov (sp)+,r5
25: rts pc
26:
27: badret:
28: mov r0,_errno
29: clr r0
30: clr _fin+2
31: mov (sp)+,r5
32: rts pc
Defined functions
_getchar
declared in line
3; defined in line
7; used 57 times
- in line 3
- in /usr/source/c/c00.c line
203,
209,
218,
266,
296,
313,
411,
424,
442,
454
- in /usr/source/c/c04.c line
234
- in /usr/source/c/c0t.s line
13,
57,
139
- in /usr/source/c/c20.c line
210
- in /usr/source/c/cvopt.c line
302-307(2)
- in /usr/source/cref/tab/mtab.c line
82,
122-127(2),
215
- in /usr/source/m6/m64.c line
69
- in /usr/source/m6/m66.c line
84
- in /usr/source/s5/rin.c line
10
- in /usr/source/s7/nelex.c line
69
- in /usr/source/sno/sno1.c line
68,
80,
86
- in /usr/source/yacc/source/y2.c line
152,
285-297(6),
307-311(2),
319,
333(2),
347,
379,
412-426(5),
437,
454,
461,
467,
487,
493-496(2),
512-516(2)
Defined variables
_errno
defined in line
4; used 1 times
_fin
defined in line
5; used 14 times