*--. library copy ion lac 4 - 2 rcr 39 dio 1st-y ral 39 dac 1st-x return-3 jmp ,pick up coordinates...

15
*--. LIBRARY - - COPY SERIAL NUMBER PROGRAM TITLE TITLE SYMBOL PROGRAM SYSTEM PROGR-AM CLASS EQUIPMENT REOU'IRED AUTHOR DATE \ FOR PDP-I Charactex Display None Prap I Subroutine Standard PDP-1 B Scope Ben Gurle JF Weldan w Clark I April 24, 1961

Upload: doantuong

Post on 08-Jul-2019

214 views

Category:

Documents


0 download

TRANSCRIPT

*--. LIBRARY - - COPY

SERIAL NUMBER

PROGRAM TITLE

TITLE SYMBOL

PROGRAM SYSTEM

PROGR-AM CLASS

EQUIPMENT REOU'IRED

AUTHOR

DATE

\ FOR PDP-I

Charactex Display

None

Prap

I

Subroutine

Standard PDP-1 B Scope

Ben Gurle JF Weldan w Clark

I April 24, 1961

(Retyped a t Inforonics 9/22/65)

PROGRAM WRImP

I. IDENTIFICATION

1.1 BBN-37; character-display; FRAP Subroutine

1.2 O r i g i n a l machine-code program by Ben Gurley of DEC. S y m b o l i c translation and modification by Welden Clark.

1.3 24 April 1961 (Symbol ic tape and listing dated 10 April 1961)

2 . ABSTFLACT

T h i s subroutine effects the display of alphabetic, numeric, and s p e c i a l characters on t h e PDP-1B scope. In general, t h e program is devised to make the scope react l i k e a typewriter. Carriage r e t u r n , backspace, t a b , and space have t h e same f u n c t i o n s as on t h e typewriter, f o r i n s t a n c e . Only one character is a v a i l a b l e for each typewriter key. Alphabetic characters are all upper case, numerals a r e lower case, and t h e special characters are a rn ix tu~e . Commands for case shift and color s h i f t are ignored. S ize and p o s i t i o n can be specified f o r t h e characters to be displayed. Tabs can be set a s a series of equal intervals of a r b i t r a r y w i d t h . The characters and t h e i r concise code representations are t hose of Concise 111, as installed on t h e BBN PDP-IB computer typewriters on 7 April 1961,

2.2 There are seven separate calls to the subroutine. The first one sets character size. The second sets t h e t a b interval. The third se ts a location on t h e scope face for the d i s p l a y . The fourth " t u r n s the page" by r e s e t t i n g the position v a r i a b l e s to t h e i r i n i t i a l values.

The fifth call produces a d i s p l a y of a single character; t h e sixth c a l l displays, in sequence, up to three characters whose concise codes are l o c a t e d in one eighteen bit word in core storage; and t h e seventh

w i l l d i s p l a y an e n t i r e passage. Examples of the calling sequences follow:

(1) F i r s t call sets s i z e o f character. Remains s e t u n t i l changed.

Cs is l a w rn jda char-size F

s i z e number

, r e t u r n s here

Height of character is 71512 x m of scope face .

(2) Second call sets t a b interval. ( U s e o n l y if t a b d e s i r e d . )

Cs is law n , t a b i n t e r v a l , n/512 of scope face w i d t h

j d a s e t - t a b r , r e t u r n s here

To s e t t a b i n t e r v a l s as even multiples of character spacing use multiples of 8 X m for n.

( 3 ) T h i r d c a l l sets lower l e f t corner of first charac- ter. Will increment until erased or changed.

Cs is lac x0,yO j d a position Y

, scope coordinates

, returns here

xO should be in b i t s 1-8 w i t h s i g n b i t a t 0, yO at bits 10-17 w i t h s i g n at 9, f o r 512 x 522 line scope face w i t h origin at center.

(4) Fourth call resets to initial position specified in 3 ,

Cs is jsp erase r , r e t u r n s here

(5) Fifth call displays one character. Concise code must be s tored lef t - j u s t i f ied,

Cs is law address , address of register c o n t a i n i n g concise code

jda display-one r , returns here

a f t e r a l l codes except 12 code 1-4-1 r e t u r n s here after

a 12 code

A s p e c i a l feature built into t h e routine is t h e recognition of t h e concise code 12, w i t h immediate r e t u r n two registers beyond the j d a . T h i s is noted - in calling sequences (5) and (63,bove. Ttrus, any s t r i n g of concise codes packed three to a word, left-to-right, and t e r m i n a t e d by a code 12 can be displayed w i t h one ca l l -up. This s p e c i a r ~ e t u r n has been assigned to r + 1, and thus a skip fo l l owing return from any other character is necessary f o r complete safety. The skip can reasonably be ignored when s i n g l e c h a r a c t e r s or groups of three are d i s p l a y e d , however, since the 12 code is no t defined as a character code and is n o t T b t a i n a b l e f r o m the Concise 111 typewriter keyboard.

Attachment ta gem0 1652-17 Charac ter-Display (BETI-37 ) 4 Yay iP62

A special featwe buLlt i n t o t he routine is t h e recognition of t he concise code 12, x%th m e d i a t e return t-m registers beyond the . This is noted in calling sequences (-d (61, above. Thus, any 9trf.n;: of concise codes pzcked three to a rmrd, lef t - to- r ight , and terminated by a code 12 can be displayed with one call-!IF. This special, return has b e z assigned to r + 1, and thus a skLp following return f rom any other ~ h ~ a c t e r is necessary for complete safety. The skip can reasonably be i p o r e d when single characters or groups of three are displayed, however, since t h e 1 2 code is not d ~ f ined as a character code and is not obtainable r " r~m7he Concise IIJ type- writer keyboard.

Attachment to Memo 1652-17 Charac ter-Display (730~-37 L May 1962

Character-Display, ESN-37, FRAP subroutine ,3riglinal machke code program by 8en Gwleg of DEC ,Sgmbclic translation and md i f i ca t i ons by Welden Clark ,LO April 1961

3

ext characterdisplay org charaeter-diswlay nap

,(I) F i r s t c a l l sets size of' c3aracter. Remains set until changed. ,Cs is law m ,siae number a jda char-size 9 r , returns here ,Height of character is 7/512 face.

kxt char size . . clap return-l

get-size l a c + - 2 sal s9 dac spct-spacing

a a l s3 dac char spacing add spot-spacing add spot spacing dac line-spac i ng

return-1 jmp

,character s i z e number, m

,pick up s ize

, v i d i n t e rva l on 512 x $12 l i n

,spacing is 8/5 char, width

,spacing is 10/7 char. height

I , (2) Second call s e t s tab interval, Use only if tab desired. ) .Cs is l a w n , fxb interval, n/512 of scope

face width jda set-bab T ,returns here

P

,To set tab intervals as even multiples of character spacing use multiples of 8 x n fo r n

gxt set-tab . . dap re tu rn 2

get-tab l a c + - 2 ,pick up tab i n t e rva l value sal 39 ,tab internal in 0-8 dac tab-interval

return WP = * ¶ , (3 ) Third call sets lower left corner of first character. WiU increment u n t i l erased or changed. ,Cs is lac xO,yO ,scope coordinates

j da position r , re tu rns here

9

,xO should be in bits 3-8 with s i cn b i t at 0 , g0 at b i t s 10-17 with sign at 9, , for 512 x 512 line scope face with or ig in at center. 5

ex t posi t ion

1

Attachment to Vemo 1652-27

dap return-3 ge t -pos i t ion lac 4 - 2

rcr 39 d i o 1s t -y ral 39 dac 1st-x

return-3 jmp

,p ick up coordinates

,8 bits + sign now i,n 0-8

,8 bits * sign now in 0-8

f , (4) Fourtn c a l l resets to initial p o s i t i a n specified in 3. Cs is jsp erase

r , returns here f ext erase dap retwn-4

lac 1st-x dac x lac 1st-y dac g jmp . .

t

(5 3 Fifth c a l l disp1a:y.s one character. ,Concise code must be stared l e f t - j u s t i f i ed . Cs is law address

,j da disp la y-one r

r + l ex2; display-one . .

dzp return-5 lac =nop dac next? Lac ' 4 - & dap characters j m p test-l

, reset x to start of line

,reset y to top of page

,address of register containing concise code

,returns here after all codes except 12 code

,ret.ms here af te r a 12 code ,lot of address of char code

,pick up the character code ,store it

t , ( 6 ) Six th c a l l displays up to three characters where codes are in one word, Cs is Law address ,address of register containing

three codes j cia display-three r ,returns here after a l l codes

except 12 r + l ,returns here after a 12 cqde

ext display-three . . dap ~eturn-5 'Law ' 2 dac char-caunter ,set for three characters lac = s k i p dac next? lac + + - 6 ,pick up word with codes dac characters ,store it j m v test-l

Attachment to ??ern0 1.55'2-17 Charac ter-3ispl.a-y C ~ B N - ~ ? ) 7 May 1962

, ( 7 ) Seventh c a l l d i s p l a p an arb it ray^ length message consisting of a string of consecntive words in memory, of thrge concise codes each, t e m i n a t h g in a 12 code.

l a w message jda display-message r

,for address ef 1st word in ac

,returns here t

e x t display message .. dap return-? lac display-message j da &splay- three ,to c a l l 4- skip jmp ,last character was 12 coda i d x display-message , f o r next word jmp display-message + 2 , loop

f

backspace

l a w char-table dap table-address lac characters and =7JOOOO dac char sad -770000 Jmp next-line sad =tab jmp b b sad =ucase jmp next? sad rlcase jmp next? sad =black jmp next? sad =red j m u next? sad =bspace jmp backspace sas =120000 j mp f ind-matr ix fdx return-5 jmp return-5 Jmp find-matrix

lac x sad 1st-x j q next? sub char -spat ing sub =I dac x jmp next?

,nask off 2nd and 3rd characters

,do a carriage return

,do a tab

,ignore code f o r s h i f t to upper case

,ignore code for shift to lower case

,ignore code f o r s h i f t to black

,ignore code f o r s h i f t to red

,do a backspace ,code for message end

,backspace impossible,already at g f t

next -line

next-page

tab

which-tab ?

next? return-5 next -c har

F find -matrix

lac 1s t-x d2c x lac g sals line -spa ing dac y jm;3 next-page Jmp n e A ? lac Ist-y cizc y imp next? I i a w l cac tab-counter lac x sub tab-interval. dac x-pos t-tab $2 Q

j m p + + L idx tab-camter Izc x-post-tab _Imp which-tab? lac tab-counter cma dac tab-comter k c 1st -x dac x-past-tab lac x-pos t -tab add tab-interval dac x-past-tab i s p %ab-counter jmp do-tab lac x-post-tab dac _u

add char-spacing S Z D jmp next-line . jnrp .. is? char-counter ,jmp + * 3 l a c jnop dac next? lac characters ral s6 dae characters jmp test- l

ral s7 add table-address dap matrix-1 (?an rnatriy-2 idx matrix-2 law 7 dac up-c ounter

,reset x to start of l i n e

,res2t y d m one line szo

,reset y t3 top of page

3 loop

, ~ a b completed

,temp atorage

,address of table register wlthlst h

la74 5 dac rt-counter lac x dac display-x lac p dac display-y

nratrh-l lie . . matr ix-2 lac . . test-spot? sp i

j m p q c 3 dac matrix-af tes

j~ + + 7 &o matrix-bef o re dzc nratrix-after l i o display-y lac display-x d?Y

Zio matrix-bef ore is? uw-counter jmp Zncrement-!r isp rt-counter j m p reset-up lac x add char-spacing dac x ad char-spacing sz 0 j m p next -line jmp next?

reset-up law 7 dac up-counter lac 7 dac display-y lac display-x ,

add spot-spacing dac display-x j m p + + L

inc rernent-y lac display-y add spot-spacing dac display-y lac matrix-af t e r r c l sl

,x value f o r scope spot

,y value f o r scope spot ,lst half of 35 b i t word defining 5 x 7 ,2nd half

,bit t e s ted was a 1,disphy a spot ,bit t e s t ~ d was a 0, go to next b i t a n d i

,display a spot in the 5 x 7 char* matrix

,at top of matrix p t ? 9 no J ~ I ~ ~ , at rt edge of matrix yet? 9 no , ? P S , s e t x f o r next character

,reset display y for next character

,increments display-x

,advance mat& in ac-io f o r next test

jmp test-spot?

@' A.tt2chmen-t to Memo 1%-17

,!4OTZ,.....Characters and concise codes are those of Concise 111. %I:: cne charactzr is svailzble per key, The charnct;ars f o r t h e non-space kegs, codes LO and 56, are not in t h e table , butv b l a x k registers corresponding to those alphzbe t ics , lower case numerals, spac", ?arentheses, byphen, questian-mark, coma a?d period are in t h e :able. Carriage return, backspace, and t a b are internal progam operations, 9

9

Each character t h a t can be displayed is represented in the table by two words, s t m t i q at 2 times the concise code + the 1 s t table address. The tuo words are a l inear representation of a 5 x 7 matrix, proceeding from left to right and bottom to top. 3

9

char-table C)OOOOO

spot-spacing char -spat ing line -spac ing 1st-x 1st-y X V

display-x d i splay-y characters char-c o ~ ~ n t e r tab-interval J table continues

,table begins, code f o r nspacen

9 9

,table interrupted ,temporary s torage

, z era

,code 21, question-aark

9 5

Character-Display ( 7 3 ) ~ - 3 7 ) 7 %r 1962

tab-counter x-post-tab cornma . black

red

up-comter rt-counter ma t r i~ -~ te r matrix-bsf o re 1

tab1 e c ontinues

table-address q Q P =skip =770000

*. 76 0000 skip 770000

,z ,Cable intsrrupted

, table continues

,a right brace w i l l be displayed

,a left brace Kill be displayed ,t,able interrupted

7 s p c e for syeciaf character, code 40

?r , tzble i n t e r r u p t e d

,canstants f o r routine

Attachment to ?Tento 1552-17 Character -3isplag ( 18"-37 ) ? Valr 1962

, table continues (300201 0o.LC)oo 022027 600000 0 0 000007 6h0400 C)

0 7601tL2 172370 776231 U T S L 372030 ILoS04 775030 121070 7 75231 f i4602 37b2 2 1 10L402 372030 ISQSLL 7742 01 h375 2037 7 ?tot 00

-1case 720000 =tab 360000 3 t a b l e continues

10 0 .

wcase char -black =red

, c ~ d e 94, hyphen

, c ~ d e 55, r i g h t parenthesis

, w d e 56

,code 57, lgft parenthesis

,code 60, no% a typermi ter code

, i , t&le interrupted

,period , table ends, codes 74-77 unavailable as

jmy end