mirror of
https://github.com/DoctorWkt/unix-jun72.git
synced 2026-04-14 07:50:43 +00:00
- more e09 cleanup
This commit is contained in:
10
notes.txt
10
notes.txt
@@ -94,7 +94,15 @@ e09-02
|
||||
e09-03
|
||||
- hard to tell due to hand written correction, but I believe
|
||||
the line before "rts r0" reads "mov (sp)+,r0"
|
||||
- comment "ASC11" (one instead of I) left as is.
|
||||
- comment "ASC11" (one instead of I) left as is.
|
||||
e09-04
|
||||
- text comment says a label was lost! leaving it out for now.
|
||||
- correction "if count >=0" obscures original text in comment.
|
||||
no choice but to use new text.
|
||||
- "ASC11" sic
|
||||
e09-05
|
||||
- 5th to last "byte" line 2nd column is uneadable. pattern suggests
|
||||
the value "000"
|
||||
|
||||
--------------------
|
||||
e10-01
|
||||
|
||||
112
pages/e09-04
112
pages/e09-04
@@ -1,56 +1,58 @@
|
||||
blc $I177,r3 / to make it teletype code and then clear
|
||||
/ bits 7-15 of r3
|
||||
3:
|
||||
mov (sp),r2 / rz contains Bxtty number
|
||||
blt $4,1.·czr(r2) / 1s carrier present for tty
|
||||
beq starxmt / no carrler flush
|
||||
mov :1,-(sp) ,/ yes, place character to be output on stack
|
||||
cmp r1,$11 / is character ht
|
||||
bne 3f / no
|
||||
bltb $2,tty+4(r2) / ls tab to space flag_for_tty set
|
||||
/ (blt 1 of byte 5 in tty buffer area)
|
||||
beq 3f / no
|
||||
mov $240,(sp) / yes, change character to space
|
||||
3:
|
||||
mov (sp)+,tcbr(r2) / place char to be output in tty output
|
||||
/ buffer __ _
|
||||
add $tty+1,r2 / place addr of 2nd byte of tty buf
|
||||
jmp 1f-2(r3) ; area in r2 (which is the column count) and
|
||||
then
|
||||
lncb (r2) / normal / jmp to location determined by digits
|
||||
/ 0 and 1 of character's entry in partab which
|
||||
I, / / is now in r3
|
||||
, rts r0 non—pr:Lntlng
|
||||
br 1f / bs
|
||||
br 2f / nl (llne feed)
|
||||
br 3f / tab (horizontal tab)
|
||||
br 4f / vert (vertical tab)
|
||||
br 5f / cr
|
||||
1: __ _
|
||||
decb (r2) f col decrement column count ln byte 2 of tty
|
||||
area
|
||||
bge 1f / if count >O return to calllnq routine
|
||||
clrb (r2) / col set column count = 0
|
||||
br 1f
|
||||
2:
|
||||
blt $1,r1 / is bit 0 of ASC11 char = 1 (char = lf)
|
||||
bne 2f / es __
|
||||
bitb $20,3(r2) / cr flag is blt 4 of Sth byte of "tty
|
||||
/ area = 1
|
||||
beq 2f / no (only lf to be handled) n __
|
||||
movb $15,1(r.‘2) / place cr in 3rd byte of __tty area
|
||||
/ (character leftover after lf )
|
||||
2:
|
||||
movb (r2),r3 / place present column count in r3
|
||||
beq 1f / return to calling routlne if count = 0
|
||||
clrb (r2) / col clear column count
|
||||
asr r3
|
||||
asr r3
|
||||
asr r3
|
||||
asr r3 / delay = col/16
|
||||
add $;,r3 / start to determine tout entry for tty output
|
||||
br 2
|
||||
3: _ __
|
||||
bitb $2,3(r2) / is blt 1 of 5th byte of tty area e 1
|
||||
/ (tab to space blt set)
|
||||
blc $!177,r3 / to make it teletype code and then clear
|
||||
/ bits 7-15 of r3
|
||||
|
||||
3:
|
||||
mov (sp),r2 / r2 contains 8xtty number
|
||||
bit $4,rcsr(r2) / is carrier present for tty
|
||||
beq starxmt / no carrler flush
|
||||
mov r1,-(sp) / yes, place character to be output on stack
|
||||
cmp r1,$11 / is character "ht"
|
||||
bne 3f / no
|
||||
bitb $2,tty+4(r2) / is tab to space flag for tty set
|
||||
/ (bit 1 of byte 5 in "tty" buffer area)
|
||||
beq 3f / no
|
||||
mov $240,(sp) / yes, change character to space
|
||||
3:
|
||||
mov (sp)+,tcbr(r2) / place char to be output in tty output
|
||||
/ buffer
|
||||
add $tty+1,r2 / place addr of 2nd byte of "tty" buf
|
||||
jmp 1f-2(r3) / area in r2 (which is the column count) and
|
||||
/ then
|
||||
incb (r2) / normal / jmp to location determined by digits
|
||||
/ 0 and 1 of character's entry in "partab" which
|
||||
/ is now in r3
|
||||
rts r0 / non-printing
|
||||
br 1f / bs
|
||||
br 2f / nl (line feed)
|
||||
br 3f / tab (horizontal tab)
|
||||
br 4f / vert (vertical tab)
|
||||
br 5f / cr
|
||||
|
||||
1:
|
||||
decb (r2) / col decrement column count in byte 2 of "tty"
|
||||
/ area
|
||||
bge 1f / if count >=O return to calling routine
|
||||
clrb (r2) / col set column count = 0
|
||||
br 1f
|
||||
2:
|
||||
blt $1,r1 / is bit 0 of ASC11 char = 1 (char = lf)
|
||||
bne 2f / yes
|
||||
bitb $20,3(r2) / cr flag is bit 4 of 5th byte of "tty"
|
||||
/ area = 1
|
||||
beq 2f / no (only if to be handled)
|
||||
movb $15,1(r2) / place "cr" in 3rd byte of "tty" area
|
||||
/ (character leftover after "lf" )
|
||||
2:
|
||||
movb (r2),r3 / place present column count in r3
|
||||
beq 1f / return to calling routlne if count = 0
|
||||
clrb (r2) / col clear column count
|
||||
asr r3
|
||||
asr r3
|
||||
asr r3
|
||||
asr r3 / delay = col/16
|
||||
add $3,r3 / start to determine tout entry for tty output
|
||||
br 2f
|
||||
3:
|
||||
bitb $2,3(r2) / is bit 1 of 5th byte of "tty" area = 1
|
||||
/ (tab to space bit set)
|
||||
|
||||
|
||||
100
pages/e09-05
100
pages/e09-05
@@ -1,55 +1,57 @@
|
||||
beq 3f / no
|
||||
lncb (r2) / increment column count
|
||||
bltb $7,(r2) / are bits D, 1 and 2 set at col GEF
|
||||
beq 1f / no
|
||||
movb $11,1(r2) / yes, place ht in another tab next time
|
||||
br if / grdubyte of tty area (character left over after
|
||||
/ 1f .)
|
||||
beq 3f / no
|
||||
incb (r2) / increment column count
|
||||
bitb $7,(r2) / are bits 0, 1 and 2 set at col 0%8
|
||||
beq 1f / no
|
||||
movb $11,1(r2) / yes, place ht in another tab next time
|
||||
br 1f / 3rd byte of tty area (character left over after
|
||||
/ "lf")
|
||||
3:
|
||||
movb (r2),r3 / place column count ln r3
|
||||
blsb $7,(r2) / make bits O, 1 and 2 of column count :1
|
||||
lncb (r2) / increment column count
|
||||
bis $l7,r3 / clear bits 3-15 of r3
|
||||
neg r3 / delay e dcol start to determine tout entry for
|
||||
/ tty out
|
||||
br 2f / by neg r3
|
||||
movb (r2),r3 / place column count in r3
|
||||
bisb $7,(r2) / make bits 0, 1 and 2 of column count = 1
|
||||
incb (r2) / increment column count
|
||||
bis $!7,r3 / clear bits 3-15 of r3
|
||||
neg r3 / delay = dcol start to determine tout entry for
|
||||
/ tty out
|
||||
br 2f / by neg r3
|
||||
4:
|
||||
mov $176.,r3 / delay = lots start to determine tout entry
|
||||
br 2f
|
||||
mov $176.,r3 / delay = lots start to determine tout entry
|
||||
br 2f
|
||||
5:
|
||||
mov s10.,r3 f cr delay 160ms for tn30D start to determine
|
||||
tout
|
||||
clrb (r2) / set column count = 0 entry
|
||||
mov $10.,r3 / cr delay 160ms for tn300 start to determine
|
||||
/ tout
|
||||
clrb (r2) / set column count = 0 entry
|
||||
2:
|
||||
add $5,r3 / time for this char increment value for tout
|
||||
/ entry by 5 )
|
||||
mov (sp),r2 / O%B r2 contains Sxtty number
|
||||
asr r2
|
||||
asr r2 -
|
||||
asr r2 / O%1 r2 contains tty number
|
||||
movb r3,toutt+3(r2) / place value for tout entry into tout
|
||||
/ table
|
||||
add $5,r3 / time for this char increment value for tout
|
||||
/ entry by 5
|
||||
mov (sp),r2 / 0%8 r2 contains 8xtty number
|
||||
asr r2
|
||||
asr r2
|
||||
asr r2 / 0%1 r2 contains tty number
|
||||
movb r3,toutt+3(r2) / place value for tout entry into tout
|
||||
/ table
|
||||
1:
|
||||
rts rO / return
|
||||
partab: / contains 3 digits for each character; digit 2y1s used
|
||||
/ to determine lf 200 is to added to ASC11 code digits 0
|
||||
/ and 1 are used to determine value for jump table.
|
||||
.byte 002,202,202,002,002,002,002,202
|
||||
.byte 204,010,006,212,012,214,202,0¤2 gpl'
|
||||
.byte 202,0D2,002,202,002,602,202,002 ]wZV”4” Nut
|
||||
.byte 0O2,202,202,002,202,002,0U2,202
|
||||
.byte 200,000,000,200,000,200,200,000
|
||||
.byte 000,200,200,000,200,000,000,20O
|
||||
.byte OOO,200,200,00G,200,000,000,2OO
|
||||
.byte 200,000,000,200,000,200,200,000
|
||||
.byte 200,000,000,200,000,200,200,000
|
||||
.byte 000,200,200,000,200,000,000,200
|
||||
.byte OOO,200,200,000,200,000,000,200
|
||||
.byte ZOO,'U0,000,200,000,200,200,000
|
||||
.byte OOC,¥OO,ZO0,000,200,000,00U,2OO
|
||||
.byte 200,000,000,200,000,200,200,000
|
||||
.byte 200,000,000,200,DO0,200,200,000
|
||||
.byte OOO,200,200,000,200,000,000,2D2
|
||||
xmtt: *
|
||||
jar r0,cpass / get next character from user buffer area
|
||||
rts r0 / return
|
||||
|
||||
partab: / contains 3 digits for each character; digit 2 is used
|
||||
/ to determine if 200 is to added to ASC11 code digits 0
|
||||
/ and 1 are used to determine value for jump table.
|
||||
.byte 002,202,202,002,002,002,002,202
|
||||
.byte 204,010,006,212,012,214,202,002
|
||||
.byte 202,002,002,202,002,002,202,002
|
||||
.byte 002,202,202,002,202,002,002,202
|
||||
.byte 200,000,000,200,000,200,200,000
|
||||
.byte 000,200,200,000,200,000,000,200
|
||||
.byte 000,200,200,000,200,000,000,200
|
||||
.byte 200,000,000,200,000,200,200,000
|
||||
.byte 200,000,000,200,000,200,200,000
|
||||
.byte 000,200,200,000,200,000,000,200
|
||||
.byte 000,200,200,000,200,000,000,200
|
||||
.byte 200,000,000,200,000,200,200,000
|
||||
.byte 000,200,200,000,200,000,000,200
|
||||
.byte 200,000,000,200,000,200,200,000
|
||||
.byte 200,000,000,200,000,200,200,000
|
||||
.byte 000,200,200,000,200,000,000,202
|
||||
|
||||
xmtt:
|
||||
jsr r0,cpass / get next character from user buffer area
|
||||
|
||||
|
||||
Reference in New Issue
Block a user