1: / read and echo character from tty.
2: / perform normal cr/lf uc/lc mapping.
3: tks = 177560
4: tkb = 177562
5: getc:
6: tstb *$tks
7: bge getc
8: mov tkb,r0
9: bic $!177,r0
10: cmp r0,$'A
11: blo 1f
12: cmp r0,$'Z
13: bhi 1f
14: add $'a-'A,r0
15: 1:
16: cmp r0,$'\r
17: bne putc
18: mov $'\n,r0
19:
20: / put a character on the tty.
21: / also performs delay.
22: tps = 177564
23: tpb = 177566
24: putc:
25: cmp r0,$'\n
26: bne 1f
27: mov $'\r,r0
28: jsr pc,(r5)
29: mov $'\n,r0
30: 1:
31: tstb tps
32: bpl 1b
33: mov r0,tpb
34: rts pc
35:
36: / write a string to tty
37: / jsr pc, mesg; <string\0>; .even
38: mesg:
39: movb *(sp),r0
40: beq 1f
41: jsr pc,(r5)
42: inc (sp)
43: br mesg
44: 1:
45: add $2,(sp)
46: bic $1,(sp)
47: rts pc
48:
49: callout:
50: clr r0
51: cmp (r0),$407
52: bne 2f
53: 1:
54: mov 20(r0),(r0)+
55: cmp r0,sp
56: blo 1b
57: 2:
58: mov $start,-(sp)
59: clr pc
60:
61: trvect:
62: br putc
63: br getc
64: br mesg
Defined functions
getc
defined in line
5; used 2 times
mesg
defined in line
38; used 2 times
putc
defined in line
24; used 2 times
tkb
defined in line
4; used 1 times
tks
defined in line
3; used 1 times
tpb
defined in line
23; used 1 times
tps
defined in line
22; used 1 times