1
0
mirror of https://github.com/DoctorWkt/unix-jun72.git synced 2026-01-13 15:27:49 +00:00
2008-05-02 17:50:21 +00:00

59 lines
2.0 KiB
Plaintext

wakeall:
mov $39.,0f / flll arg2 of wakeup call wlth 39
1:
jsr r0,wakeup; runq+4; 0:.. / wakeup the processes in the
dec 0b / wait list; decrement arg2
bge 1b / if not done, go back
rts r0
ttyo: / console typewriter output interrupt routine
jsr r0,setisp / save registers
jsr r0,startty / put a char on the console tty output buffer
br retisp / restore registers
retisp:
mov (sp)+,clockp / pop values before interrupt off the stack
mov (sp)+,r3
mov (sp)+,r2
mov (sp)+,r1
mov (sp)+,r0
rti / return from interrupt
ppti: / paper tape lnput interrupt routine
jsr r0,setisp / save registers
movb pptiflg,r1 / place "pptiflg" in r1
jmp *1f(r1) / jump to location speclfled by value of "pptiflg"
1:
retisp / file not open
1f / file just opened
2f / file normal
retisp / file not closed
1: / file just opened
tstb *$prs+1 / is error bit set in prs
bge 1f / no
jsr r0,pptito / place 10 in toutt entry for ppt input
br retisp
1:
movb $4,pptiflg / change "pptiflg" to indicate file "normal"
2:
jsr r0,wakeup; runq+2; 2 / wakeup process for ppt input entry
/ in wlist
tstb *$prs+1 / is error bit set
blt 1f / yes
mov *$prb,r1 / place contents ppt read buffer in r1
jsr r0,putc; 2 / place character in clist area for ppt input
br .+2 / temp / if no space in clist character lost
cmpb cc+2,$50. / character count in clist area for ppt lnput
/ greater than or equal to 50
bhis retisp / yes
inc *$prs / no, set reader enable bit in prs
br retisp
1:
movb $6,pptiflg / set pptiflg to 6 to indicate error bit set
br retisp
/lpto: