1
0
mirror of https://github.com/DoctorWkt/unix-jun72.git synced 2026-02-01 14:32:40 +00:00
Files
DoctorWkt.unix-jun72/pages/e09-01
tim.newsham f7108bb0eb - reviewed some of the notes made during entry and adjusted them
according to what seemed right by reading the code.  Documented
  all of the changes in notes.txt.  Mostly accepting the hand written
  corrections in the pdf file.
2008-05-01 03:02:29 +00:00

56 lines
789 B
Plaintext

/ u9 -- unix
trcv:
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
1:
mov r1,-(sp)
mov r2,-(sp)
mov r3,-(sp)
mov clockp,-(sp)
mov $s.syst+2,clockp
sub $trcv+4,r0 / 0%4 / calculate offset for tty causing
asl r0 / 0%8 / this interrupt
mov rcsr(r0),r2
mov rcbr(r0),r1
tst r2
blt 1f / error
tst tty+6(r0)
beq 1f
bit $40,r2 / parity
bne 3f / branch if set
tstb tty+4(r0)
blt 4f / 37 parity not allowed
br 2f
3:
bitb $100,tty+4(r0)
beq 2f / non-37 parity not allowed
4:
bic $!177,r1
bit $40,tty+4(r0)
bne 3f / raw
cmp r1,$177
beq 5f
cmp r1,$34
bne 3f
5:
mov tty+6(r0),r0
beq 2f
movb r1,6(r0) / interrupt or quit
jsr r0,wakeall
br 2f
3:
cmp r1,$15 / or
bne 3f
bit $20,tty+4(r0)
beq 3f
mov $12,r1
3:
bitb $4,tty+4(r0)