mirror of
https://github.com/DoctorWkt/unix-jun72.git
synced 2026-02-01 14:32:40 +00:00
55 lines
1.6 KiB
Plaintext
55 lines
1.6 KiB
Plaintext
/ jsr r0,setisp
|
|
/ jsr r0,starlpt
|
|
/ br retisp
|
|
ppto: / paper tape output interrupt routine
|
|
jsr r0,setisp / save registers
|
|
jsr r0,starppt / get next character from clist, and output
|
|
/ if possible
|
|
br retisp / pop register values from stack
|
|
|
|
/ starlpt:
|
|
/ cmpb cc+5.,$100.
|
|
/ bhi 1f
|
|
/ jsr r0,wakeup; runq+2; 5
|
|
/1:
|
|
/ tstb *$lps
|
|
/ bge 1f
|
|
/ jsr r0,getc; 5
|
|
/ br 1f
|
|
/ mov r1,*$lpb
|
|
/ br starlpt
|
|
/1:
|
|
/ rts r0
|
|
|
|
startty: / start or restart console tty output
|
|
cmpb cc+1,$5.
|
|
bhi 1f / branch to 1f when character count on tty (? input,
|
|
/ output) list is greater than 5.
|
|
jsr r0,wakeup; runq+2; 1
|
|
1:
|
|
tstb *$tps / test console output ready bit
|
|
bge 2f / branch if ready bit is clear
|
|
tstb toutt+0 / is toutt for console a zero
|
|
bne 2f / if not; branch to 2f
|
|
movb ttyoch,r1 / put character to be output in r1
|
|
bne 1f
|
|
jsr r0,getc; 1 / if char is nul, get a char from console
|
|
/ output list
|
|
br 2f / if console output list is empty, branch to 2f
|
|
1:
|
|
clrb ttyoch
|
|
mov r1,*$tpb / put character in console output register
|
|
cmp r1,$12 / is char a line feed
|
|
bne 1f
|
|
movb $15,ttyoch / put a cr in ttyoch
|
|
1:
|
|
cmp r1,$11 / char = ht
|
|
bne 1f
|
|
movb $15.,toutt+0 / set time out to 15 clock tics
|
|
1:
|
|
cmp r1,$15 / char = cr
|
|
bne 2f
|
|
movb $15.,toutt+0 / set time out to 15 clock ticks
|
|
2:
|
|
rts r0
|