Home
1 - DSpace@MIT
Contents
1. a on fix 15 init 1 FORGO ok kk kk Rok ok XXX kk kk kk AKAN ko kk ke e E eek eee NAA kei ke IK IK HK ACK inner workings procedure i declare i fix 15 index fix 15 fixnum fix 15 bit str bit 16 defined fixnum low x high x low y high y left line fix 15 index raw gt font chr i index bit str raw gt Eont vector index low x fixnum bit str raw gt font vector index 1 low y fixnum bit str raw gt font vector index 2 high_x fixnum bit str raw gt font vector index 3 high ys fixnum call grin linev low x low y high x low y plane9 on call grin linev high x low y high x high y plane9 on call grin linev high x high y low x high y plane9 on call grin linev low x high y low x low y plane9 on call grin linev raw font base line 511 raw gt font base line plane8 on call grin linev 0 raw font x line 511 raw gt font x line plane8 on call grin linev 9 raw font cap line 511 raw gt font cap line plane8 on now adjust wrt baseline and left side low y low y raw gt font base line high y high y raw gt font base line high x high x low x left line low x T low x 0 fixnum low x raw gt font vector index bit str fixnum low y raw gt f
2. init text seg procedure dir name text file text ptr char count declare ioa entry options variable com error entry options variable hcs get bit count entry pointer fix 31 hes initiate entry char 168 vary char 32 vary ptr fix 31 dir name char 168 vary text file char 32 vary text ptr pointer syscode fix 31 bit count fix 31 char count fix 15 oops condition syscode manager procedure string declare string char 64 vary call com error syscode init text seg string signal oops u end on oops begin goto exit ena call hcs initiate dir name text file text ptr syscode if syscode Y then call syscode manager initiating text file else call ioa gt text file a has been initiated text file call hcs get bit count text ptr bit count char count bit count 8 exit end 113 nono O m 0 uA am V am am oe du a a a a A ee a part finder procedure text start finish key parts char count error declare ioa ioan entry options variable ask askn entry options variable start pointer s 1 1 fix 15 based start finish pointer 1 1 fix 15 based finish key pointer k 1 1 char 16 vary based key text pointer ascii string Char 29000 1 based text end ptr pointer prev end ptr pointer EXx15 ptr pointer fix15 fix 15 based fix15
3. a e emo e m m r m s m um r r m nm um une dum ee M um cue oe cua Dm ee o we a ee xl yl x2 y2 menu ptr gt menu seg prompt port planes off end right margin x2 bottom margin yl next do the characters ret o e text mode menu ptr gt menu seg prompt port txtmode substr text mode 1 1 norm inv do i 3 to instance gt item content gt fixl5 2 one char instance gt item content gt ascii array i if ascii num 95 amp ascii num 127 then ascii num ascii num 32 if one char then x x menu ptr gt menu seg prompt port w ch else if one char then sleazy tab x x 5 menu _ptr gt menu_seg prompt_port w_ch else if one char ret then do x menu ptr gt menu seg prompt port x abs menu ptr gt menu seg prompt port x ch Y y menu _ptr gt menu_ seg prompt port h ch end else do if x menu ptr menu seg prompt port w ch lt right margin if y gt bottom margin then do call grin text x y text mode one char X x menu ptr gt menu seg prompt port w ch end end end end then 158 a m r r i e 4 m e O
4. e int procedure port x port y int x int y z include p dcl declare grin vis entry bit 16 grin pos entry fix 15 fix 15 fix 15 raw XYZ entry fix 15 fix 15 fix 15 declare x Ve zZ fix 15 port x fix 15 port y fix 15 curs x fix 15 curs y fix 15 int x fix 15 int y fix 15 float x float 23 float y float 23 1983 HR RR Rok koh ee de AI he RRR RRR IRR e oe e He e RE KHIR IK KK KKK RK unspec p 000p0000 b4 call raw xyz x y Z if 2 gt then do float x float y X y int x p gt q win xorg float x p q tab xorg int y p gt q win yorg float y p gt q tab yorg float x int x float y int y port x p gt q prt xorg float x p gt q win xorg port y p gt q prt yorg float_y p gt q win yorg call grin vis p gt q cur vis call grin pos p gt q cur_nbr port x p gt q buf xorg port y p gt g buf yorg end else do p gt q tab xext p gt q tab yext p gt q win xext p gt q win yext p q scale p gt q p gt g scale p gt q p gt q win xext p gt q win yext Pp gt q prt xext p gt q prt yext xoffset yoffset 97 ww _ onore A r re
5. else end call ioa end f ee ee e e e kk set x procedu call ioa call ioa call ioa call ioa call ioa 191 ee call grin linev raw gt font cap line 511 raw gt font cap line plane8 on prev y raw gt font cap line end if z 8 then do do z 8 while z 8 await release call tablet x y z end raw gt font cap line raw gt font cap line 1 call grin linev 0 prev y 511 prev y plane8 off call grin linev 0 raw gt font cap line 511 raw font cap line plane8 on prev y raw gt font cap line end gt cap line is located at i r raw gt font cap line SEALE A SALES A LA LEA ERA SAE RE RA ERE ER EE EEEE re height via tablet press 1 to position x line press 2 to move x line down 1 pixel press 3 to accept position press 4 to move x line up 1 pixel prev y raw gt font x line call tablet z y Z flush do z 0 while z 4 do z 0 while z 1 await press call Stablet x y 2 end if z 1 then do do z 1 while z await release call tablet x raw gt font x line z call grin linev 4 prev y 511 prev y plane8 off call grin linev 6 r
6. em _ unu e an ae if new menu gt m live item null then do call Skill menu list new menu menu ptr end match header new menu match header gt m live item match item call draw menu new menu menu ptr end 169 init menu procedure dir name menu file menu ptr declare ioa entry options variable com error entry options variable hcs initiate w options entry char 168 vary char 32 vary char 32 vary bit 1 pointer fix 31 dir name char 168 vary menu file char 32 vary menu ptr pointer syscode fix 31 oops condition Syscode manager procedure string declare string char 64 vary call com error syscode init menu string signal oops end on oops begin goto exit end call hcsfinitiate w options dir name menu file menu file l b menu ptr syscode if syscode lt Y then call syscode manager initiating menu file else call ioa gt menu a has been initiated menu file exit end 179 APPENDIX V Source code for contour package 171
7. nn o A 14 48 54 Tuesday April 26 1983 prompt list maker procedure menu ptr text ptr head ptr start finish include menu dcl declare scs allocn entry fix 31 pointer area head ptr pointer match ptr pointer 1 match based match ptr 2 string char 32 vary 2 data pointer 2 next pointer text ptr pointer ascii string ascii array 1 1 start finish string start string length i j fix15 alloc bytes one char something there yes no char l based char 1 based fix 15 fix 15 fix 15 fix 15 fix 15 fix 15 based fix 31 string length 2 char 1 bit 1 bit 1 init l b bit 1 init 0 b III RARA RARA He He de e RARA RAR ARRE TO TOI TOI TTI TR TOTTI IIIT He IK IRR ICR menu ptr gt menu seg menu area empty head ptr null something there no string length 9 do i start to finish one char text ptr gt ascii array i if one char D then do if something there then do string length string length 1 alloc bytes string length 2 call scs allocn alloc bytes match ptr gt match data menu ptr gt menu seg menu area match ptr match data fixl5 string length delete last cr 116 do j
8. a ww a X ww oe we we we ae i ee oe mw re ewe a e T e u A a um _ __ e e o c coo a e Y r r e nom contour c5 step5 summary 5 review vidicon alignment tablet io util 172 n _ nn n e r m nn 9 93 32 34 Thursday April 28 l gt u gt nardy gt edge gt raw file structure incl pll declare raw pointer 1 font based raw 2 name char 32 vary 2 source char 32 vary 2 date char 32 vary 2 cap line fix 15 2 x line fix 15 2 base_line fix 15 2 serial num fix 15 2 chr 1 128 3 name char 12 vary 3 index fix 15 2 vector 1 1 bit 16 le 173 1 2u gt nardy gt edge gt c5 pll 03 39 11 Thursday April 28 1983 c5 procedure include raw_file structure declare ioa ioan entry options variable askn entry options variable iocs get entry char l vary grin ocolor entry fix fix fix grinSlinev entry fix fix fix fix bit 16 fix grin rectv entry fix fix fix fix bit 16 fix hcs append seg entry char 168 vary char 32 vary fix 31 hcsSinitiate w options entry char 168 vary char 32 vary char 32 vary bit 1 pointer fix 31 hes terminate entry pointer vidicon entry Stablet entry fix 15 fix 15 fix 15
9. 28 This locates one of four cursors 1 2 3 or 4 at screen x screen y Whether or not it is visible is controlled by map cursor vis Scale specified in map frame calls has no effect on cursor It always maps to the screen as if scale were 1 2 2 2 14 map cursor nbr This procedure is declared and called as follows declare map cursor nbr entry fix 15 number fix 15 call map cursor nbr number This procedure controls which of four cursors 1 2 3 4 is used when map int or map fp is called 2 2 2 15 map cursor vis This procedure is declared and called as follows declare map cursor vis entry fix 15 string4 bit 4 call map cursor vis string The procedure controls which of the four cursors is visible The cursors 1 2 3 4 correspond with string positions 1 2 3 4 b is off l b is on For example 1010 b turns cursors 1 and 3 on 29 2 2 2 16 mapfload parameters This procedure is declared and called as follows declare maps Load parameters entry call map load parameters This procedure creates if necessary and loads the data segment without initializing it It is safe to call this procedure instead of map setup only when the user is sure that map param l has already been created and initialized by a previous program 30 2 3 FURTHER WORK 2 3 1 Device independent graphics package An obvious improvement in this package is making it a part of a graphics
10. step5 entry fix fix fix fix fix pointer review entry pointer Salignment entry pointer declare x y zZ fix 15 xorg yorg fix 15 xstep ystep fix 15 on fix 15 init 1 off fix 15 init 0 declare instruction fix 15 open sequence fix 15 init 1 close sequence fix 15 init 2 open contour fix 15 init 3 close forward fix 15 init 4 step forward fix 15 init 5 close fwd right fix 15 init 6 step fwd right fix 15 init 7 rotate cc fix 15 init 8 check again fix 15 init 9 look for edge fix 15 init 19 keep looking fix 15 init 11 bad start fix 15 init 12 close file fix 15 init 13 declare planes8914 bit 16 init 0796 b4 plane8 bit 16 init 08100 k4 planelO bit 16 init 0400 b4 174 2 gt u gt nardy gt edce gt c5 pll blue fix 15 init 1 green fix 15 init 2 white fix 15 init 7 font_file char 32 vary answer char 3 vary yes char 3 vary init yes syscode fix 31 systemao condition eee eee oen dn CERERE EEE RE OCIONCHCICR HC RA OK CR OON ION OR OR IY e a de eee i check ahead procedure tentx tenty xorg yorg instruction aeclare tentx tenty fix 15 xorg yorg fix 15 instruction fix 15 declare arin read entry fix fix fix fix bit 32 arin uncolor entry fix fix fix bit 32 CE g b fix 15 pixel bit 327 call grin read tentx tenty tentx tenty pixel cal
11. end now figure the origins and extents prt buf tab Utab cur scr prt Uprt win Uwin the equation is a b c d solve for c a b d p gt q tab xorg p gt q Utab xorg p q prt xorg p gt q buf xorg p gt q buf xext p gt q Utab xext p gt q tab yorg p gt q Utab yorg p gt a prt yorg p gt q buf yorg p gt q buf yext p gt q Utab yext p gt q tab xext p q prt xext p gt q buf xext p gt q Utab xext p gt q tab yext p gt q prt yext p gt q buf yext p gt q Utab yext p gt q cur xorg p gt q scr xorg H l tl 90 enna A i r e we e e e r p q prt xorg p gt q buf xorg p gt q buf xext p gt q scr xext p gt q cur yorg p gt q scr yorg p q prt yorg p gt q buf yorg p gt q buf yext p gt q scr yext p gt q cur xext p q prt xext p gt q buf xext p gt q scr xext p q cur yext p gt q prt yext p gt q buf yext p gt q scr yext p gt q win xorg p gt q Uwin xorg p gt q prt xorg p gt q Uprt xorg p gt q Uprt xext p gt q Uwin xext p q win yorg p gt q Uwin yorg p gt q prt yorg p gt q Uprt yorg p gt q Uprt yext p gt q Uwin yext p q win xext p gt q prt xext p gt q Uprt xext p gt q Uwin xext p gt q win
12. inn e 1 gt u gt nardy gt use gt erase prompt pll 02 32 51 Thursday April 28 1983 erase prompt procedure menu ptr include menu dcl declare grin rectv entry fix fix fix fix bit 16 fix xl yl x2 y2 fix 15 off fix 15 init 0 ERRAR IOI IOI III IOI KK RR RARA RAR RRA IK ICR IK xl menu ptr gt menu seg prompt port x abs yl menu ptr gt menu seg prompt port y abs x2 xl menu ptr gt menu seg prompt port x ext 2 y2 yl menu ptr gt menu seg prompt port y ext 2 call grin rectv xl yl x2 y2 menu ptr gt menu seg prompt port planes off end 159 M e ono au X a M o e a a cre ae re ee ee ee re ee ee we ee r l u nardy use draw menu pll 02 33 45 Thursday April 28 1983 draw menu procedure new menu menu ptr include menu del include menu item dcl declare draw item entry pointer bit 1 pointer item ptr pointer normal bit 1 init 9 b inverse bit 1 init 1 b do item ptr new menu gt m first item repeat item ptr gt item left while item ptr null if item ptr new menu m live item then call draw item item ptr inverse menu ptr else call draw item item ptr normal menu ptr end end 160 a mr v m m we m we m a a m a r M r m e m e m e r m m m we m
13. match ptr gt match string r string length match ptr gt match data gt fix15 call ioa match ptr gt match data gt fix15 i match ptr gt match data gt fixl5 do i 3 to string length 2 call ioan a match ptr gt match data gt ascii array i end call ioa rmatch ptr match next p match ptr match next end B n end 133 1 gt u gt nardy gt menu gt port writer pll 02 13 07 Thursday April 28 1983 port writer procedure menu ptr include menu dcl one port procedure string port ptr declare string char 16 vary ioa entry options variable port ptr pointer l port based port ptr 2 x abs fix 15 2 y abs fix 15 2 x rel fix 15 2 y rel fix 15 2 x ext fix 15 2 y ext fix 15 2 x ch fix 15 2 y ch fix 15 2 w ch fix 15 2 h ch fix 15 2 outline fix 15 2 txtmode bit 16 2 planes bit 16 call ioa r gt a string call ioa x abs i port ptr gt port x abs call ioa y abs i port ptr gt port y abs call ioa x rel i port ptr port x rel call ioa y rel i port ptr port y rel call ioa x ext i port ptr gt port x ext call ioa y ext i port ptr gt port y e
14. to gt item x 0 permanently do call scs allocn 8 new menu menu_ptr gt menu_seg menu_area new menu gt m first item to permanently new menu gt m live item null permanently from gt item right new menu permanently end end else do if to gt item y from gt item y then do to gt item left from gt item left temporarily from gt item left to permanently end else do to gt item y lt from gt item y do while to gt item y lt from gt item y to gt item left from gt item left temporarily from gt item left null permanently from to gt item left end to gt item left from gt item left temporarily from gt item left to permanently end to gt item x from gt item x 1 permanently end end 127 1 gt u gt nardy gt menu gt option maker pll 02 00 24 Thursday April 28 1983 opticn maker procedure menu ptr text ptr include menu dcl declare ioa ioan space tab ret ch word 1 word 2 first legal start finish done quit yes no text ptr ascii string ascii array 1 1 Start finish entry options variable char 1 init char 1 init yg char 1 char 1 char 16 vary fix 15 fix 15 fix 15 fix 15 bit 1 bit 1 init l b bit i init 0 b pointer char 1 based char 1 based ERRAR RARA RARA RARA
15. 3 Prompts 4 Ports 54 Options 6 Making the menu program The use package a user manual l Using the menu data segment 2 Use of space 3 Communication between programs Further work 4 Type digitization page 53 l The ideas l Type digitization techniques 2 An edge detecting routine 3 Chain coding 4 Alternative chain coding routine 2 The contour package a user manual l Description of the font gun 2 Setup to digitize a font 3 Capturing the characters 3 Further work 5 Conclusion page 68 References page 71 Acknowledgements page 73 Appendix I Source code for map package page 75 Appendix II Source code for the menu package page 194 Appendix III Model menu page 135 Appendix IV Source code for use package page 1141 Appendix V Source code for contour package page 179 l INTRODUCTION 1 1 SOFTWARE TOOLS 1 1 1 Programmes for solutions The arrival of the computer at the graphic designer s workstation or the arrival of the graphic designer at the computer workstation recalls a statement by Karl Gerstner a Swiss graphic designer who advocated instead of solutions for problems programmes for solutions 1 He proposed that graphic designers focus their efforts on the design process rather than directly on final solutions Gerstner s programmes were not computer programs but were general methods for approaching visual problems and systematically generating alternative solu
16. end if quitp no then do ena call draw title match item inverse menu ptrj call erase prompt menu ptr if match item item right null then do you are about to call a program now you might break out in the middle of it so you have to prepare the menu tree for that eventuality first update title then get program name then set live item pointed to by match header to null this sets you up for restoring the menu to how it was before you picked the last item program name i str len match item gt item content gt fix15 _num do i 3 to str len 2 program name program name match_item gt item content gt ascii_array i end anticipating successful completion of program match header m live item null if menu ptr gt menu seg pop up mode l b then call Serase menu planes menu ptr call scs cl program name call tmr Sbefore dollar program name if menu ptr menu seg pop up mode l b then call erase menu planes menu ptr call grin ocolor menu _ptr gt menu_seg menu_color ov menu ptr gt menu seg menu color ov9 menu ptr menu _seg menu color ovl call restore menu menu ptr makes match item normal end n E else do call draw prompt match item normal menu ptr call draw menu match header gt m live item gt item right menu ptr end end we ree 9 mos E um a eue cR cue i
17. mo map 4 load parameters setup U cursor cursor vis cursor nbr U frame org frame ctr frame loc frame reset recalc window port tablet 4 x port y port int fp raw xyz io util 17 1 gt u gt nardy gt map gt map dcl incl pll 02 57 21 Thursday April 28 1983 declare map load parmeters entry map setup entry mapScursor entry fix 15 fix 15 fix 15 map cursor vis entry bit 4 map cursor nbr entry fix 15 map frame org entry fix 15 fix 15 fix 15 map frame ctr entry fix 15 fix 15 fix 15 map frame loc entry fix 15 fix 15 fix 15 map frame reset entry mapStablet entry fix 15 fix 15 fix 15 fix 15 mapSwindow entry float 23 float 23 float 23 float 23 map port entry fix 15 fix 15 fix 15 fix 15 map x port entry float 23 returns fix 15 map y port entry float 23 returns fix 15 mapSint entry fix 15 fix 15 fix 15 fix 15 fix 15 maps fp entry fix 15 fix 15 float float fix 15 78 nno we m e O l u nardy map p dcl incl pll 02 58 13 Thursday April 28 1983 e nano A A a n m a con we KM K
18. 23 then substr menu ptr gt item port txtmode 5 1 l t 121 1 gt u gt nardy gt menu gt tree maker pll 15 52 57 Tuesday April 26 1983 tree maker procedure menu ptr text ptr head ptr start finish include menu dcl include menu item dcl declare ioa ioan scsSallocn add tree node from auxiliary space tab ret ch i 3 menu level Space count first legal last legal start finish done quit leaf bit yes no text ptr ascii string ascii array 1 1 label ptr content ptr head ptr next char procedure entry options variable entry fix 31 pointer area entry pointer pointer pointer pointer pointer char 1 init char 1 init char l char 1 fix 15 fix 15 fix 15 fix 15 fix 15 fix 15 fix 15 bit 1 bit 1 bit 1 init 1 b bit 1 init 9 b pointer char 1 based char 1 based pointer pointer pointer BERR RRR e e de e e e de de e REE KER ERR ERE he e o e e he he RARA e e de eee KEKE i i 1 ch text_ptr gt ascii_array i end bili I de e He IA e de IK Ae de e de de de e He He He He e He He KK RIK IR IK KK IR de He de de de de de de de kk kk KICK K rm iii ee ee ee A n o nn ur save string procedure data ptr declare scs allocn entry fix 31 pointer area data ptr pointer alloc bytes fix 31 fix num fix 15
19. 3 6 substr xbits 5 6 substr raw_data 3 3 6 substr ybits ll 6 substr raw data 4 3 6 substr ybits 5 6 substr raw data 5 3 6 xbits xbits ybits ybits zbits zbits if p gt q tab xext gt then do if x lt p gt q tab xorg then x p gt q tab xorg else if x gt p gt q tab xorg p gt q tab xext 1 then x p gt q tab xorg p gt g tab xext l end else do if x gt p gt q tab xorg then x p gt q tab xorg else if x lt p gt q tab xorg p gt q tab xext 1 then x p gt q tab xorg p gt q tab xext 1 end if p gt q tab yext gt then do if y lt p gt q tab yorg then y p gt q tab yorg else if y gt p gt q tab yorg p gt q tab yext 1 then y p gt q tab yorg p gt q tab yext 1 end else do if y gt p gt q tab yorg then y p gt q tab yorg else if y lt p q tab yorg p gt q tab yext 1 then y p gt q tab yorg p gt q tab yext 1 end 103 A e eco 194 APPENDIX II Source code for menu pac
20. 3 ov9 fix 15 3 ovl fix 15 2 ground port 3 x abs fix 15 3 y abs fix 15 3 x rel fix l5 3 y rel tix 15 3 x_ext fix 15 3 y ext fix 15 di x ch ix 15 3 y ch fix 15 3 w ch fix 15 3 h ch fix 15 3 outline fix 15 3 txtmode bit 16 3 planes bit 16 2 menu port like ground port 2 item port like ground port 2 title port like ground port 2 prompt port like ground port 2 root data pointer 2 root menu pointer 2 menu area area 16000 me 1 gt u gt nardy gt menu gt menu item dcl incl pll 14 42 44 Tuesday April 26 1983 declare new menu pointer lm based new menu 2 first item pointer 2 live item pointer to pointer l item based to 2 label pointer 2 content pointer 2 right pointer 2 left pointer 2 x tix 15 2 y fix 15 am am e e we a we m e m ets we 1 gt u gt nardy gt menu gt menu creator pll menu creator procedure menu entry include menu dcl include menu item dcl declare answer ioa askn tmr scs get arg count scs get arg info scsfexpand path hes terminate init text seg create menu seg part finder prompt lis
21. A 4A a r a ii 4 we ii e me 2 gt u nardy gt map gt int pll call grin vis 6000 b4 port x U port y O int x 0 int y 0 end end proportions underlying equations tabx tabxorg tabxext winx winxorg winxext prtx prtxorg prtxext winx winxorg winxext cu x curxorg curxext winx winxorg winxext wi 98 cu e o e am l gt u gt nardy gt map gt fp pll 03 19 42 Thursday April 28 1983 fp procedure port x port y fp x fp y z include p dcl declare grin vis entry bit 16 grin pos entry fix 15 fix 15 fix 15 raw xyz entry fix 15 fix 15 fix 15 declare x y z fix 15 port x fix 15 port y fix 15 curs x fix 15 curs y fix 15 fp x float 23 fp_y float 23 float x float 23 float y float 23 III ION IAA IAA IA eek ok eco e He oko RARA III AIA AAA IA RIA RARAS unsrec p 000b60000 rp4 call raw xyz x y z if z gt 0 then do Xx Y float x float y fp x p q win float_x p gt q win float y xorg p gt q tab yorg p gt q tab xorg fp y gt yorg port x p gt q prt float x port y p gt q prt floa
22. and that port is used in reference to device space This is standard computer graphics usage 2 15 2 1 1 2 To map a point from a window to a port the following formulas are used port x window x window x origin port x extent window x extent port y window y window y origin port y extent window y extent 2 1 2 3 Equations of the same general form can be used for the following mappings world window to screen port answers the question where is a point in the world located on the screen tablet port to world window answers the question where is the user pointing in the world when he locates the puck at a point on the tablet tablet port to screen port answers the question where is the user pointing at on the screen when he locates the puck at a point on the tablet 2 1 3 Zoom facility 2 1 3 1 The discussion is now expanded to distinguish between the screen an grid of glowing phospher points and the frame buffer an matrix of memory cells where the image information is stored There is not always a 1 1 mapping l6 from the buffer to the frame screen array because some buffers allow a subset of memory cells to be scanned and displayed at a larger size on the screen zoom example 1 16 of the buffer is displayed on the screen at 4 times normal size 2 1 3 2 This feature is called zoom The Grinnell GMR 270 buffer for example can display a full image at full scale or z
23. fixl5 fix 15 based fix num last legal first legal 1 alloc bytes fix num 2 call scs allocn alloc bytes data ptr menu ptr gt menu seg menu area data ptr gt fixl5 fix num do j first legal to last legal if text ptr gt ascii array j then data ptr ascii array j first legal 3 ret else data ptr gt ascii array j first legal 3 text ptr gt ascii array 5 end end 8 RH HK RARA RARA III RARA RR kk kk kd match_and save procedure data_ptr declare data ptr pointer fix num j fix 15 fixl5 fix 15 based str len fix 15 match ptr pointer 1 match based match ptr 2 string char 32 vary 2 data pointer 2 next pointer match string char 32 vary you can do this quod allocated vars stick around in the linkage segment e after the procedure goes away x str len last legal first legal 1 match string substr text ptr gt ascii_string first_legal l str_len do match_ptr head ptr repeat match ptr gt match next while substr match ptr match string l str_len substr match string 1 str len end data ptr match ptr gt match data end B 123 m _ _ e a e e A r o bbb E EE A ret us menu ptr
24. in pixels outline width width in pixels of the box outline planes 8916 3 character string xxx where x is if plane is not used 1 if used 45 3 2 4 7 Keyword prompt this port contains all the prompts x origin relative to ground origin y origin relative to ground origin width in pixels height in pixels x char pos first char relative to prompt origin y char pos first char relative to prompt origin char width character spacing in pixels char height linespacing in pixels outline width width in pixels of the box outline planes 8919 3 character string xxx where x is if plane is not used 1 if used 3 2 5 Options 3 2 5 1 The characters that flag the start of this section are OPTIONS no quotation marks at the beginning of a line The options are specified as follows 3 2 5 2 Keyword leaf prefix followed by yes or no If yes an asterisk is put before labels in procedure item boxes Otherwise not 3 2 5 3 Keyword plane 8 followed by black red blue green cyan magenta yellow or white This option colorizes overlay plane 8 46 3 2 5 4 Keyword plane 9 followed by same possible arguments as plane 8 with corresponding effect 3 2 5 5 Keyword plane 10 followed by same possible arguments as plane 9 with corresponding effect 3 2 5 6 Keyword mode followed by pop up or continuous In continuous mode the menu is displayed all the time In pop up
25. menu ptr if new menu gt m live item null then do if new menu m live item gt item right null then do next menu new menu gt m live item gt item right call kill menu list next menu menu ptr new menu gt m live item null i end end 164 A ibd XX A a O O O E OO n aaa os me me ee ce ee em eee ee ee eee re ee oe oe ee we oe ee ee wes m A we we oe we ee restore menu procedure menu_ptr include menu dcl include menu item dcl declare draw menu entry pointer pointer draw title entry pointer bit 1 pointer draw prompt entry pointer bit l pointer current pointer previous pointer quitp bit 1 no bit 1 init 0 b yes bit 1 init 1 b normal bit 1 init 9 b inverse bit 1 init 1 b BO H He e ec e e he e e e de E ke e e e He e de e He e de e de de khe e kde e ede ke de e He X de e ke kek kek ke e ke e ee current menu ptr gt menu seg root menu gt m first item menu ptr gt menu seg root menu gt m live_ item current FA current points at the live item on a menu at the outset current points to the root node the one that contains the title and points to the first level of the menu do this loop while the live item points to another menu call draw menu header pointed to by the part of current which points to next men current the live item which is pointed to by the header which is pointed to by the right part of the current live it
26. prev close counter prev close pos 1 low x 511 raw gt font chr raw gt font serial num index 6 179 n r nee a m ee we high x 0 low y 511 high y 0 end else if counter gt safe limit then do call ioa gt contour vector is full substr raw gt font vector counter 1 4 1010 b code close file end else if code open contour then do xstep z ystep l fixnum x alias bit str raw gt font vector counter bit str fixnum y alias bit_str raw gt font vector counter 1 bit str prev x X prev y Y counter counter 2 end else if code close forward then do substr raw gt font vector counter pos 4 0000 b prev close counter counter prev close pos pos counter counter 1 pos 1 x x xstep Y y ystep end else if code close fwd right then do substr raw gt font vector counter pos 4 0980 b prev_close counter counter prev_close pos pos counter counter 1 pos 1 x x xstep y y ystep xtemp ystep rotate clockwise ystep xstep rotate clockwise xstep xtemp rotate clockwise x X xstep Y y ystep end else if code close sequence t
27. tablet z y z flush do z 0 while z 4 do z Y while z lt 1 await press call Stablet x y z end if z 1 then do do z 1 while z 0 await release call tablet x raw gt font base line z call grin linev 9 prev y 511 prev y plane8 off call grin linev 9 raw font base line 511 raw font base line plane8 on prev y raw gt font base line end end else if z 2 then do 193 m nm 9 m ae do z 2 while z 2 await release call tablet x y z end raw font base line raw gt font base line 1 call grin linev 6 prev y 511 prev y plane8 off call grin linev raw gt font base line 511 raw gt font base line plane8 on prev_y raw gt font base line end else if z 8 then do doz 8 while z 8 await release call tablet x y z end raw font base line raw gt font base line 1 call grin linev 9 prev y 511 prev y plane8 off call grin linev 0 raw gt font base line 511 raw font base line plane8 on prev y raw gt font base line end end call ioa gt base line is located at i r end raw font base line RR RR IK KK RRA kc hok RRR III do ke
28. we m a a a e we e we r e a_i me ars we a m O A e r r r r e m n 1 erase menu procedure new menu menu ptr include menu dcl tinclude menu item dcl declare erase item entry pointer pointer item ptr pointer normal bit 1 init 0 b inverse bit 1 init 1 b do item ptr new menu m first item repeat item ptr gt item left while item ptr null call erase item item ptr menu ptr end end ozono 0 on ee ee a ww ee cre ee re ee ee ee ae ee we ee ae ewe we 1 gt u gt nardy gt use gt erase menu planes pll 161 erase menu planes procedure menu ptr include menu dcl check procedure pos bit str declare if substr menu ptr menu seg ground port planes pos else else else else end grin rectv entry fix fix fix fix bit 16 fix off fix 15 init 9 pos fix 15 bit str bit 16 then call if substr then call if substr then call if substr then call if substr then call 1 grin rectv 0 511 511 bit str off menu ptr menu seg menu port planes pos 1 grin rectv 0 2 511 511 bit str off menu ptr menu seg item port planes pos 1 grin rectv 9 0 511 511 bit str off m
29. 0 then do buf lox p gt q buf xorg buf hix p q buf xorg p gt q buf xext 1 0 end 88 eum M A e AA e e m XA XA ee m e e cen A a A e ee mm i M X M O a e e e A e a o_o e n r e e e 9 A ua VA nen om en ee ee ee we mmm ee ee else do buf hix p gt q buf xorg buf lox p gt q buf xorg p gt q buf xext 1 0 end if p gt q buf yext gt Y then do buf loy p gt q buf yorg buf hiy p gt q buf yorg p gt q buf yext 1 0 end else do buf hiy p gt q buf yorg buf loy p gt q buf yorg p gt q buf yext 1 0 end if p gt q Uprt xext Y then do end else if p gt q Uprt xext gt then do Uprt lox p gt q Uprt xorg Uprt hix p gt q Uprt xorg p gt q Uprt xext 1 0 end else do Uprt hix p gt q Uprt xorg Uprt lox p q Uprt xorg p gt q Uprt xext 1 0 end if p gt q Uprt yext Y then do end else if p gt q Uprt yext gt then do Uprt loy p gt q Uprt yorg Uprt hiy p gt q Uprt yorg p gt q Uprt yext 1 0 end else do Uprt hiy p gt q Uprt yorg Uprt loy p gt q Uprt yorg p gt q Uprt yext 1 0 end prt ext 1 0 just some value that is not 0 0 if buf hix gt Uprt hix then do if buf lox gt Uprt hix then prt ext 0 0 else prt hix Uprt hix end else prt hix buf hix if buf hiy Uprt hi
30. 1 to string length match ptr gt match data gt ascii array j 2 text ptr gt ascii array string start j 1 end end string start i 1 string length 1 end else if one char then do something there yes allocate match match ptr gt match string substr text ptr gt ascii string string start string length match ptr match next head ptr head ptr match ptr string start i 2 string length 2 end string_length string length l end string length string length 1 delete last cr alloc bytes string length 2 call scs allocn alloc bytes match ptr gt match data menu ptr menu seg menu area match ptr match data fix15 string length do j 1 to string length match ptr gt match data gt ascii array j 2 text ptr ascii array string start j 1 end 117 e nere o 0200 M m iii 1 gt u gt nardy gt menu gt port maker pll 14 50 43 Tuesday April 26 1983 port maker procedure menu ptr text ptr start finish include menu dcl declare text ptr pointer ascii array 1 1 char 1 based text ptr start fix 15 finish fix 15 start line fix 15 i j fix 15 ch char 1 match string char 16 vary done bit 1 yes bit 1 init 1 b no bit 1 init 0 b S next_char procedure i i l ch text pt
31. 28 1983 frame loc procedure x locus y locus scale sinclude p dcl declare x locus y locus scale fix 15 x center y center fix 15 xgrin ygrin zoom nbr fix 15 declare grin zoom entry fix 15 fix 15 fix 15 recalc entry declare systemao condition ioa entry options variable f e ce de e e Ve de e e e RARA de de de e de e e e e e e e dee e ke on systemao begin end unspec p 000Db90000 b4 e de e e He ke He ARA e e e He de He de RARA XXX XXX p gt q buf xext p q buf yext 512 scale p gt q buf xext p gt q buf xorg x locus x locus p gt q buf xorg p gt q scale scale p q buf yorg y locus y locus p gt q buf yorg p gt q scale scale p gt q scale scale x center p gt q buf xorg p gt q buf xext 2 0 y center p gt q buf yorg p gt q buf yext 2 0 xgrin x center 1 ygrin y center 1 32 scale if scale 1 then zoom nbr else if scale 2 then zoom nbr 1 else if scale 4 then zoom nbr 2 else if scale 8 then zoom nbr 3 call grin zoom xgrin ygrin zoom_nbr call ioa buf xorg f buf yorg f buf yext f buf yorg f p gt q buf xorg p gt q buf yorg p gt q buf xext p gt q buf yorg call ioa x center 4i y center 4i x center y center call ica xgrin 4i ygrin 4i xgrin ygrin call recalc end 87 1 gt u gt nardy gt map gt recalc pll 03
32. Don t use spaces use underbars Alternatively surround the string with double quotes and then you can use spaces The VGC typositor font code number is found at the beginning and end of each film strip This information is helpful if we ever need to go back to a recapture chararcters from a font 4 2 2 5 Next the program will list options vidicon input set cap height via tablet set x height via tablet set baseline via tablet set cap x baselines numerically via keyboard display cap x baseline values at terminal quit Q GD ox 0 lt 64 4 2 2 6 This is the setup loop First press v to start continuous vidicon digitizing The type image will appear on the monitor Do these things now Adjust size focus and pull enough of the font past the lens to see that the lowest descenders and the highest ascenders fit on the screen Press lt spacebar gt to stop digitizing 4 2 2 7 The program will again list the above options and this time press b c or x to mark the baseline x height or cap height Using the puck press z button yellow to set the line at cursor position button 1 white to bump line down one pixel button 3 green to bump line up one pixel button 2 blue to accept line position 4 2 2 8 Once the baseline x height or capline is set press v to start vidicon again and pull some more characters across the screen to check the alignment Use the screws on each end of the platform if
33. KM KM KM KKM KM KM KM NO 3 xorg 3 yorg J xext 3 yext Uprt Utab win tab prt buf cur scr xoffset yoffset scale cur nbr cur vis pointer based p float 23 float 23 float 23 float 23 like like like like like like like like Uwin Uwin Uwin Uwin Uwin Uwin Uwin Uwin float 23 float 23 float 23 fix 15 bit 16 user window user screen user tablet scaled part scaled part scaled part scaled part cursor port cursor space di 2 3 4 000x b4 whe world coord s port scrn c s port tap c s of user window of user tablet of user port x of frame buffer T 9 gt 5ll re x 4321 79 i M e E 1 gt u gt nardy gt map gt loac parameters pll 2 56 29 Thursday April 2E 1983 n A load parameters procedure declare scs get_wdir entry char 168 vary hes append_seg entry char 168 vary char 32 vary fix 31 hcs initiate w options entry char 168 vary char 32 vary E char 32 vary bit 1 pointe
34. RARA RARA e He e Fe de de He de Je IOI ARA RARA A ke e next_char procedure i i l ch end text ptr gt ascii array il f KR ke ce ee e ehe ek de he kk e e kk e e ede ke e de e ke he ke e e ke e che ke e L next word procedure word declare word str len first legal i str len do quit if ch no while quit call next char space then quit char 16 vary fix 15 no yes bad N Co emo rm e e e 2 gt u gt nardy gt menu gt option maker pll if ch tab then quit yes if ch ret then quit yes if ch then quit yes str_len str_len l end word substr text ptr gt ascii string end first legal str len IOI IIIT RARA RR TOR ITI I II TOI de H e He deck ck ke oko IK KR ek eek code color procedure code declare code fix 15 if word 2 black then code 0 if word_2 blue then code 1 if word 2 green then code 2 if word 2 cyan then code 3 if word 2 red then code 4 if word 2 magenta then code 5 if word 2 yellow then code 6 if word 2 white then code 7 end E RRR e e e he eoe doe ek e ek deck eee ek TO RR RIK IR dock first set up default values which menu ptr gt menu seg leaf prefix 1 b menu ptr gt menu seg pop up mode 1 b menu ptr gt menu seg menu color ov8 9 menu ptr gt menu
35. _ if far field counter gt 540 then you ve waited long enough the puck is probably not in proximity of tablet return execute a delay loop to settle data reset next byte 0 b out first byte lt byte from tablet port in set byte received lt l b out acknowledge data received do while byte available bit 1 b wait for tablet to remove data garbage byte byte from tablet port in reset byte received 0 b raw data 1 first byte do the same for raw data 2 to raw data 5 set next byte l b do while byte available bit 0 b garbage byte lt byte from tablet port execute delay loop to settle data S reset next byte 0 b raw data i byte from tablet port set byte received lt l b do while byte available bit 1 b garbage byte byte from tablet port reset byte received O b Las a final check assume the next byte is the first byte of the next sequence of 5 bytes set next byte l b initialize far field counter do while byte available bit 0 b wait for tablet to present data garbage byte byte from tablet port in increment far field counter l if far field counter gt 500 then you ve waited long enough the puck is probably not in proximity of tablet return execute delay loop to settle data reset next byte 0 b check byte byte from tablet port set
36. adjustment is needed When alignment is finished press d to display the values of cap x baselines at the terminal Make a note of them these numbers will be needed later 65 4 2 2 9 An alternative to setting cap x baselines via tablet is to press n and enter the values numerically at the keyboard This allows exact correspondence of values between two files rather than having to make visual judgements at the beginning of each file 4 2 2 10 At the conclusion of this setup activity press q to quit setup and progress to the actual capture of the font 4 2 3 Capturing the characters 4 2 3 1 The capture loop will automatically start out in a continuous digitizing mode to allow a single character to be positioned in the center of the screen When this has been done press lt OTRAS to stop digitizing and press button 1 white on the puck to begin acumulating character contours For each contour position the cursor to the left of an edge and press the z button yellow On the monitor which displays overlay plane 19 the contour will be displayed 66 4 2 3 2 To complete the capture of a character press button 4 green to indicate that all contours which define a letter have been accumulated The program will print out some statistics on the letter maximum width and height amount of storage etc and will prompt for the character name to be associated with the letter 4 2 3 3 To indicate that you are done
37. byte received l b do while byte available bit l b garbage byte byte from tablet port reset byte received b
38. cursor vis procedure string4 a include p dcl declare grin vis entry bit 16 stringl6 bit 16 string4 bit 4 stringl6 0000 b4 substr stringl6 13 4 substr string4 1 4 call grin vis stringl6 p q cur vis stringl6 end 83 ec ee ome e 1 u nardy map cursor nbr pll 02 56 13 Thursday April 28 1983 cursor nbr procedure number include p dcl declare number fix 15 p gt q cur_nbr number ena 84 e r ee 1 u nardy map frame org pll 02 59 27 Thursday April 28 1983 frame org procedure x origin y origin scale include p dcl declare x origin y origin scale fix 15 x center y center fix 15 xgrin ygrin zoom nbr fix 15 declare grin zoom entry fix 15 fix 15 fix 15 recalc entry FERIA kk he he RARA RRA ke ke he I e ke IAA ke ke dece de ke e e ke he ke ke ke ke ke ke ke ke ke ke ke ke e ke ke ke e e k kkk ee unspec p 000b00090 b4 p gt q buf xorg x origin p q buf yorg y origin p q buf x
39. ek dee eek ee de RRA RRA He e eee de RARA raw font cap line 406 raw gt font x line 300 raw gt font base line 209 do choice while choice q call ioa rOPTIONS call ioa v vidicon input set cap height via tablet set x height via tablet set baseline via tablet set cap x base lines numerically via keyboard display cap x base lines on screen values at terminal quit call ioan rchoice call iocs getc choice 2 25 DS 0 if choice v then do call ioa idicon on call vidicon call ioa vidicon off end else if choice c then call set cap 194 me me e e a e er r n o M A a e ae e else if choice else if choice else if choice else if choice end call ioa uit alignment procedure r end x then call set x b then call set base n then call get numbers d then call display lines 195 1 gt u gt nardy gt edge gt tablet pll 04 02 07 Thursday April 28 1983 _ _ r m r we _ sn ee ee a O a a M tablet procedure x y Z declare x Y 2 declare grin vis grinSpos ss Swd
40. end cur x first flx cur y first fly call grin linev last x left line last y raw font base line Cur X left line cur y raw font base line planes919 on end end of inner workings 187 mm me ec e e ee r mr e RR e he e de e ke hk kk e e e ke de e kk e he kk ek de kk e kk ke ke e kk e kk ke XNXX e de e ke e RARAS call grinfrectv 0 O 511 511 planes8910 off call grinSrect O O 511 511 000000009 b4 do i 1 to raw gt font serial num call ioa rnow drawing serial num i a i raw gt font chr i name call inner workings i iu call ioa to continue press any key call iocs getc any key call grin rectv 9 0 511 511 planes8910 off end raw gt font cap line raw gt font cap line raw font base line raw font x line raw font x line raw font base line raw gt font base line 0 ena 188 M H M m A a e e a I ee we a vidicon procedure code taken from vid in pll gtest pll declare ioa ioan entry options variable iocsSgetc entry char 1 grin gwrite entry fix declare spdl bit 16 init a002 b4 select d
41. fix 15 item x fix 15 item y fix 15 item x param x l item y param y do current head repeat current gt item left while current null item x item x 1 if item x gt menu ptr menu seg menu port x ext menu ptr menu seg item port x ext 1 then do item x 0 B item y item y 1 end current gt item x item x current gt item y item y end do current head repeat current gt item left while current null if current gt item right null then call figure xy 0 item y l current gt item right gt m first item menu ptr end end 132 em mm aS ct eee am e ae a am ae M ae e aAA e am O wee a ao am ee o e prompt list writer procedure head ptr declare ioa ioan entry options variable head ptr pointer match ptr pointer l match based 2 string char 32 vary 2 data pointer 2 next pointer text ptr pointer ascii array 1 1 char l based text ptr prompt char 1024 string length fixed 31 fix15 fix 15 based i fix l5 OOOO E e E e e e e e He E AE e E eee OOOO e E E E E e e de He CK ORO GRO AA do match_ptr head_ptr repeat match_ptr gt match next while match ptr null call ioa r lt match node gt call ioa match ptr p match ptr call ioa match ptr match data p match ptr gt match data call ica match ptr match string a
42. makes the designer no less of a picture maker but a worker with an expanded set of opportunities to plan assemble control and refine and edit 5 1 2 Linked lists Central to all of this increased capacity is the use of dynamic data structures and linked lists The software 19 tool builder should acquaint himself with these techniques 3 4 The basic editing routines of inserting deleting copying sorting and searching seem to apply to all kinds of work dealing with lists of any type of objects 5 1 3 Tools to build tools Building a tool means looking at a problem in a general enough way to expose the process required to solve it Using a tool once built makes future work more productive This effort has proved the value of modular programming using software tools already built to help build new ones This is the spirit of Gerstner s programmes for solutions 71 REFERENCES 1 2 3 4 72 REFERENCES Karl Gerstner Designing Programmes trans D Q Stephenson Teufen Switzerland Arthur Niggli Ltd 1968 p 9 Newman William M Principles of Interactive Computer Graphics New York McGraw Hill 1979 p 83 Wirth Nicklaus Algorithms Data Structures Programs Englewood Cliffs N J Prentice Hall 1976 Knuth Donald E The Art of Computer Programming Second Edition Reading Massachusetts Addison Wesly 1973 Volume 1 Fundamental Algorithms Volume 3 Searchin
43. package by adding line to s moveto s and clipping A further step is making it more machine independent by changing the frame buffer space to normalized origin of 9 40 0 0 and extent of 1 9 1 0 It would then be adapted to each specific buffer by adding one procedure which would transform normalized buffer coordinates to actual device coordinates This would achieve the usual tradeoff of greater generality for somewhat slower execution time 2 3 2 Record and playback Another extension would be an ability to store input from the tablet and then at a later time read that data from memory as if it were coming from the tablet Input from the keyboard could be stored and recalled in the same way 31 This could be used for animations and to record and replay interactive sessions A simpler package to do this has already been written by the author and saves about 45 seconds worth of data from the tablet before memory is filled 2 3 3 System independence These procedures communicate with each other by saving and recalling data in a separate segment It is not clear that this could be accomplished as easily in a system without the explicit core memory management provided by the MagicSix system 32 3 MENUS 33 3 1 THE IDEAS 3 1 1 Requirements for interactive graphics 3 1 1 1 An interactive package which accomplishes a task such as page layout requires a complex set of procedures For the user to move from one pr
44. programs or do programs run menus 3 1 2 2 I will develop some answers to these questions based on a recursive definition of a menu a menu is a list of procedure items and menu items such that if the user selects a procedure item a procedure is run and if the user selects a menu item another menu is presented 35 3 1 2 3 This is vague enough to postpone some implementation considerations for a while but it still permits some useful comparisons The structure of a menu like this can be repesented by a tree with programs at its leaves or terminal nodes and menus as its root and intermediate nodes Another analog is an outline Any item with items indented beneath it represents a menu and any item without items indented beneath it represents a program The outline is a fortuitous analogy as we shall see because it is a familiar form it is easy to write and edit and manipulate 3 1 2 4 Both the tree and the outline can be modelled by dynamic information structures known as hierarchical linked lists Since there are well defined techniques for building editing and traversing linked lists 3 it is now possible to postulate a menu that is a data structure which is created and managed by special programs 36 3 1 3 Visual format 3 1 3 1 So far I have described the menu in a non visual way The visual form can be derived by describing general its general properties A menu is a list of items displayed in a screen port It
45. ptr gt menu seg item port y abs instance gt item y menu ptr gt menu seg item port y ext x2 xl menu ptr gt menu seg item port x ext 2 y2 yl menu ptr gt menu seg item port y ext 2 x xl menu ptr gt menu seg item port x ch y yl menu ptr menu seg item port y ch call grin rectv xl yl x2 y2 menu ptr menu seg item port planes on if norm inv G b then do normal xl xl menu ptr gt menu seg item port outline yl yl menu ptr gt menu seg item port outline x2 x2 menu ptr gt menu seg item port outline y2 y2 menu ptr menu seg item port outline 151 o a n e n ii a a ii ee mr right margin bottom margin ne ret U text call end xt mode grin rectv xl yl x2 y2 menu ptr gt nenu seg item port planes off x2 yl do the characters menu ptr gt menu seg item port txtmode substr text mode 1 1 norm_inv if menu ptr gt menu seg leaf prefix l b then do i if i 3 one nstance gt item right null then do call grin text x y text mode X X menu ptr gt menu seg item port w ch end to instance gt item label gt fix15 2 char instance gt item label gt ascii array i if ascii num 95 amp ascii num 127 then ascii num ascii num 32 if one char then x x menu ptr gt me
46. rd entry bit 16 bit 8 declare na i o ports currently invert data from to the tablet La so active state of bits is 0 b next byte bit 8 aligned init 01101110 b next byte set byte received bit 8 aligned init 10101110 b byte rec d set reset nbbr bit 8 aligned init 1116111 b nb amp br reset garbage byte bit 8 first byte bit 8 check_byte bit 8 raw data 1 5 bit 8 holds all five bytes before converting to fix tab addr bit 16 init 80aa b4 address of tablet port 1 fix 15 x fix 15 Y fix 15 z fix 15 delay fix 15 delay loop counter duration fix 15 length of delay ed far field fix 15 cursor is in far field if gt 500 E xbits bit 16 defined x ybits bit 16 defined y zbits bit 16 defined z ii NA unspec p 000b 000 Db4 duration 45 call ss tab addr check byte if check byte 04 b4 then do x y zbits fe b4 return end c cneck byte ff b4 while substr check byte l 1 0 b do first byte ff b4 while substr first byte l 1 0 b call wd tab addr next byte x 101 far field 0 do garbage byte ff b4 while substr garbage byte 2 1 call rd tab addr garbage byte N far field far field 1 if far field gt 500 then do x 0 y 0 zbits ffff b4 won t take a fixed number why return i end end do delay l to duration end call wd tab addr r
47. seg menu color ov9 menu ptr gt menu seg menu color ovl0 may be overidden by user then work on the line now check for explicit values ret i start call next char do done no while done no find first non space tab character do while ch space ch tab call next char end if char is not cr or comment marker if ch ret then if ch then do 129 omo cn nm call next word word 1 do while ch space call next char end Call next word word 2 if word 1 leaf prefix then do if word 2 yes then menu ptr gt menu seg leaf prefix lb else menu ptr gt menu seg leaf prefix 0 b end i else if word 1 plane 8 then call code color menu ptr menu seg menu color ov8 else if word 1 plane 9 then call code color menu ptr menu seg menu color ov9 else if word 1 plane 10 then call code color menu ptr gt menu seg menu color ovl0 else if word 1 mode then do if word 2 pop up then menu ptr gt menu seg pop up mode VID else if word 2 pop up then menu ptr menu seg pop up mode l b else if word 2 popup then menu ptr gt menu seg pop up mode l b else if word 2 continuous then menu ptr menu seg pop up mode b end end do while ch ret call next char end if i gt finish then do
48. should be able to occupy any subarea of the screen 3 5 E 3 1 3 2 A menu port may contain vertical or horizontal lists To this end the port may be divided into equal sized modules in which menu items are displayed 37 3 1 3 3 Geometry suggests that a port may contain arrays in addition to simple lists of these modules This is in fact useful for several purposes A single list might be displayed more compactly as an array Or this format might display vertical lists of horizontal lists and horizontal lists of vertical lists menu trees such as I earlier described item item item item item item item item item item item item 3 1 3 4 One of the advantages that accrues from dividing the menu port into equal modules is that the position of the puck on the tablet can be mapped easily and unambiguously to the location of a menu item 3 1 3 5 In addition to the item modules a menu should include prompts and feedback so that a mimimum configuration might include a menu port a title port and a prompt port all within a containing ground port 38 item item item item gt nn 0000000000 0nnnnnn nn item item item item 2 2 2 2 2 2 2 2 item item item item menu port ground port diagram of parts of a menu 39 3 2 THE MENU PACKAGE A USER MANUAL
49. sin math cos grin linev grinSrectv grin rect declare code y code x bit x bit y entry char 1 entry float 23 returns float 23 entry float 23 returns f10at 23 entry fix entry fix entry fix fix fix fix fix 15 fix 15 bit 16 defined code_x bit 16 defined code y prev_code_x prev_code y index pos declare cur x cur y last x last y fix 15 fix 15 fix 15 fix 15 declare flx fly float 23 first flx first fly float 23 degrees float 23 radians float 23 repro scale float 23 l xstep 2 x float 23 2 y float 23 l ystep 2 x float 23 2 y float 23 declare i fix 15 any key char 1 planes8919 bit 16 init plane8 bit 16 init plane9 bit 16 init planes919 bit 16 init off fix 15 init fix 15 entry options variable fix fix bit 16 fix fix fix bit 16 fix fix fix bit 32 current contour code origin previous contour code origin current element of bit array position within bit string current integer point previous integer point current float point current contour float origin 0700 b4 erase all 0100 b4 blue baseline 9206 b4 green box el 0600 bp4 white contour 9 allows access to bit array as fix El 184
50. substr program name i 1 end return program name end 167 M N re r e n 1 gt u gt nardy gt use gt match_finder pll 92 46 96 Thursday April 28 1983 match finder procedure new menu match x match y match item match header menu ptr include menu dcl include menu item dcl declare draw item entry pointer bit 1 pointer draw menu entry pointer pointer Skill menu list entry pointer pointer match x fix 15 match y fix 15 item ptr pointer match item pointer match header pointer endp bit l no bit 1 init 0 b yes bit 1 init l b inverse bit l init l b ERR XNXX XNXX XNXX RA RARA AR RARA RARA RRA RRA RE match item null item ptr new menu gt m first item do endp no while endp no if item ptr gt item x match x amp item ptr gt item y match y then do match item item ptr endp yes end else do item ptr item ptr gt item left if item ptr null then endp yes end end if match item null then do if new menu m live item null then do call match finder new menu m live item gt item right match x match y match item match header menu ptr end 7 end else do you have a match item now check for level 168
51. will be helpful The Perkin Elmer 3220 is a 32 bit minicomputer with 512K of core memory Disk storage is a 300 megabyte trident type drive with a high I O bandwidth Peripherals include a Grinnell GMR 270 frame buffer with a capacity of 512 x 512 pixels with 27 bits of color information a Vidicon surveillance camera which feeds non composite video signals to the frame buffer and a Summagraphics Bit Pad tablet with a 4 button puck 18 1 1 4 2 Software The MagicSix operating system developed by the Architecture Machine Group at M I T supports an interactive computing environment Features include a tree structured file system dynamic linking and a process stack The pl l language a subset of standard PL 1 was also developed by the Architecture Machine Group It supports recursion pointers structures signals error handling and initiated segments which allow the user to structure core memory 11 2 POINTING AND MAPPING 12 2 1 THE IDEAS 2 1 1 World and device space a simplified diagram puck of screen tablet and ion world spaces 2 1 1 1 The designer of graphics programs deals with at least three different kinds of spaces 1 A window of interest in world space some examples are an 8 1 2 x 11 page a two page spread a business card a box car an integer grid or a droits point slider 2 A display screen composed of discrete pixels numbered as positive integers in the first qu
52. with a file press button 2 blue and the program will redraw all the outlines it has accumulated 67 4 3 FURTHER WORK 4 3 1 Processing the raw captured fonts Using the methods and programs described in the previous sections it has been possible to capture about 16 fonts at a time of 2 3 hours per font This of course is the capture of raw font information The work that remains is to process this data so characters can be called back to the screen in reduced multiple bit form to simulate headline and text at any required size and orientation 4 3 2 Design and editing of new fonts Once basic typeforms have been captured the actual shape of the edge can be changed smoothed and recoded using more compact and refined spline techniques This methods is general enough so that it can apply to to visual forms beyond familiar typeforms foreign character sets ideograms high contrast images and logotype forms 68 5 CONCLUSION 69 5 1 THE NATURE OF THESE TOOLS 5 1 1 Objects versus pixels The software tools described here make it possible for the designer to work with objects rather than with pixels The distinction is important because it frees him from the tyranny of the device No longa da he restricted to directly addressing pixels on the screen The designer can point at and refer to objects or models of objects in the real world with collections of attributes far richer than just color or grey level This
53. x_origin y origin x extent y extent call Srecalc end l gt u gt nardy gt map gt tablet pll 63 13 04 Thursday April 28 1983 tablet procedure x origin y origin x extent y extent include p dcl declare recalc entry declare x origin fix 15 y origin fix 15 x extent fix 15 y extent fix 15 unspec p 000b0000 b4 p q Utab xorg p q Utab yorg p gt q Utab xext p q Utab yext x origin y origin X extent y extent call Srecalc end 94 cam ea ce nc gt u gt nardy gt map gt x port pll 03 13 41 Thursday April 28 1983 x port procedure window x returns fix 15 include p dcl declare window x float 23 unspec p 000b0000 Db4 return p gt q prt xorg window x p gt q win xorg p gt q win xext p gt q prt xext end 95 cc n V n e v we nu nni n un y port procedure window y returns fix 15 include p dcl declare window y f10at 23 unspec p 000b0000 b4 return p gt q prt yorg window y p gt g win yorg p gt q win yext p gt q prt yext end 96 1 gt u gt nardy gt map gt int pll 03 21 50 Thursday April 28 e ces
54. 1 1 b tab addr next byte 0 4 N T ae e Pns ba N n o 9 e r e w A ee e a do garbage byte all ones while substr garbage byte 2 1 0 b call rd tab addr garbage byte far field far field 1 if far field gt 500 then do x y Di z l return end end do wait 1 to duration end call wd tab addr reset nbbr call rd tab addr first byte call wd tab addr byte received do garbage byte all zeros while substr garbage byte 2 1 1 b call rd tab addr garbage byte end call wd tab addr reset nbbr end Hi raw data 1 first byte do i 2 to 5 B call wd tab addr next byte do garbage byte all ones while substr garbage byte 2 1 0 b call rd tab addr garbage byte end G do wait 1 to duration end call wd tab addr reset nbbr call rd tab addr raw data i call wd tab addr byte received do garbage byte all zeros while substr garbage byte 2 1 1 b call rd tab addr garbage byte end call wd tab addr reset nbbr end 7 call wd tab addr next byte far field do garbage byte all ones while substr garbage byte 2 1 0 b call rd tab addr garbage byte far fie
55. 1 02 Thursday April 28 1983 draw prompt procedure instance norm inv menu ptr include menu dcl include menu item dcl declare ioa entry options variable grin rectv entry fix fix fix fix bit 16 fix grin text entry fix fix bit 16 char 1924 vary instance pointer xl yl x2 y2 fix 15 i x y fix 15 right margin fix 15 bottom margin fix 15 off fix 15 init 0 on fix 15 init 1 fix15 fix 15 based text_mode bit 16 norm_inv bit 1 normal 9 b inverse l b ascii array 1 1 char 1 based ret char 1 one_char char l ascii num fix 7 defined one char ke RIA ke ee e ke he e kk ek de de ehe e He kk e hk ek kk kk GA ek ke kk e RAR XX ke first do the box xl menu ptr gt menu seg prompt port x abs yl menu ptr gt menu seg prompt port y abs x2 xl menu ptr gt menu seg prompt port x ext 2 y2 yl menu ptr menu seg prompt port y ext 2 x xl menu ptr gt menu seg prompt port x ch y yl menu ptr menu seg prompt port y ch call grin rectv xl yl x2 y2 menu ptr gt menu seg prompt port planes on k if norm inv 9 b then do normal xl xl menu ptr gt menu seg prompt port outline yl yl menu ptr gt menu seg prompt port outline x2 x2 menu ptr menu seg prompt port outline y2 y2 menu ptr gt menu seg prompt port outline call grin rectv 157 i i
56. 15 50 Thursday April 28 1983 AA anno recalc procedure include p dcl declare buf lox buf loy buf hix buf hiy float 23 Uprt lox Uprt loy Uprt hix Uprt hiy float 23 prt lox prt loy prt hix prt hiy float 23 prt_ext Bi float 23 integer_part fix 15 declare ioa entry options variable systemao condition f Ck e he e he eo che dece e deck RIK IR KR eode dede de dede e eoe dede ERE EER REE ERI RK EK IKK RK on systemao begin end unspec p 000b0000 Db4 if p gt q buf xorg gt then do integer part p gt q buf xorg p gt q xoffset p gt q buf xorg integer part p gt q scale end else do integer part p gt q xoffset end p q buf xorg 1 0 integer part p q buf xorg p gt q scale if p q buf yorg gt Y then do integer part p gt q buf yorg p q yoffset p gt q buf yorg integer part p gt q scale end else do integer part p gt q yoffset end p gt q buf yorg 1 0 integer part p gt q buf yorg p q scale clamp new prt edges to buf edges if necessary first convert org ext to lo hi buf part displayed may go outside of physical fb limits x Uprt never goes outside fb limits however so clamping works ok if p gt q buf xext gt
57. 23 fix 15 fix 15 fix 15 fix 15 fix 15 fix 15 fix 15 fix 15 fix 15 based fix 31 condition condition condition bit 1 bit 1 bit 1 init 0 b bit 1 init l b bit 1 init 0 b bit 1 init 1 b pointer pointer pointer IIC hok kk kk eh ke khe ke khe de khe kk e kk ke kk he kk e ke ke ke ke kk khe ke He ke e ek e e ke e RR e e eee on systemao pegin end on oops begin goto exit end on break begin call ioan r confirm BREAK y n call iocs getc answer call ioa r if answer y then goto exit 147 ne a a a a e M A ome om om oe o m ooo oe ee call scs get arg count num args if num args Y then call askn name of menu menu name else do call scs get arg info 1 arg type arg length arg ptr menu name substr arg ptr gt arg string l arg length end unspec menu ptr 00Uc 000 b4 cali scs expand path menu name dir name garbage name syscode call init menu dir name menu name menu ptr call grinSocolor menu ptr gt menu seg menu color ov8 menu ptr gt menu seg menu color ov9 menu ptr menu seg menu color ovl0 call map setup call ioan r resume or fresh start r s call iocs getc answer call ioa if answer r then call Srestore menu menu_ptr e
58. 3 2 1 The menu text file 3 2 1 1 This package of procedures bound together under the name menu turns a text file into a data structure a menu tree which is used for interactive decision making A model menu is included in Appendix III The following paragraphs describe the four main sections and functions of the text file 3 2 1 2 The text file is created and edited in the TVmacs editor The text file name should have the suffix menu just as pll programs have the suffix pll 3 2 1 3 The user may insert a comment on any line by typing a vertical bar All characters from the vertical bar to the end of the line will be ignored and do not become part of the menu data structure 40 3 2 2 The menu outline 3 2 2 1 The programmer writes an outline that reflects the pattern of choices he wants to make available on the screen The outline is made of menu items and procedure items Menu items are followed on the same line by prompts which give information about items indented one further level beneath them if the user picks a menu item another menu appears on the screen Procedure items are followed on the same line by a procedure which is run if that item is chosen 3 2 2 2 These are the rules for making a menu outline The characters that flag the start of this section are MENU no quotation marks at the beginning of a line There is one item per line There is only 1 first level item the name of the
59. 5 off fix 15 init 2 on fix 15 init 1 plane8 bit 16 init 01900 b4 blue lines planes8910 bit 16 init 07008 b4 erase all BRR KR HR RARA AAA RAE RAR RARE RRA AR RRA get_ numbers procedure raw gt font cap line raw font x line raw font base line off ioa ioa ioa ioa grin rectv call call call call call umeric values for lines currently are Sam cap height located at i x height located at ais ape base line located at i 9 511 511 planes8912 askn r enter new location of base line 6 511 raw gt font hbase line grin linev 9 raw font base line call cali 511 raw gt font base line plane8 on askn enter new location of cap height line 0 511 raw gt font cap line grin linev Si raw gt font cap line call call 511 raw gt font cap line plane8 on askn enter new location of x height line 9 511 e raw gt font x line grin linev 0 raw font x line 511 raw gt font x line plane8 on call call end RR MR IAA de He He de ek eek NKANKA He He e de He He He III he he e He dee ee de He e de I He e de ke display li Call call call call call call call call end FR set cap p call call Call call call prev call do z Ae M A a uA om a A uu m een a 7 m a au X gie r m am es wo am am am an ee ap we om oo es on e
60. AA A nes procedure ioa isplay lines ioa cap height located at i raw font cap line ioa x height located at ie ha raw gt font x line ioa base line located at i raw gt font base line grin rectv 0 511 511 planes8910 off grin linev 0 raw gt font base line 511 raw font base line plane amp on grin linev i 0 raw font x line 511 raw gt font x line plane8 on grin linev 6 raw font cap line 511 raw gt font cap line plane8 on PARRA ERRAR RARA ERRAR RARA e Ae de e kk kk kk kikke rocedure ioa ap height via tablet ioa press l to position cap line ioa press 2 to move cap line down 1 pixel ioa press 3 to accept position ioa press 4 to move cap line up 1 pixel y 7 raw gt font cap line tablet z y z flush Q while z 4 do z 0 while z lt 1 await press call tablet x y z end if z 1 then do do z 1 while z 0 await release call tablet x raw gt font cap line z call grin linev 9 prev y 511 prev y plane8 off call grin linev 9 raw gt font cap line 511 raw gt font cap line plane8 on prev_y raw gt font cap line end end else if z 2 then do do z 2 while z 2 await release call tablet x y 2 end raw gt font cap line raw gt font cap line 1 call grin linev 0 prev y 511 prev y plane8 off
61. K ke ke ke ke ehe KR he kk RR he ke e he ke IAA ke ke ke e ERIK e ke e de KR e e eek assign ten procedure port ptr declare port ptr pointer l port based outline fix 15 txtmode bit 16 planes bit 16 2 x_abs fix 15 2 y_abs fix 15 2 x rel fix 15 2 y_rel fix 15 2 x ext fix 15 2 y ext fix 15 2 x ch fix 15 2 y ch fix 15 2 w ch fix 15 2 h ch fix 15 2 2 2 port_ptr gt port x_rel port_ptr gt port y rel port_ptr gt port x_ext port ptr gt port y ext port ptr gt port x ch string to fix string to fix string to fix string to fix string to fix en wee M S we Se Na se se se 119 A A port ptr port y ch port ptr port w ch port ptr port h ch port ptr gt port outline port ptr gt port planes end string to fix string to fix string to fix string _ to fix string to bit III AIA III III AIA III OOOO IR RRA AE E F AE E IA IRIE start line start done no do while done nc j start line ch text ptr gt ascii array j do while j finish amp unspec ch 13 J 3 1l ch text ptr gt ascii array j end if j finish then done yes find the first
62. SOFTWARE TOOLS FOR THE GRAPHIC DESIGNER by Nardy Henigan B F A Northern Illinois University DeKalb Illinois June 1977 M A Northern Illinois University DeKalb Illinois August 1978 Submitted to the Department of Architecture in partial fulfillment of the requirement of the Degree of Master of Science in Visual Studies at the Massachusetts Institute of Technology June 1983 c Nardy Henigan 1983 The author hereby grants to M I T permission to reproduce and to distribute copies of this thesis document in whole or in part Signature of Author gcture May 5 1983 dif Certified by Associate Prof ssor of Visua Thesis Supervisor Accepted by Nigholas Negroponte Chair Departmental Committee for Graduate Students 1 MASSACHUSETTS INSTITUTE ECHNOLOGY VE AUG 5 1383 LIBRARIES notch SOFTWARE TOOLS FOR THE GRAPHIC DESIGNER by Nardy Henigan Submitted to the Department of Archtecture on May 5 1983 in partial fulfillment of the requirements for the Degree of Master of Science in Visual Studies Abstract This thesis describes three packages of programs of interest to the graphic designers 1 a tool for pornting at objects on the display monitor 2 a tool for organizing sets of programs into interactive menus and 3 a tool for digitizing type fonts The graphic designer at the computer uses at least three spaces at once the page he is designing the device space of the display mon
63. adrant of a Cartesian coordinate system The screen is used to model world space 3 A graphics tablet which senses the position of a puck on a 13 grid of charged wires and which returns positive x y integers The tablet is used to model of both world and Screen space 2 1 1 2 As the puck is moved about on the tablet the corresponding screen position can be determined with a mapping transform and a mark such as a cursor can be displayed nondestructively at that point The user can in this manner point at images on the screen and at objects in world space 2 1 1 3 In some applications such as painting and picture making systems the world window is identical to the display screen But in the case of page layout the window is the page being designed and neither is it the size of the Screen nor do page units e g points and picas align with pixel boundries 14 2 1 2 Ports and windows port noo window screen a world space q ports and windows and their relation to world port and device space tablet 2 1 2 1 The window is a subset of all points in world Space and the user may likewise establish a port on the Screen or tablet which is a subset of all the addressable points in the device space The reader should note that the term window is used in reference to world space
64. advance one unit ahead one unit to the right and then turn 90 degrees clockwise These tests and moves are repeatedly applied until we arrive back at the pixel we started at 4 2 1 7 The actual code which does the checking described above has the name check ahead and an algorithm which may be written in english as follows If the pixel directly ahead is out then change direction of search 90 counterclockwise no need to add a link to the chain code and start test over again Otherwise pixel directly ahead is in but we don t yet know whether it s on the edge or in the interior Therefore make the following test If the pixel located forward and to the right is out then advance forward add a link to the chain code and start test over again Otherwise the pixel located forward and to the right is in Advance forward and to right add a link to the chain code change direction of search 90 clockwise and start the test over again Do this until the origin is reached again 59 4 1 3 Chain coding 4 1 3 1 The links added to the chain code will be of this nature Whenever you add a link to the chain code it will be a four bit string two bits to record the x increments and two bits to record the y increments the two bit codes being Ql b 1 unit QO Db units ll b l unit 4 1 3 2 Two additional codes complete the set b means end of a contour no more x and y increments 1019 b means end of a s
65. all grin linev 0 raw gt font x line 511 raw font x line plane8 on call grin linev 9 raw gt font cap line 511 raw gt font cap line plane8 on call vidicon end end do z 1 while z 1 call tablet xorg yorg z end do instruction look for edge while instruction bad start amp instruction open contour call check ahead xorg 1 yorg xorg yorg instruction xorg xorg 1 if xorg gt 511 then instruction bad start end if instruction open contour then do end wrapup call step5 xorg yorg xstep ystep instruction raw x xorg y yorg do while instruction close forward instruction close fwd right call grin rectv x y x y planel0 on call check ahead straight ahead x xstep y ystep xorg yorg instruction if instruction check again then do call check ahead ahead and to the right x xstep ystep y ystep xstep xorg yorg instruction call step5 x y xstep ystep instruction raw end else call step5 x y xstep ystep instruction raw if instruction close file then goto wrapup end end call review raw ee one re e e a e r r call ioa rsaving a in directory gt u gt type gt raw fo
66. ange chr base change chr xhgt change chr cap change chr max hwd change chr last nbr change chr stats append char write chr lrn magic6 138 no moncone nm _ o wn M o e e e raw draw select option one draw one raw character all draw all raw characters raw headers select option file list raw file header chars list character headers glyph select option file list initiate terminate draw draw glyphs headers list header information modify change header information append add raw chars to glyph file glyph file select option l dir list glyph directory init old initiate existing glyph file init new create initiate glyph file term terminate glyph file glyph draw select option one draw one glyph all draw all glyphs glyph headers select option file list glyph file header glyphs list glyph headers glyph mod select option name change name of glyph set source change source of glyph set date change date base change baseline 139 amo e e 9 a a O a M O a em ums e AM O 9 a 4 a we s n a a m eee 4 gt u gt nardy gt profile gt typ4 menu x hgt change x height cap change cap height max hwd change max hgt width depth last nbr change number of last glyph stats compute max hgt width depth ch
67. at 23 call map window x origin y origin x extent y extent 22 The arguments are the origin and extent of the world window expressed in world units They define the range of values to be returned by the map int and map fp routines Default parameters set by map setup are 0 0 0 0 511 9 511 0 2 2 2 3 map sport This procedure and associated variables are declared and used as follows declare map port entry fix 15 fix 15 fix 15 fix 15 x origin fix 15 y origin fix 15 x extent fix 15 y extent fix 15 call map port x origin y origin x extent y extent The arguments are the origin and extent of the frame buffer port Values for the origin may range from to 511 Origin extent should not exceed 511 in either direction At zoom scale 1 the frame buffer and screen image are identical The arguments define the range of values to be returned by the map int and map fp routines Default parameters set by map setup are 9 9 511 511 23 2 2 2 4 map tablet This procedure and associated variables are declared and used as follows declare mapS tablet entry fix 15 fix 15 fix 15 fix 15 x origin fix 15 y origin fix 15 x extent fix 15 y extent fix 15 call map tablet x origin y origin x extent y extent The arguments are the origin and extent of the tablet port Values for the origin may range from Y to 2200 Origin extent should not exceed 2200 in either di
68. aw gt font x line 511 raw font x line plane8 on prev y raw gt font x line end end else if z 2 then do do z 2 while z 2 await release call tablet x y z 192 _ r v O mr m A mr end raw font x line raw font x line 1 call grin linev 0 prev y 511 prev y plane8 off call grin linev 0 raw gt font x line 511 raw font x line plane8 on prev y raw gt font x line end else if z 8 then do doz 8 while z 8 await release call Stablet x y z end raw font x line raw gt font x line 1 call grin linev 8 prev y 511 prev y plane8 off call grin linev 9 raw gt font x line 511 raw gt font x line plane8 on prev y raw gt font x line end E end call ioa x line is located at ir raw gt font x line end BRK RK ke e e e e ke ke ke e he ke he ke he e IK ke he ke e e ke e he he e e he ke ke e ke e AR KKK Set base procedure call ioa ase height via tablet call ioa press l to position base line call ioa press 2 to move base line down 1 pixel call ioa press 3 to accept position call ioa press 4 to move base line up 1 pixel prev y raw gt font base line call
69. ble fix 15 fix 15 bit 16 char 168 vary fix 31 pointer options variable fix 15 pointer char 168 vary entry entry entry fix fix fix entry entry entry char 168 vary pointer pointer char 32 vary pointer Skill all living things draw title draw prompt Serase prompt S raw menu Smatch finder before dollar declare num args arg length arg type arg ptr arg string dir name entry name rec name menu name garbage name program name entry entry entry entry entry entry pointer pointer bit l pointer bit 1 pointer pointer pointer pointer pointer pointer fix 15 fix 15 pointer pointer pointer entry char 32 vary returns char 32 vary fix 15 fix 15 bit 16 pointer char 32 based arg ptr char 168 vary char 32 vary char 32 vary char 32 vary char 32 vary char 32 vary char 32 vary ee em answer ascii array 1 1 temp y float temp x float x flt items y flt items fp x fp y x num items y num items x num pixels y num pixels y tab extent scrn x scrn y i x y z str len fix15 num syscode oops systemao break quitp legalp no yes normal inverse match item match_header current 146 char 1 char l based float 23 float 23 float 23 float 23 float
70. call askn source of font no spaces use underbars raw gt font source call askn today s date no spaces use underbars raw gt font date raw font serial num 1 raw gt font chr 1 index 1 call grinfocolor blue green white call grin rectv 511 511 planes8919 off call alignment raw call vidicon call step5 0 0 xstep ystep open sequence raw do while 1 b E do z while z lt 1 call tablet xorg yorg z if z 2 then do do z 2 while z 2 call Stapler x y zZ end call ioan BEGIN NEW CHARACTER call grin rectv 0 511 511 planes8919 off call step5 x y xstep ystep open sequence raw end else if z 4 then do do z 4 while z 4 call Stablet x y z end call askn DO YOU REALLY WANT TO QUIT yes no answer if answer yes then do raw gt font serial num raw gt font serial num 1 goto wrapup end me mm _ a e end else if z 8 then do do z 8 while z 8 call tablet x y z end call ioa END CHARACTER call step5 x y xstep ystep close sequence raw call grin linev 6 raw gt font base line 511 raw gt font base line plane8 on c
71. char 32 based arg ptr char 168 vary char 32 vary char 32 vary char 32 vary 109 u_u 2 gt u gt nardy gt menu gt menu_creator pll text ptr pointer head ptr pointer i fix 15 char count fix 15 syscode fix 31 text menu_error oops bit 1 condition RII ITO III TOIT RARE RAR TOR ITOK IO IRR IO KK ARA RARA on oops begin goto exit end call scs get arg count num args if num args amp then call askn name of menu else do call scs get arg info 1 arg type arg length arg ptr menu name menu name substr arg ptr gt arg string l arg length end if substr menu name length menu name 4 5 menu then menu name substr menu name 1 length menu name 5 entry name menu name menu ir num args 2 then do call scs get arg info 2 arg type arg length arg ptr if substr arg ptr gt arg string 1 arg length special then unspec menu ptr 00040000 b4 end else unspec menu ptr 00c0900 b4 call scs expand path call init text seg call create menu seg menu name dir name garbage name syscode dir name entry name text ptr char count dir name menu name menu ptr allocate s allocate f allocate k So ne 4 do i l to parts start gt s i 1 finish gt f i 1 e
72. ctor description l ground 13 in 3 rate 4 2 remote reset 14 out 3 3 not used 15 in 4 mode 1 4 strappable l6 out 4 5 volts output 17 in 5 mode 2 5 not used 18 out 5 6 not used 19 in 6 byte received 7 in 9 status valid 20 out 6 byte available 8 out 0 21 in 7 next byte 9 inl rate l 22 out 7 19 out 1 23 ground ll in 2 rate 2 24 not used 12 out 2 25 data strobe command byte in 7 in 6 in 5 in 4 in 3 in 2 in 1 21 19 17 15 13 11 g9 next byte mode mode rate rate rate byte recv 2 1 4 2 1 lata bytes out 7 out 6 out 5 cut 4 out 3 out 2 out 22 20 18 16 14 12 10 byte 1 avail 3 2 f1 f g 6 x5 x4 x3 x2 x1 S Ji x11 x10 x9 x8 x7 G y5 y4 y3 y2 yl Q g yll vio y9 y8 y EU Z axis value f3 gt fl flag xll gt x 12 bit x coordinate in 97 status valid out Y 08 XK x6 yo y6 data strobe 25 byte byte byte byte byte 199 yll gt y 12 bit y coordinate data strobe is a negative or positive pulse which emulates byte available put which I don t think we use switch out off active switch in on inactive a logical l b a logical 0 b nu The status valid bit informs the tablet that a change is desired if Status valid l b then the bit pad will read the command byte else status valid 0 b the bit pad will search for front panel switch closure remote command w active status valid therefore when the host processor is changing the rate or mode sett
73. e lower left corner of the screen Scale works this way for all of the map frame procedures scale pixels displayed 1 512 x 512 2 256 x 256 4 128 x 128 8 64 x 64 2 2 2 10 map frame ctr This procedure and associated arguments are declared as follows declare frame ctr entry fix 15 fix 15 fix 15 x center fix 15 y center fix 15 scale fix 15 call map frame ctr x center y center scale This procedure controls which part of the frame buffer is displayed x center y center is the pixel displayed in the center of the screen Scale works as described earlier 27 272 2 11 map frame loc This procedure and associated arguments are declared as follows declare frame loc entry fix 15 fix 15 fix 15 x locus fix 15 y locus fix 15 scale fix 15 call map frame loc x locus y locus scale This procedure controls which part of the frame buffer is displayed x locus y locus is an invariant pixel that does not change its displayed position as a result of calling this procedure 2 2 2 12 map frame reset This procedure is declared and called as follows declare map frame reset entry call map frame reset This is equivalent to calling map frame org 9 1 2 2 2 13 map cursor This procedure is declared and called as follows declare map cursor entry fix 15 fix 15 fix 15 number fix 15 Screen x fix 15 Screen y fix 15 call map cursor number screen x screen y
74. ed as a parameter but is initialized automatically to the same address bl0000 at the start of each procedure 2 2 1 3 include This file when included in source code of an application program declares all maps procedures 2 2 2 The maps procedures 2 2 2 1 map setup This procedure is declared and used as follows declare map setup entry call map setup 21 The procedure must be called before any other map procedure It calls map load parameters which appends if necessary the map param l data segment in the current working directory and initiates it at address b b4 in user space see map load parameters It also sets default values for each window coordinate space x origin y origin x extent y extent world window y 512 512 screen buffer port 512 512 tablet port 76 600 2048 1536 The world window is identified with the screen buffer port Tablet port is based on four considerations 1 most resolution possible in each direction 2 comfortable fit of puck on tablet 4 ratio of tablet device units screen pixels is an integral 3 1 for x 4 1 for y 4 more units in direction of greater arm movement The zoom scale is set to l and cursor is turned on 2 2 2 2 map window This procedure and associated variables are declared and used as follows declare map window entry float 23 float 23 float 23 float 23 x_origin float 23 y origin float 23 x extent float 23 y extent flo
75. el gt ascii array i end call ioa call ioan CONTENT r if to gt content null then do str len to item content fixl5 do i 3 to str len 2 call ioan a to gt item content gt ascii array il end end if to gt item content null then call ioan call ioa if to gt item right null then call ioa is a LEAF node runs a procedure else call ioa is a MENU node puts up a new menu if to item right null then do auxiliary to gt item right gt m first item call tree writer auxiliary end if to item left null then call tree writer to gt item left end 135 APPENDIX III Model menu 136 1 gt u gt nardy gt profile gt typ4 menu 92 40 05 Tuesday May 3 1983 um en n ma n n a o a e MENU typ4 font processor level one raw raw file raw file 1 dir raw_dir init init raw term term raw draw raw draw one one raw char all all raw chars headers raw headers file raw_file stats chars raw_list modify mod_raw capture contour glyph glyph file glyph file l dir glyph_dir init old init_old_glyph init new init_new_glyph term term glyph draw glyph draw one draw_glyph all all_glyphs headers gl
76. em a case analysis here you have derived the next pointer but it may be meaningless if the live item pointed to by the header is a null item or if the live item points to a null header then quit the loop end i do quitp no while quitp no call draw menu current gt item right menu ptr previous current current current gt item right gt m live item if current null then quitp yes else if current gt item right null then quitp yes end call draw title previous inverse menu ptr 165 call draw prompt previous normal menu ptr end 166 a e a come e ee a 1 gt u gt nardy gt use gt before dollar pll 02 38 19 Thursday April 28 1983 rocco nemo XX M before dollar procedure program name returns char 32 vary declare i fix 15 max len fix 15 program_name char 32 vary sub_string char 32 vary max len length program name sub string do i l to max len if substr program name i 1 then do if i gt 1 then return sub string else sub string end else sub string sub string
77. enu_ptr gt menu seg title port planes pos l grin rectv 0 O 511 Sil bit str off menu ptr gt menu seg prompt port planes pos grinSrectv 6 9 511 511 bit str off 02 42 15 Thursday April 28 1 1983 1 b 1 b He ee he de e de hehe RA de He e Fe de e ke e de de e de de e ke e de e de e de e e e e ke e e He de e kk e de e e e AAA XXX KX call check 6 0400 b4 call check 7 0200 b4 call check 8 0100 b4 end 162 1 gt u gt nardy gt use gt kill all living things pll 02 35 20 Thursday April 28 198 kill all living things procedure new menu include menu item dcl declare item ptr pointer if new menu m live item null then new menu gt m live item null do item ptr new menu gt m first item repeat item ptr gt item left while item ptr null if item ptr gt item right null then call kill all living things item ptr item right end end em vm cus _ 1 gt u gt nardy gt use gt kill menu list pll 02 36 07 Thursday April 28 1983 kill menu list procedure new menu menu ptr include menu dcl include menu item dcl declare next menu pointer Serase menu entry pointer pointer call erase menu new menu
78. eset nbbr call rd tab addr first byte call wd tab addr byte received do garbage byte 09 b4 while substr garbage byte 2 1 call rd tab addr garbage byte end call wd tab addr reset nbbr end e raw data 1 first byte do i 2 to 5 call wd tab addr next byte do garbage byte ff b4 while substr garbage byte 2 1 call rd tab addr garbage byte end do delay L to duration end call Swd tab addr reset nbbr call rd tab addr raw data il call wd tab addr byte received do garbage byte 00 b4 while substr garbage byte 2 1 call rd tab addr garbage byte end call wd tab addr reset nbbr end call wd tab addr next byte far field 0 E do garbage byte ff b4 while substr garbage byte 2 1 call rd tab addr garbage byte far field far field 1 if far field gt 50 then do x Y b zbits ffff b4 return 102 3 gt u gt nardy gt map gt raw_xyz pll end end do delay 1 to duration end call wd tab addr reset nbbr call rd tab addr check byte call wd tab addr byte received do garbage byte 00 b4 while substr garbage byte 2 1 call rd tab addr garbage byte end call wd tab addr reset nbbr end xbits ffff b4 ybits ffff b4 zbits tffff b4 substr zbits 13 4 substr raw data 1 3 4 substr xbits ll 6 substr raw data 2
79. et of contours should the character require more than one contour 4 1 4 Alternate chain coding routine 4 1 4 1 An even more efficient code consists of three bits per link and requires that the number of links in a contour be stored separately rather than being flagged in one of the links as in the first example 60 5 4 119 191 199 7 CR 3 111 211 1 2 091 210 4 1 4 2 In this method the current point is assumed to be in the center of a 9 unit matrix The next point on the contour can be in any one of 8 positions which can be recorded by the specific 3 bit code shown 61 4 2 THE CONTOUR PACKAGE A USER MANUAL 4 2 1 Description the font gun 4 2 1 1 The font gun has four elements The main structural element is a polaroid copy stand oriented horizontally the post is horizontal the copy board vertical A vidicon digitizing camera is attached to a mount on the post so that its distance from the copy board may be adjusted A platform is attached to the copy board with two adjustable screws so that its vertical position may be precisely adjusted O typositor film held vertically in track on platform _ VIDICON CAMERA 1 e em emm enm em Gem UD cm em UD e CU Gm ame mam adjustable platform adjustable mount on c
80. ext 512 scale p q buf yext p q buf xext P gt q scale scale x center p gt q buf xorg p gt q buf xext 2 0 y center p gt q buf yorg p gt q buf yext 2 0 4 xgrin x center l ygrin y center 1 32 scale if scale then zoom_nbr else if scale else if scale then zoom nbr else if scale then zoom nbr call grin zoom xgrin ygrin zoom nbr then zoom nbr 1 5 O l 2 3 UH Hg Un GO PMH call Srecalc end 85 l gt u gt nardy gt map gt frame ctr pll 03 00 45 Thursday April 28 1983 frame ctr procedure x center y center scale include p dcl declare x center y center scale fix 15 xgrin ygrin zoom nbr fix 15 declare grin zoom entry fix 15 fix 15 fix 15 recalc entry RR RRR kk RRR ehe he he RARA RRA RARA RARA e he he KR AAA AA e e e de ke e de ke e e e e ke ke ke ke unspec p 000b0000 b4 p gt q buf xext 512 scale p gt q buf yext p gt q buf yext p q buf xorg x center p gt q buf xext 2 p q buf yorg y center p gt q buf yext 2 o se p q scale scale xgrin x center l ygrin y center l 32 scale if Scale l then zoom nbr else if scale 2 then zoom nbr else if scale 4 then zoom nbr else if scale 8 then zoom nbr call grin zoom xgrin ygrin zoom nbr uon dn H WN EPO SORG CRE RE xe call Srecalc end 86 1 u nardy map frame loc pll 03 01 48 Thursday April
81. fix bit 1 2 pop up mode bit l 2 menu color 3 ov8 fix 15 3 ov9 fix 15 3 ovl fix 15 2 ground port 3 x abs fix 15 3 y abs fix 15 3 x rel fix 15 3 y rel fix 15 3 x ext fix 15 J y ext fix 15 3 x ch fix 15 3 y ch fix 15 3 w ch fix 15 3 h ch fix 15 3 outline fix 15 3 txtmode bit 16 3 planes bit 16 2 menu port like ground port 2 item port like ground port 2 title port like ground port 2 prompt port like ground port 2 root data pointer 2 root_menu pointer 2 menu_area area 160909 144 A A e we we O ee ee 4 9 XX r o A e c e a ee A e www mw me A A ewer newer e 1 gt u gt nardy gt menu gt menu item dcl incl pll 02 54 42 Thursday April 28 1983 declare new_menu pointer lm based new_menu 2 first_item pointer 2 live_item pointer to pointer l item based tc 2 label pointer 2 content pointer 2 right pointer 2 left pointer 2 x fix 15 2 y fix 15 menu manager use entry Sinclude menu dcl include menu_item_dcl include ma dcl declare ioa ioan askn locs getc scs cl scs get_arg count scs get_arg_info scsSexpand _path hcs terminate tmr grin ocolor init menu restore menu Serase menu planes procedure 145 entry entry entry entry entry entry entry options variable options variable char 1 options varia
82. g and Sorting 73 ACKNOWLEDGMENTS 74 ACKNOWLEDGEMENTS I want to thank these people My family Marion Tom Jay Zan and Lee whose love and support made these two years at M I T possible Muriel Cooper Ron MacNeil at the Visible Language Workshop and Ken Sloan Patrick Purcell at the Architecture Machine Group for guidance help and occasional impossible demands that spurred progress Lorna Shanks at Xerox Mike Parker at Bitstream Ed Schwalenberg at Camex who added a real world perspective to this effort Anne Russell Rob Haimes Lee Silverman good people whose help and counsel has made this work go smoother Fellow graduate students both here and departed Sandy Debbie Pam and Bobby Loring my family away from home for encouragement and support Richard Durling Shyderoff for innumerable contributions in the realm of philosophy 75 APPENDIX I Source code for map package 76 an m cnc 9 _ n e mm 1 gt u gt nardy gt map gt map bind 02 49 12 Thursday April 28 1983 r rc cono
83. gin is known to be outside the origin because its value was tested as a part of the procedure new direction of search d initial direction of search 4 1 2 3 The process is now to advance along the contour always moving into a new cell whose right hand neighbor is outside the contour This is a necessary and sufficient condition to ensure that a complete bounded area will be recorded It is analogous walking through a maze with one hand always on the wall to ensure that you trace the whole maze and exit where you entered As each move is made a record is kept of x and y increments known as a chain code 57 4 1 2 4 The following diagram shows the questions to be answered at each step along the edge is the pixel directly forward in our out is the pixel forward and to the left in or out I 4 2 1 5 These are the three possible ways these questions might be answered m c 6 et mes M rr OE uA tt T gee ee _ m m E _ __m mp zrT__rte__ I _kknm1 ee ee mem 58 4 1 2 6 In case l we have reached an outside corner It is necessary to rotate our direction of search 99 degrees counterclockwise In case 2 the edge is straight and we advance straight ahead In case 3 we are on an inside corner We must
84. gt menu seg root menu null 1 start call next char do done no while done no determine the menu level by counting spaces tabs menu level 0 space count do while ch space ch tab if ch tab then do U 4 menu level menu level 1 space count end else if ch space then do space count space count 1 if space count 5 then do menu level menu level 1 space count end end call next char end arrive here knowing menu level and first non space tab char if ch is not carriage return or comment marker work on the line if ch ret then if ch then do find last legal ch of label delete trailing space tabs first legal i last legal i leaf bit no do quit no while quit no call next char if ch then quit yes else if ch then quit yes else if ch then quit yes else if ch then do quit yes leaf bit yes end else if ch then do quit yes content ptr null end 124 if ch ret then do quit yes content ptr null end else if ch space then if ch tab then last legal i end arrive here knowing first legal ch last legal ch x if text ptr gt ascii array first legal then call match and save label ptr else call save string label ptr arrive l cont 2 ch 3 othe content if ch else here with ne
85. gt menu seg title port x ext 2 y2 yl menu ptr menu seg title port y ext 2 x xl menu ptr gt menu seg title port x ch y yl menu ptr gt menu seg title port y_ch call grin rectv xl yl x2 y2 menu ptr menu seg title port planes on if norm inv 0 b then do normal Xl xl menu ptr gt menu seg title port outline yl yl menu ptr gt menu seg title port outline X2 x2 menu ptr gt menu seg title port outline y2 y2 menu ptr menu seg title port outline call grin rectv 154 nce none m e e e e ce 4 cn e _ xl yl x2 y2 menu ptr gt menu seg title port planes off end right margin x2 bottom margin yl next do the characters ret text mode menu ptr gt menu seg title port txtmode substr text mode 1 1 norm inv if menu ptr gt menu seg leaf prefix l b then if instance gt item right null then do call grin text x y text mode x x menu ptr gt menu seg title port w ch end e o do i 3 to instance gt item label gt fix15 2 one char instance gt item label gt ascii array i if ascii_num gt 95 amp ascii_num lt 127 then ascii num ascii num 32 if one char then x x menu ptr gt menu seg title port w ch else if one char then sleazy tab x x 5 menu _ptr gt menu_seg title port w ch else if
86. hen do substr raw gt font vector prev_close counter prev_close pos 4 1010 b call summary5 low_x high x low y high y counter counter raw font chr raw font serial num index raw font serial num 180 nno a A A ee fixnum low x alias bit str raw font vector raw font chr raw font serial num index bit str fixnum low y alias bit str raw font vector raw font chr raw font serial num index 1 bit str fixnum high x alias bit str raw gt font vector raw gt font chr raw gt font serial num index 2 bit str fixnum high y alias bit str raw font vector raw font chr raw font serial num index 3 bit str call askn name of the current character raw font chr raw font serial num name Call ioa r raw gt font serial num raw gt font serial _num 1 if raw gt font serial _num gt 128 then do call ioa character table is now full 128 characters already stored code close file end d counter counter 1 pos 1l raw font chr raw font serial num index counter end else if code rotate_cc then do xtemp ystep ystep xstep xstep xtemp end else do if code step forward then do X 7 X xstep Y y ystep end if c
87. ify scale and an invariant point around which all scaling occurs and which would not change screen position before and after scaling 19 2 2 THE MAP PACKAGE A USER MANUAL 2 2 1 Introduction to map package 2 2 1 1 This set of routines facilitates the user s control of three two dimensional spaces the screen the tablet and the world space of interest to the user The procedures of this package are bound together as a single segment named map A structure containing parameters accessed by all procedures is in a separate segment named map param l which is managed automatically by the package 2 2 1 2 Use of space The user may have as many virtual core memory spaces as he can think up four letter names for Each space is 16 addressed 0 b4 to f b4 32K byte addressed 0000 b4 to 7fff b4 segments Each segment is either object code or data The following schedule shows a likely distribution of segments in a space when the map package is used 20 address reference name g unavailable to user H unavailable to user 2 ioa iocs rl scs stty 3 grin 4 math 5 use the menu manager program 6 map 7 io util 8 com err 9 user application procedure a user data segment b map param l C menu tree data structure d unavailable to user e linkage and storage for based f storage for automatic variables Each map procedure refers to and stores data in map param l The pointer to this segment is not pass
88. igitizer card spd bit 16 init a 00 b4 initialize all peripherals lpr cd bit 16 init c080 b4 select shift thresh modes lpd cd bit 16 init d860 b4 select continuous digitizing inbuf 12 bit 16 any key char 1 x y 2 fix 15 break condition on break begin goto exit end setup inbuf 1 803 b4 inbuf 2 lfff b4 call grin gwrite inbuf 2 digitize inbuf 1 spdl select digitizer card d inbuf 2j lpr cd select no shift no threshold x inbuf 3 lpd cd select continuous digitizing call grin gwrite inbuf 3 call ioan r Press spacebar to stop digitizing call iocs getc any key call ioa clean up inbuf 1 spd call grin gwrite inbuf 1 exit end 9 189 _ pr es 4 r a mre m 1 gt u gt nardy gt edge gt alignment pll 03 56 20 Thursday April 28 1983 alignment procedure raw include raw file structure declare ioa ioan entry options variable askn entry options variable iocs getc entry char 1 vidicon entry tablet entry fix fix fix grin rectv entry fix fix fix fix bit 16 fix grin linev entry fix fix fix fix bit 16 fix declare choice char 1 x y Z fix 15 prev y fix 1
89. ing of the command byte it should first set status valid 0 b then change the desired mode and or rate setting finally reset status valid 1 b But l am given to understand that currently the P E i o port inverts data from to the tablet so is active The desired settings for vlw are next byte 1 020 10 1 inverted 6 1 1 6 1 1 1 0 byte received 0 1 O 1 1 inverted 1 e 1 1 1 1 the algorithm for getting 5 bytes of information from the tablet using bit values which are not inverted when we arrive at the top of the loop with a 0 b inverted l b we want to fall out of the loop therefore we initialize at f b so that we go thru the loop at least once see tablet pll do while first bit of check byte g b do while first bit of first byte 1 b synch up to the first byte set next byte lt l b out initialize far field counter lt 0 do while byte available bit g b wait for tablet to present data garbage byte lt byte from tablet port in increment far field counter 1 200 i ee mm i r r r a K e nm __
90. itor and the device space of the graphics tablet The first tool figures the transforms necessary to map one space into another This allows the user to point at a location on the tablet and thereby identify corresponding points on the screen and in user defined space Interactive page layout requires the orchestration of large numbers of separate procedures Choosing between these procedures can be made easier for the user if he is presented with a menu of options when a decision is required The second tool is a package of programs to help the programmer create and manage simple or complex menus Simulating type on a monitor requires digitized fonts The third tool is a package of programs which extracts the edge of a letterform image in the frame buffer and Stores it as a chain code Thesis supervisor Muriel Cooper Title Associate Professor of Visual Studies CONTENTS Introduction page 5 l Software tools Programmes for solutions Presummary A Method of explication computing environment PUNE Pointing and mapping page 11 l 2 3 The ideas l World and device space 2 Ports and windows 34 Zoom facility The map package a user manual l Introduction 2 The map procedures Further work Menus page 32 l The ideas l Requirements for interactive graphics Da Definition of a menu 3 Visual format The menu package a user manual l The menu text file 2 5 The menu outline
91. kage O M e l gt u gt nardy gt menu gt menu bind 14 36 47 Tuesday April 26 1983 me mm re r e e e e n am ee menu entry calls all other programs menu creator file handling procedures create menu seg init text seg chops up menu into separate sections part finder 7 make linked lists and fill in menu data structure prompt list maker port maker tree maker add tree node option maker figure xy read data structure to confirm data is saved properly prompt list writer port writer tree writer 106 e e aae l gt u gt nardy gt menu gt menu dcl incl pll 14 41 51 Tuesday April 26 1983 declare menu ptr pointer l menu seg based menu ptr 2 leaf prefix bit 1l 2 pop up mode bit 1 2 menu color 3 ov8 fix 15
92. l grinfuncolor b g r pixel if r b g gt 383 then do in check for origin match if instruction check again then do if tentx xorg amp tenty yorg then instruction close fwd right else instruction step fwd right end else if tentx xorg amp tenty yorg then instruction close forward else if instruction look for edge then instruction bad start i else if instruction keep looking then instruction open contour else instruction check again end else do out no need to check for origin match if instruction check again then instruction step forward else if instruction look for edge then instruction keep looking eise if instruction keep looking then instruction keep lookinc else instruction rotate cc enc ena XXX X KK KKK oc oe e e de X de ce KK KEK KEK KKK KEKE KEKE ie de de de e KK KEKE kk E E O 175 on systemao begin end contour entry call ioa ocsfont capture program call askn name of font file no spaces use underbars font file if length font file gt 28 then font file substr font file 1 28 u font file font file raw call ncsyappend seg u type raw font file syscode unspec raw 00090000 b4 Ed call hcsfinitiate w options u type raw font file font file l b raw syscode call ioa font file a appended and initiated font file raw gt font name font file
93. ld far field 1 if far field gt 500 then do 197 x O y 0 z l return end end do wait 1 to duration end call wd tab addr reset_nbbr call rd tab addr check byte call wd tab addr byte received do garbage byte all zeros while substr garbage byte 2 1 1 b call rd tab addr garbage byte end call wd tab addr reset nbbr end xbits sixteen ones ybits sixteen ones zbits sixteen ones substr zbits 13 4 substr raw data 1 3 4 substr xbits 11 6 substr raw data 2 3 6 substr xbits 5 6 substr raw data 3 3 6 substr ybits ll 6 substr raw data 4 3 6 substr ybits 5 6 substr raw data 5 3 6 xbits xbits ybits ybits zbits zbits if x lt 77 then x 77 else if x gt 2124 then x 2124 if y lt 500 then y 500 else if y gt 1940 then y 1949 x x 77 4 y y 500 3 call grin vis 99002 b4 call grin pos 2 x y end 198 a a re O 0 m we A ee w e M 1 u nardy tablet tablet doc 03 26 29 Thursday April 28 1983 o o e e o O o e O O O O O O O aa O O O e a O O O a e a D O O o O O o O ee documentation for tablet pll remote control of the tablet parallel interface conne
94. le 9 or l or multiple bit to 8 or Y to 255 for example Bit maps are efficient at small sizes but quickly grow to unwieldly sizes Run codes slice through letterforms and record the number of same light dark values in a sequence This method produces a more compact code than bit maps but takes a slightly more complex algorithm to reconstruct the letterform 4 1 1 2 The most efficient codes in terms of storage are edge codes which themselves only with the contour of the letterform Spline edge codes store the edge as a series of control points The shape is reconstructed by fitting 55 the control points into equations which describe the lines that make contour Somewhat simpler are chain codes record unit x and y increments as the shape of the edge is traced This chain code technique is the method used and explained here 4 1 2 An edge detecting routine 4 1 2 1 The edge of the contour is found by starting outside the contour at A for example in the following diagram and reading the color along a row of pixels The first pixel lighter than middle grey is the origin of the contour at B Other threshold values might be used depending on the nature of the image lt direction of search B A in in out out out out inside outside 56 4 1 2 2 Next the direction of the search is rotated 99 degrees clockwise with this result the pixel to the right of the ori
95. lse do current menu ptr gt menu seg root menu gt m first item menu ptr gt menu seg root menu gt m live item current call kill all living things current gt item right call draw title current inverse menu ptr call draw prompt current normal menu ptr call draw menu current item right menu ptr ena x num items menu ptr menu seg menu port x ext menu _ptr gt menu seg item port x ext x flt items x num items y num items menu ptr menu seg menu port y ext menu ptr menu seg item port y ext y flt items y num items X num piaels menu _ptr gt menu_ seg item port x ext x num items y num pixels menu ptr gt menu seg item port y ext Y num items temp x float x num pixels temp y_ float y num pixels y tab extent temp y float 2000 6 temp x float do quitp no while quitp no call mapStablet 77 601 2048 y tab extent call map window 6 0 x flt items ys ELE items call map port menu _ptr gt menu_ seg menu port x abs menu ptr gt menu seg menu sport Yo abs X num pixels y num pixels do legalp no while legalp no 148 do z while z lt 1 call map fp scrn x scrn y fp x fp v z end ni di E do while z call map fp scrn x scrn y fp x fp y z end x fp x Y 7 fp y call match finder menu ptr gt menu Seg root menu X y match item match header menu ptr if match item null then legalp yes
96. menu no indent flush left followed by the first level prompt To indent one from the preceeding item insert 1 extra tab or 5 spaces before the next label No numbers or letters I A l a are necesary use only indents 41 3 2 2 3 The syntax for a menu item that results in another menu is label prompt label match string If the prompt will fit on one line following the label single or double quotes may be used Otherwise put a match string in brackets after the label and put the same match string in brackets in the prompts section followed by the full text of the actual prompt 3 2 2 4 The syntax for an item that calls a procedure is label procedure name For readability extra carriage returns can be inserted between lines Extra tabs and spaces can be included between required elements Tabs or spaces are significant only at the beginning of the line 3 2 2 5 Keep the labels short Any characters which don t fit in the boxes see the ports section are truncated and not displayed 42 3 2 3 Prompts 3 2 3 1 Prompts give the user information on items at the next sublevel Because the outline is restricted to one line per item the prompts section allows the programmer to write as detailed a prompt as is needed and to associate it with a label by a match string in brackets 3 2 3 2 The characters that flag the start of this section are PROMPTS no quotation marks The syntax for each p
97. mode it goes away after user has chosen a procedure and reappears after the procedure has finished executing 3 2 6 Making the menu After the text file has been completed it is turned into a menu tree data file by running the menu program with the text file name with or without the menu as an argument menu textfile Or menu textfile menu It is analagous to compiling a pll program The menu program does not print error messages but does print out 47 the current line s in the text file that it is working on If the menu program finds some syntax error it can t handle the user then should then inspect that line of the textfile After the menu tree file is made it can be used by the use program 48 3 3 THE USE PACKAGE A USER MANUAL 3 3 1 Using the menu data segment The menu program processes a text file called something menu into a data file which it calls simply something Using the menu requires the user to type use something at command level If he types simply use the use program will prompt for the menu name 3 3 2 Use of space As noted in the map section the user may have as many virtual core memory spaces as he can think up four letter names for Each space is 16 addressed b4 to f b4 32K byte addressed 0000 b4 to 7fff b4 segments Each segment is either object code or data The following schedule shows a likely distribution of segments in a space when the use package i
98. nd key gt k 1 PROMPTS key gt k 2 MENU i 110 3 gt u gt nardy gt menu gt menu creator pll key gt k 3 OPTIONS key gt k 4 PORTS call part finder text ptr start finish key parts char count text menu error if call call free free ree exit end text menu error then do call Call call call Call Call call Call call end prompt list maker menu ptr text ptr head ptr start gt s 1 finish gt f 1 prompt list writer head ptr port maker menu ptr text ptr start gt s 4 finish gt f 4 Sport writer menu ptr tree maker B menu ptr text ptr head ptr start gt s 2 finish gt f 2 option maker menu ptr text ptr start gt s 3 finish gt 3 figure xy 0 1 menu ptr gt menu seg root menu gt m first item menu ptr ioa r kk e e k k ee e RA e e e k k MENU KKK KKK kk ke ke e RK ke ee EN gt tree writer menu ptr gt menu seg root menu gt m first item hes terminate text ptr hcs terminate menu ptr 1 gt u gt nardy gt menu gt create menu seg pll 14 44 17 Tuesday April 26 1983 e ee ee ee r r en r ee ee ee ee ee
99. ne yes else call next char end Bil call ioa rOPTIONS if menu ptr gt menu seg leaf prefix l b then call ioa leaf prefix yes else call ioa leaf prefix no if menu ptr gt menu seg pop up mode l b then call ioa menu mode pop up clse call ioa menu mode call call call ioa color code of plane 8 ioa color code of plane 9 ica color code of plane 10 continuous menu ptr gt menu seg menu color ov8 menu ptr gt menu seg menu color ov9 menu_ptr gt menu_seg menu_color ovl18 Ma i p 130 call ioa W black l blue Z green 3 cyan 4 red 5 mag 6 yel 7 white call ioa 131 1 gt u gt nardy gt menu gt figure xy pll 02 04 20 Thursday April 28 1983 mo M n e _ m m m e figure xy procedure param x param y head menu ptr include menu dcl include menu item dcl declare answer char 1 askn entry options variable ioa entry options variable head pointer current pointer param_x fix 15 param y
100. non space tab char i start line ch text ptr gt ascii array i do while ch ch SPE call next char end a if ch then a comment line if ch then begin next section if unspec ch 13 then cr end of line do match string do while ch amp ch match string match string il ch call next_char end do while ch ch call next_char end assign structure values depending on match string if substr match string 1 6 ground then call assign_ten addr menu ptr menu seg ground port else if substr match string 1 4 menu then call assign ten addr menu ptr gt menu_ seg menu port else if substr match string 1 4 item then call assign ten addr menu ptr menu seg item port else if substr match string 1 5 title then call assign ten addr menu ptr menu seg title port 120 a a e O r n s e e r a a e e we else if substr match string 1 6 prompt then call assign ten addr menu ptr gt menu seg prompt port end start line j 1 end calculate absolute screen positions for each port menu ptr menu seg ground port x abs menu ptr gt menu seg ground port y abs not necessary to calc
101. nt file call hcs terminate raw end 178 a O nni T e ee o e a nie a e wm nm em e 4 e step5 procedure x y xstep ystep code raw include raw file structure declare x y xstep ystep code declare ioa skn summary5 declare counter pos low x high x 1ow y high y prev x prev y prev close counter prev close pos declare safe limit xtemp vector index vector length fixnum bit str declare open sequence close sequence open contour close forward step forward close fwd right step fwd right rotate cc close file fix 15 fix 15 fix 15 entry options variable entry fix fix fix fix fix fix fix fix 15 static fix 15 static fix 15 static fix 15 static fix 15 static fix 15 static fix 15 static fix 15 init 15299 Tx 15 fix 15 fix 15 fix 15 fix 15 defined fixnum fix 15 init fix 15 init fix 15 init fix 15 init fix 15 init fix 15 init fix 15 init fix 15 init fix 15 init A UL ON A m KA 0 10 Ln E yn KA e RIR RR RR RR RR RARA if code open sequence then do counter raw gt font chrlraw gt font serial num index 4 pos 1
102. nt ptr leaf bit call scs allocn 20 to menu ptr menu seg menu area to gt item y menu level 1 level 1 is not displayed to gt item label label ptr to gt item content content ptr if leaf bit yes then to gt item right null if menu ptr menu seg root menu null then do do call scs allocn 8 new menu menu ptr gt menu seg menu area new menu gt m first item to new menu gt m live item null end menu ptr gt menu seg root menu new menu to gt item x Y S to item left null end else call Sadd tree node to from menu ptr from to G end if necessary mop up rest of chars on line find car return do while ch ret call next char end if i finish then done yes else call next char end a do while to gt item left null end from to gt item left to gt item left null to from end 126 i r i a a r a P m a o o m a m r e M M _ e add tree node procedure to from menu ptr include menu dcl include menu item dcl declare scs allocn entry fix 31 pointer area from pointer III NNN ke e he ek ek e he He e e e e ek e e de de e He ek e e e e e kk ke e heo e e e de e ee ee if to gt item y gt from gt item y then do to gt item left from temporarily
103. ntry options variable grin rectv entry fix flx fix fix bit 16 fix declare low x high x fix 15 low y high y fix 15 index fix 15 length fix 15 serial num fix 15 ratio fix 15 plane9 bit 16 init 0209 b4 on fix 15 init 1 x extent y extent fix 31 xy pixels fix 31 RER IIH fo e e e ce ee e e ee e ee e e e e ee e ehe KR e ke kk e he e RR e de he e RICK e e de jede ee ee call grin rectv low x low y high x low y plane9 on call grin rectv high x low y high x high y plane9 on call grin rectv high x high y low x high y plane9 on call grin rectv low x high y low x low y plane9 on x extent high x low x 1 y extent high y low y 1 xy pixels x extent y extent ratio xy pixels 7 length call ioa summary call ioa character number 5i limit 128 serial num call ioa now up to vector element 5i limit 150990 index call ioa high x 3i high y 3i high x high y call ioa low x 3i low y 3i low x low y call ioa image size i bytes 1 byte pixel xy pixels call ioa code size i bytes length call ioa compression ratio image code i l ratio end 183 ____ _ eum o veto cum cmo e a a e r a o n a m n a e t au me wA A re nn review procedure raw include raw file structure declare ioa ioan askn locs getc math
104. nu seg item port w ch else else else end if one char then sleazy tab x x 5 menu ptr menu seg item port w ch if one char ret then do x menu ptr gt menu seg item port x abs menu ptr gt menu seg item port x ch y y menu ptr gt menu seg item port h ch end i do if x menu ptr gt menu seg item port w ch lt right margin then if y gt bottom margin then do call grin text x y text mode one char x x menu ptr gt menu seg item port w ch end end 152 o_o o r m erase item procedure instance menu ptr include menu dcl include menu item dcl declare grin rectv entry fix fix fix fix bit 16 fix instance pointer xl yl x2 y2 fix 15 off fix 15 init 0 on fix 15 init 1 CK Ce e e e e o ek e I II e e e ee hee e eh e de He de He e RI III SIRIA eee e eek xl menu ptr gt menu _seg item port x abs instance item x menu ptr menu Seg item port x ext yl menu ptr gt me
105. nu seg item port y abs instance gt item y menu _Ptr gt menu_seg item port y ext x2 xl menu ptr gt menu seg item port x ext 2 y2 yl menu ptr menu seg item port y ext 2 call grin rectv xl yl x2 y2 menu ptr menu seg item port planes off 153 a me me um um 000 A 400 w l u nardy use draw title pll 02 28 39 Thurscay April 28 1983 draw title procedure instance norm inv menu ptr include menu dcl include menu item dcl declare ioa entry options variable grin rectv entry fix fix fix fix bit 16 fix grin text entry fix fix bit 16 char 1924 vary instance pointer xl yl x2 y2 fix 15 i x y fix 15 right margin fix 15 bottom margin fix 15 off fix 15 init 0 on fix 15 init 1 fixl5 fix 15 based text mode bit 16 norm_inv bit l normal 0 b inverse l b ascii array 1 1 char 1 based char l char l fix 7 defined one char ret one_char ascii num BR RRR RIA de e de III I XX XNXX de ke de He NXN IO XXX de de Fe He ke de de He He He KX de ke ke fff ff k k ke first do the box xl menu ptr gt menu seg title port x abs yl menu ptr menu seg title port y abs x2 xl menu ptr
106. ocedure to the next in a purposeful efficient way requires an interface with the following characteristics 3 1 1 2 The system must present options to the user and respond to his choice in a consistent manner Predictable behavior makes it easier for the user to adjust to the system The system should accommodate both new and experienced users especially with respect to prompts so that they are available to new users or can be ignored or bypassed by experienced users The system should provide feedback to reinforce choices and not allow unanticipated choices to crash the process Also some accomodation has to be made for the fact that different users use tools in different ways 34 3 1 1 3 All this places special demands on the programmer who in turn has needs of his own to be met with respect to developing and coordinating large sets of programs He needs some way of organizing the procedures so that only the ones of immediate interest are presented to the user to select He needs some way of managing core memory so that procedures don t hang around when they are no longer needed Some operating systems take care of this for the programmer The changeability modularity and communication of values between procedures 3 1 2 Definition of a menu 3 1 2 1 The intuitive answer seems to call for some form of a menu but this only seems to presents further questions what is a menu Is it a procedure or data Do menus run
107. ode step fwd right then do x X xstep Y y ystep xtemp ystep pE rotate_clockwise ystep xstep rotate clockwise xstep xtemp rotate clockwise x x xstep y y ystep end if x lt prev x then substr raw gt font vector counter pos 2 ll rb else if x prev x then substr raw font vector counter pos 2 00 b else substr raw gt font vector counter pos 2 l b if y lt prev y then substr raw gt font vector counter pos 2 2 ll b 181 PP e end else if y prev y then substr raw font vector else substr raw gt font vector pos if pos pos 4 gt 16 then do counter pos 1l end prev x prev y if x gt if x lt if y if y end counter 1 then then then then high x low_x high y low y Hg K lt counter pos 2 2 counter pos 2 2 00 b Ql b uod incr position within string if past end of string then incr counter to next string set position l in next string 182 1 u nardy edge summary5 pll 03 34 13 Thursday April 28 1983 summary5 procedure low x high x low y high y index length serial num declare ioa e
108. oe cue m e m m n cm m nc n e e L M e exit call erase menu planes menu ptr call hes terminate menu ptr call tmr map param l end 150 a n ar draw item procedure instance norm inv menu ptr include menu dcl include menu item dcl declare grinSrectv entry fix fix fix fix bit 16 fix grin text entry fix fix bit 16 char 1224 vary instance pointer xl yl x2 y2 fix 15 i x y fix 15 right_margin fix 15 bottom_margin fix 15 off fix 15 init 0 on fix 15 init 1 fix15 fix 15 based text_mode bit 16 norm inv bit l normal 0 b inverse 1 b ascii array 1 1 char 1l based ret char 1 one_char char 1 ascii_num fix 7 defined one char J e e che ce kkk kk k k ce cde kk k kk de e oe k e ce k k de de che e e de k k che de k kk kk k k cede ce e k k cde k kkk kkk kk kk ek Ni 7 7 first do the box xl menu ptr gt menu seg item port x abs instance item x menu ptr menu seg item port x ext yl menu
109. one char ret then do x menu _ptr gt menu_seg title port x abs menu _ptr gt menu_ seg title _port x eh y Y menu ptr gt menu seg title port h ch end zi d w else do if x menu ptr menu seg title port w ch right margin then if y gt bottom margin then do call grin text x y text mode one char x X menu ptr gt menu seg title port w ch end end end 155 L gt u gt nardy gt use gt erase title pll 02 30 32 Thursday April 28 1985 erase title procedure menu ptr include menu dcl declare grin rectv Xl yl x2 y2 off on entry fix fix fix fix bit 16 fix fix 15 fix 15 init 0 fix 15 init 1 KKR hok ck e ee che e e kk he RRA e e ek e e e ke e e e e e he e kde ee e ke e e e ke e ek e de e e de e de eJ xl menu ptr gt menu seg title port x abs yl menu ptr menu seg title port y abs x2 xl menu ptr gt menu seg title port x ext 2 y2 yl menu ptr menu seg title port y ext 2 call grin rectv xl yl x2 y2 menu ptr menu seg title port planes off 156 a mo ae a m a __ n r O ee a e e o a 1 gt u gt nardy gt use gt draw prompt pll 42 3
110. ont vector index 1 bit str fixnum high x raw gt font vector index 2 bit str fixnum high y B raw font vector index 3 bit str 185 r m E n e 3 gt u gt nardy gt edge gt review pll xstep x l xstep y b ystep x O ystep y 1 bit x raw gt font vector index 4 alias for code x bit y raw gt font vector index 5 alias for code y now refigure starting point wrt baseline and leftline code x code x left line code y code y raw gt font base line raw gt font vector index 4 bit x raw gt font vector index 5 bit y prev code x code x prev code y code y index index 6 pos 1 flx code x fly code y first Elx flx first fly fly cur x 7 code x cur y code y last x code x last y code y do wnile substr raw font vector index pos 4 1 10 b if substr raw font vector index pos 4 00 9 b then do cur x first flx cur y first fly call grin linev last x left line last y raw gt font base line cur x left line cur y raw font base line planes910 on index index 1 pos l bit x raw gt font vector index alias for code x bit_y raw font
111. oom to 1 4 image at 2 times scale 1 16 at 4 and 1 64 at 8 Other buffers allow zooming to all integral values between l and 8 and still others allow continuous zooming from 1 9 to 8 9 and beyond The zoom capacity allows closer inspection of the image and can also allow greater precision in mapping tablet locations to the buffer locations both desirable capabilities 17 2 1 3 3 The Grinnell extracts a price for this facility however The cursor is not stored in the frame buffer but is added to the rgb signal after scanning buffer memory The cursor therefore does not alter any part of the stored image but is displayed via hardwired circuits that do not adjust the position or size of the cursor to account for zoom The map package described in section 2 2 corrects the cursor position so it is in register with the zoomed pixel it points at 2 1 3 4 Another consideration is that when zoom scale is greater than l some or even all of the port into which the world window and tablet port are mapped may fall outside of the displayed section of the buffer 2 1 3 5 A final consideration is that it may be desirable or convenient to have alternate ways to to specify which part of the buffer to zoom to Three different ways would probably handle all needs l specify scale and point to be at origin of screen when buffer is displayed 2 specify scale and point to be in center of screen when buffer is displayed 18 3 spec
112. opy board on post polaroid copy board and post in horizontal position 62 4 2 1 2 The final element is a Visual Graphics Corporation Typositor type font a filmstrip about 2 inches wide and 19 feet in length which carries negative images of a whole font of characters with very precisely aligned baselines The quality of the film negative font images fonts on the Visual Graphics Typositor is such that a single character can fill the screen with no appreciable loss of quality 4 2 1 3 The film is held at right angles to the camera lens in a track on the platform so there is no keystoning and the two screw adjustments at either end of the platform make it possible to align horizontal letterstrokes with raster lines of the camera A white field about two inches behind the film illuminated with a 15 watt bulb provides sufficiently even back lighting 4 2 2 Setup to digitize a font 4 2 2 1 Thread the typositor film through the plastic tracks on the platform Turn on the vidicon camera with AGC automatic gain control off Turn on the 15 watt bulb to backlight the typositor strip 63 4 2 2 2 At the computer terminal type tmrq cr clear core memory cwd gt u gt type cr get in the right directory contour cr run the capture program 4 2 2 3 The program will ask for name of font file source of font VGC typositor font code number today s date 4 2 2 4 Type in a character string for each answer
113. prints each label as is not used in this menu not used in this menu color of lettering and boxes legal overlay colors black red blue green cyan yellow magenta white choice pop up default or continuous 141 APPENDIX IV Source code for use package 142 iii n K eee mm 1 gt u gt nardy gt use gt use bind 02 18 10 Thursday April 28 1983 e um ee a me e re ee ae ee ee ee rm www ud ma use menu manager calls all other procedures menu manager contains use entry So So e menu manager 4 draw item erase item draw title erase title draw prompt erase prompt draw menu erase menu erase menu planes kill all living things kill menu list restore menu before dollar match finder init menu 143 e eos mm e 1 2u gt nardy gt menu gt menu dcl incl pll 02 53 49 Thursday April 28 1983 declare menu_ptr pointer l menu seg based menu ptr 2 leaf pre
114. ptr parts fix 15 char count fix 15 garbage var fix 15 1 j fix 15 comment bit 1 init 0 b yes bit 1 init 1 b no bit 4 init b error bit 1 answer char 1 ORIO ORIO OOOO OIR RRA ARA prev end ptr addr garbage var do i 1 to char count if substr text gt ascii string i 1 then comment yes else if substr text ascii string i 1 then comment no N if comment then if substr text gt ascii string i 2 then do do j 1 to parts if substr text gt ascii string i length key gt k j1 key gt k j then do start gt s j i length key gt k 3 eng ptr addr finish gt f 5 end end prev end ptr gt fixl5 i 1 114 _ _ _ _ prev end ptr enc ptr end end end ptr gt fixl5 char count error 9 b do i 1 to parts if start gt s i gt 9 then do call ioa start i finish i start gt s i finish gt f i call ioan a key gt k i call ioan a substr text gt ascii string start s i finish f i start gt s il 1 call askn is this part identified ok y n answer if answer n then error 1 b end end end 115
115. r select option file list initiate terminate draw draw chrs headers list header information modify change header information append add glyphs to chr file write write with chr font chr file select option 1 dir list chr directory init old initiate existing chr file init new create initiate chr file term terminate chr file chr draw select option one draw one chr all draw all chrs chr headers select option file list chr file header chr list chr header information chr mod select option name change name of chr set source change source of chr set date change date base change baseline x hgt change x height cap change cap height max hwd change max hgt width depth last nbr change number of last chr stats compute max hgt width depth PORTS 140 a ue eo am am an or ao ao am ou ao am am ae ao aD ae ae ae ae ao am a am D am am am oo ue GR on A an ao am we an ee ao o o 5 gt u gt nardy gt profile gt typ4 menu x y w h chx chy chw chh outl planes ground 512 488 S g 001 menu 16 16 480 224 g 9901 item Q S 80 24 7 5 9 12 1 001 title 16 448 488 32 16 1 18 24 Q 001 prompt 16 256 489 192 158 9 l6 g 9901 chx chy is the starting location of type wrt its port ergo 150 OPTIONS leaf prefix plane 8 plane 9 plane 19 mode yes black black black pop up if yes puts a before each leaf label if no
116. r fix 31 dir name char 168 vary param_ptr pointer syscode fix 31 Oops condition CORI de RR RRA ek e e e e RR eek e e e ek Syscode manager procedure string declare com error entry options variable string char 64 vary call com error syscode load parameters string signal oops end cn oops begin goto exit end unspec param ptr 000b0000 b4 call scs get_wdir dir name call hcsSappend seg dir name map param l syscode if syscode 14 then dc if syscode 0 then call syscode manager making map param 61 end call hcs initiate w options dir name map param O1 map param 01 l b param ptr syscode if syscode then call syscode manager initiating map param 01 exit enc 80 um o A do rt e at setup procedure include p dcl declare load parameters entry Sframe org entry fix 15 fix 15 fix 15 RED KK KE KK Ek IO Ae e e RIO II AIAR IR kk RI III ITOK II KKK Ck stuff procedure x origin y origin x extent y extent a ptr decla a ptr a ptr a ptr a ptr end re x origin float 23 y origin float 23 x extent float 23 y extent float 23 a ptr pointer la based a ptr 2 xorg float 23 2 yorg float 23 2 xext float 23 2 yext float 23 gt a xorg x origin gt a yorg y origin gt a xext x ex
117. r gt ascii array i enc S string to fix procedure returns fix 15 note tried pll built in but it didn t work very well declare fixvar fix 15 fixvar 9 do while ch amp ch if ch then fixvar 10 fixvar else if ch 1 then fixvar 10 fixvar 1 else if ch 2 then fixvar 10 fixvar 2 else if ch 3 then fixvar 10 fixvar 3 else if ch 4 then fixvar 10 fixvar 4 else if ch 5 then fixvar 10 fixvar 5 else if ch 6 then fixvar 19 fixvar 6 else if ch 7 then fixvar 10 fixvar 7 else if ch 8 then fixvar 10 fixvar 8 else if ch 9 then fixvar 10 fixvar 9 call next char 118 C mm a m me am am aam a mn aa A e M r V Pus wu A w AA M wes o uA au m me A am e am a an c m ee ee a e A 4 a oe 2 gt u gt nardy gt menu gt port_maker pll end do while ch ch call next char end return fixvar end BRR KKK he e ke e e he e e e e he he kk he e ke ke e ke he he hk Sk e kk e ke ke ke e e ke ke e ek e e KKK string to bit procedure returns bit 8 tried pll built in but it didn t work very well declare k fix 15 bitvar bit 16 bitvar 0000 b4 do k 8 to 6 by 1 if ch 1 then substr bitvar k 1 l b call next char end i return bitvar end IAA KKK R
118. rd declare next byte byte received reset nbbr all ones all zeros garbage byte first byte check byte raw data 1 5 tab addr i wait duration far field xbits ybits zbits Sixteen ones J ROC ke e e e e e de e e e e e e e call ss tab addr if check byte 94 X 0 y 0 return end do check byte all do first byte call wd far field fix 15 entry bit 16 entry fix 15 fix 15 fix 15 entry bit 16 bit 8 entry bit 16 bit 8 entry bit 16 bit 8 i o ports currently invert data from to the tablet so active state of bits is 0 b bit 8 aligned init B1191119 b next byte set bit 8 aligned init 191011109 b byte rec d set bit 8 aligned init 11101110 b nb amp br reset bit 8 aligned init 11111111 b bit 8 aligned init 00000000 b bit 8 bit 8 bit 8 bit 8 holds data before conversion to fix 15 bit 16 init 00aa b4 address of tablet port fix 15 index for raw data 2 5 loop fix 15 index for wait loop fix 15 init 45 duration of wait loop fix 15 if gt 599 cursor is in far field bit 16 defined x bit 16 defined y bit 16 defined z bit 16 init ffff b4 Fe He e ke e e e e he e de e e e e kk e e hee e e e e e ke e e e e ke e ke ke e e e e e e e e S check byte b4 then do zbits fe b4 ones while substr check byte 1 1 0 b all ones while substr first byte
119. rection Default parameters set by mapSsetup are 76 600 2000 1500 2 2 2 5 map x port This function and associated arguments are declared and used as follows declare map x port entry float 23 returns fix 15 window x float 23 port x fix 15 port x map x port window x This function transforms points in world space to buffer space It does not check clamp or clip So a point which is not inside the window will transform into a point which is not inside the port 24 2 2 2 6 map y port This function and associated arguments are declared and used as follows declare map y port entry float 23 a returns fix 15 window y float 23 port y fix 15 port y map y port window y This function transforms points in world space to buffer space It does not check clamp or clip So a point which is not inside the window will transform into a point which is not inside the port 2 2 2 7 map sfp This procedure and associated arguments are declared as follows declare maps fp entry fix 15 fix 15 float 23 float 23 fix 15 port x fix 15 port y fix 15 fp x float 23 fp y float 23 Z fix 15 call map fp port x port y fp x fp y 2 This procedure interrogates the tablet and maps the resulting tablet coordinates into the user window port x port y and screen port fp x fp y Under default conditions cursor number one is displayed at port x port y Cursor
120. rompt is as follows match string lt cr gt This is whatever expanded prompt is wanted It may use as many lines as necessary The match string should be on a line by itself No quotation marks are necessary in the above example everything that follows the first carriage return cr is the full text of the prompt and in the file is flush left not indented 3 2 3 3 Currently you need to include at least one prompt in this section whether you really need it or not This is an inconvenience that will be fixed 43 3 2 4 Ports 3 2 4 1 The characters that flag the start of this section are PORTS no quotation marks at the beginning of a line 3 2 4 2 The programmer specifies the visual format numerically by describing the dimensions of different parts of the menu Specification syntax is keyword followed by l parameters separated by blanks or tabs all on a single line The parts of the menu or ports are as follows 3 2 4 3 Keyword ground this port contains the whole menu X origin relative to screen origin y origin relative to screen origin width in pixels height in pixels x char pos not relevant put dummy parameter here y char pos not relevant put dummy parameter here char width not relevant put dummy parameter here char height not relevant put dummy parameter here outline width width in pixels of the box outline planes 8919 3 character string xxx where x is Y if plane is not
121. s used note that use calls map 49 address reference name unavailable to user unavailable to user ioa iocs rl scs stty grin math use the menu manager program map io util com err user application procedure user data segment map param l menu tree data structure unavailable to user linkage and storage for based storage for automatic variables th 0D Q0 0 v 0 310 um E RM KA GS The use package terminates each procedure on the menu tree after that particular program has returned However it is the user s responsibility to terminate procedures that are called by procedures on the menu tree 3 3 3 Communication between programs It is very common that programs will need to share data or need a global variable The menu tree works against this to some extent because it calls separate programs without passing arguments However data can be shared in this manner place all data in a based pll structure initiate 50 this segment whose base address is the pointer that addresses the structure The MagicSix pll operating environment has a procedure designed expressly for this purpose It is hcs initiate with options and allows a segment to be explicity assigned to any one of the core addresses in the above schedule 51 3 4 FURTHER WORK 3 4 1 Improved error handling The menu program would be a far more useful tool if it flagged syntax errors rather than just blew up when it enco
122. sented and developed according to the following plan 1 1 3 1 Problem description The presentation of each software tool begins with the description of a problem of interest to graphic designer programmers I explain why this is a significant problem what are the constituent parts of the problem and what are the current ways of treating it both in software and hardware I discuss the general concepts formulas and algorithms involved in the solution and compare and contrast my solution with alternative methods 1 1 3 2 Program documentation A working implementation of the software tool is documented A users manual is presented for a package of pl l programs on the MagicSix operating system at the Visible Language Workshop Complete debugged pl l source code listings are included in the appendix 1 1 3 3 Evaluation and further work I discuss the currently implemented programs with respect to completeness robustness consistency and other observed weaknesses and strengths I discuss ways of increasing speed of execution and reducing storage since space and time are always at a premium In addition I suggest ways of making the code more more machine system and language independent This makes the packages easier to fix and maintain accomodates growth and change and makes it easier to move the packages to other computers 1 1 4 Computing environment 1 1 4 1 Hardware At the outset a general overview of the System
123. t iii create menu seg procedure dir name menu file menu ptr declare ioa entry options variable com error entry options variable hes append seg entry char 168 vary char 32 vary fix 31 hcsfinitiate w options entry char 168 vary char 32 vary char 32 vary bit 1 pointer rix 31 dir_name char 168 vary menu_file char 32 vary menu_ptr pointer syscode fix 31 oops condition syscode manager procedure string declare string char 64 vary call com error syscode create menu seg string Signal oops end on oops begin gcto exit end call hcs append seg dir name menu file syscode if syscode 14 then do if syscode then call syscode manager making menu file else call ioa new menu file a added to directory a menu file dir name end else call ioa menu file a already exists you are bashing it menu file call hcs initiate w options dir name menu file menu file l b menu ptr syscode if syscode lt then call syscode manager initiating menu file else call ioa gt menu file a has been initiated at address p menu file menu ptr exit end 112 l gt u gt nardy gt menu gt init text seg pll 14 45 46 Tuesday April 26 1983 e me we cee
124. t maker Sport maker trec maker soption maker port writer Sprompt list writer Stree writer Sfigure xy parts start s 1 5 finish f 1 5 key k 1 5 num args arg type arg_length arg ptr arg string dir name entry name menu name garbage name 108 m 14 37 52 Tuesday April 26 1983 a r char l vary entry options variable entry options variable entry fix 15 entry fix 15 bit 16 fix 15 pointer entry char 168 vary char 168 vary char 32 vary fix 31 entry pointer entry char 168 vary char 32 vary pointer tix 15 entry char 168 vary char 32 vary pointer entry ptr ptr ptr ptr fix 15 fix 15 bit 1 entry pointer pointer pointer fix 15 fix 15 entry pointer pointer fix 15 fix 15 entry pointer pointer pointer fix 15 fix 15 entry pointer pointer fix 15 fix 15 entry pointer entry pointer entry pointer entry fix 15 fix 15 pointer pointer fix 15 init 4 pointer fixed 15 based start pointer fixed 15 based finish pointer char 16 vary based key fix 15 bit 16 fix 15 pointer
125. t y xorg p gt q tab yorg p gt q tab xorg yorg call grin vis p q cur vis call grin pos p gt q cur_nbr port x p gt q buf xorg port y p gt q buf yorg end do call grin vis port x 0 else 2000 b4 p gt q tab xext p gt q tab yext p gt q tab xext p gt q tab yext p gt q scale p gt q p gt q scale p gt q p gt q win p q win p gt q prt p gt q prt xoffset yoffset xext yext xext yext 99 P M M mi um _ e m port y fp x 0 0 fp y 0 0 end end 100 ooo 1 gt u gt nardy gt map gt raw_xyz pll 03 23 58 Thursday April 28 1985 raw xyz procedure x y 2 include p dcl declare ss entry bit 16 bit 8 Swd entry bit 16 bit 8
126. tent gt a yext y extent BRR kk kk kk e khe kk kk e khoe IR ek ek e ke ke ee e eek ek ek eek eek ke He e e e ex call load parameters unspec p 6000b0000 b4 call stuff 0 0 0 0 512 0 512 0 addr p gt q Uwin call stuff 77 6 601 0 2048 0 1536 0 addr p gt q Utab call stuff 40 0 0 0 512 0 512 0 addr p gt q Uprt call stuff 0 9 0 0 512 0 512 0 addr p gt q scr call stuff 0 0 0 0 512 0 512 0 addr p gt q buf p q scale l p gt q cur nbr 1 p q cur vis V001 b4 call frame org 0 1 end 81 e 1 gt u gt nardy gt map gt cursor pll 02 55 26 Thursday April 28 1983 cursor procedure nbr x y include p dcl declare x y nbr fix 15 grin vis entry bit 16 grin pos entry fix 15 fix 15 fix 15 call grin vis p gt q cur vis call grin pos p gt q cur nbr x p gt q buf xorg p gt q scale p gt q xoffset y p gt q buf yorg p gt q scale p gt a yoffset end 82 e id g e e n r nn
127. tions However he anticipated the role of a growing number of graphic designers who need to express their methodology as computer code 1 1 2 Presummary This thesis describes three packages of programs of interest to the graphic designers 1 a tool for communicating with the computer by pointing 2 a tool for organizing sets of programs into interactive menus and 3 a tool for digitizing type fonts 1 1 2 1 The graphic designer at the computer uses at least three different spaces the space of the page he is designing the device space of the display monitor and the device space of the graphics tablet The first tool figures the transformations necessary to map one space into another This allows the user to point at a location on the tablet and thereby identify corresponding points on the screen and in the user defined space 1 1 2 2 Interactive page layout requires the orchestration Of large numbers of separate procedures Choosing between these procedures can be made easier for the user if he is presented with a menu of options when a decision is required The second tool is a package of programs to help the programmer create and manage simple or complex menus 1 1 2 3 Simulating type on a monitor requires digitized fonts The third tool is a package of programs which extracts the edge of a letterform image in the frame buffer and stores it as a chain code 1 1 3 Method of explication Each software tool is pre
128. ulate abs for items x menu ptr gt menu seg ground port x rel menu ptr menu seg ground port y rel menu ptr gt menu seg item port x abs menu ptr gt menu seg ground port x abs menu ptr menu seg menu port x rel menu ptr menv seg item port y abs menu ptr gt menu seg ground port y abs menu ptr gt menu seg menu port y rel menu ptr menu seg menu port x abs menu ptr gt menu seg ground port x abs menu ptr gt menu seg menu port x rel menu ptr gt menu seg menu port y abs menu ptr gt menu seg ground port y abs menu ptr gt menu seg menu port y rel menu ptr menu seg title port x abs menu ptr menu seg ground port x abs menu ptr gt menu seg title port x rel menu ptr gt menu seg title port y abs menu ptr gt menu seg ground port y abs menu ptr gt menu seg title port y rel menu ptr gt menu seg prompt port x abs menu ptr gt menu seg ground port x abs menu ptr gt menu seg prompt port x rel menu ptr gt menu seg prompt port y abs menu ptr gt menu seg ground port y abs menu ptr gt menu seg prompt port y rel calculate txtmode for ports txtmode is not used for ground port or menu port menu ptr gt ground port txtmode llll b4 menu ptr gt menu port txtmode 1111 b4 menu ptr item port txtmode 0060 b4 ir menu ptr item port w ch gt 15 then substr menu ptr gt item port txtmode 6 1 l b 1f menu ptr item port h ch gt
129. untered them Perhaps a separate program that previewed the text file for proper form before it was handed to the menu program would be the best way to accomplish thsi at this point At any rate the menu syntax is simple enough at this rate so that finding mistakes has been a simple matter 3 4 2 More general menu formats In this first version menus build up from the lower left hand corner of the screen It would be interesting to see if menus would work better if they built from top to bottom as well as bottom to top and from right to left as well as left to to right Perhaps ultimately menus could be freed from being straight lists and arrays they might simply be linked lists of arbitrarily placed boxes on the screen 52 3 4 3 Dynamic menus This area still has a lot of interesting work yet to be done The menu tree would be far more useful if it were a dynamic structure which changed as the user used it It would permit changing the visual format of the menu while it was being used menus that called other menus display and generation of data as well as the pre programmed calling of programs 53 4 TYPE DIGITIZATION 54 4 1 THE IDEAS 4 1 1 Type digitization techniques 4 1 1 1 Turning a visual letterform into numbers can be done in a number of different ways Bit maps record the light dark values at a two dimensional array of locations in a rectangle which encloses a type form The light dark values may be sing
130. used l if used 44 3 2 4 4 Keyword menu this port contains all the menu item boxes x origin relative to ground origin y origin relative to ground origin width in pixels height in pixels x char pos not relevant put dummy parameter here y char pos not relevant put dummy parameter here char width not relevant put dummy parameter here char height not relevant put dummy parameter here outline width width in pixels of the box outline planes 8919 3 character string xxx where x is if plane is not used 1 if used 3 2 4 5 Keyword item these ports contain the menu labels x origin not relevant put dummy parameter here y origin not relevant put dummy parameter here x origin and y origin are taken to be 9 width in pixels height in pixels x char pos first char relative to title origin y char pos first char relative to title origin char width character spacing in pixels char height linespacing in pixels outline width width in pixels of the box outline planes 8918 3 character string xxx where x is Y if plane is not used 1 if used 3 2 4 6 Keyword title this port contains the label of item which is currently selected x origin relative to ground origin y origin relative to ground origin width in pixels height in pixels x char pos first char relative to title origin y char pos first char relative to title origin char width character spacing in pixels char height linespacing
131. vector index 1 alias for code y refigure starting point wrt baseline and leftline code x code x left line code y code y raw gt font base line raw font vector index bit x raw gt font vector index 1 bit y index index 2 first flx first flx code x prev code x xstep x 186 a gt u gt nardy gt edge gt review pll first fly first fly code x prev code x xstep y first flx first flx code y prev code y ystep x first fly first fly code y prev code y ystep y prev code x code x prev code y code y flx first flx fly first fly cur x first 1x cur y first fly end else do if substr raw gt font vector index pos 2 l b then do flx flx xstep x fly fly xstep y end else if substr raw gt font vector index pos 2 ll b then do flx flx xstep x fly fly xstep y end if substr raw gt font vector index pos 2 2 01 b then do flx flx ystep x fly fly ystep y end else if substr raw gt font vector index pos 2 2 ll b then do flx flx ystep x fly fly ystep y end cur x flx cur y fly call grin linev last x left line last y raw gt font base line cur x left line cur y raw gt font base line planes919 on pos pos 4 gt if pos gt 16 then do index index 1 pos 1 end end i last x cur x last y cur y
132. visibility and number one through four 25 can be controlled by calling map cursor procedures Z takes on the following values 1 puck is not on tablet y puck is on tablet no buttons are pressed 1 puck is on tablet z button is pressed yellow 2 puck is on tablet button 1 is pressed white 4 puck is on tablet button 2 is pressed blue 8 puck is on tablet button 3 is pressed green 5 combination of buttons is being pressed 2 2 2 8 mapSint This procedure and associated arguments are declared as follows declare mapSint entry fix 15 fix 15 fix 15 fix 15 port x fix 15 port y fix 15 int x fix 15 int y fix 15 call map int port x port y int x int y This procedure works analogously to mapSint int x and int y are derived by mapping the tablet location to the window and truncating the floating point values to integers port x and port y and consequently the cursor position are derived by mapping the integer window values to the port This is useful among other things for grid gravity or centering cursor on menu choices 26 2 2 2 9 maps trame org This procedure and associated arguments are declared as follows declare frame org entry fix 15 fix 15 fix 15 X origin fix 15 y origin fix 15 scale fix 15 call map frame org x origin y origin scale This procedure controls which part of the frame buffer is displayed x origin y origin is the the pixel displayed in th
133. xt call ioa x ch i port ptr gt port x ch call ioa y ch i port ptr gt port y ch call ioa w ch i port ptr gt port w ch call ioa h ch ji port ptr gt port h ch call ioa outline i port ptr gt port outline call ioa txtmode h port ptr gt port txtmode call ica planes h port ptr gt port planes end call one port ground addr menu ptr gt menu seg ground port call one port menu addr menu ptr gt menu seg menu port call one port item addr menu ptr menu seg item port call one port title addr menu ptr gt menu seg title port call one port prompt addr menu ptr gt menu seg prompt port end 134 me qu nn roc conca r m tree writer procedure to include menu item dcl declare ioa ioan entry options variable auxiliary pointer i fix 15 str len fix 15 fix15 fix 15 based ascii array 1 1 char 1 based call ioa call ioa Litem p item left gt p to to gt item left call ioa item right gt p item right gt m first item gt p item right item right m first item call ioa ry i x i to gt item y to gt item x call ioan LABEL r str len to gt item label gt fix15 do i 3 to str len 2 call ioan a to gt item lab
134. xt non space tab ch amp 3 options ent ptr null don t work on rest of line what follows is program name string i rwise ch or or prompt string ptr null then do i then do delete leading space tabs call next char do while ch space ch tab call next char end first legal i do quit no while quit no call next char if ch ret then quit yes else if ch then quit yes else if ch space then quit yes else if ch tab then quit yes end last legal i 1 call save string content ptr end do get and save prompt string you already have taken care of leading space tabs and you can include trailing ones but your first char is or or and you don t want to include it first legal i do quit no while quit no call next char if ch ret then quit yes else if ch then quit yes else if ch then quit yes else if ch then quit yes else if ch then quit yes end e o emo a a a an ae M X AA an ue am A am e uu A wee Qus mus mum ue aim m EP um um CUR oe MP cub Ges wi um Uum URP UD us we an cum UD om an ae am URS oo a ue um am am en a ms last legal i if ch then call match and save content ptr else do N first legal first legal 1 last legal i 1 call save string content ptr end 7 N end end arrive here with menu level label ptr conte
135. y then do if buf loy Uprt hiy then prt ext else prt hiy Uprt hiy end else prt hiy buf hiy 4 a a 89 o_o if buf lox Uprt lox then do if buf hix Uprt lox then prt ext 0 9 else prt lox Uprt lox e end gt else prt lox buf lox if buf loy lt Uprt loy then do if buf hiy Uprt loy then prt ext else prt loy Uprt loy end S else prt loy buf loy li a Q convert lo hi to org ext and assign new values to structure if prt ext 0 0 then d p q prt xext p q prt yext end else do if p gt q Uprt xext then do p gt q prt xorg prt_hix p gt q prt xext prt lox prt hix 1 0 end else do p q prt xorg p gt q prt xext end if p gt q Uprt yext then do p gt q prt yorg prt hiy p gt q prt yext prt loy prt hiy 1 0 end else do p q prt yorg p qd prt yext end o 0 60 0 0 prt lox prt hix prt lox 1 9 prt loy prt hiy prt loy 1 0
136. yext p gt q prt yext p gt q Uprt yext p gt q Uwin yext end proportions for equations buf bufxorq bufxext buf bufxorg bufxext S men ie n M A w M e l gt u gt nardy gt map gt window pll 93 09 04 Thursday April 28 1983 window procedure x origin y origin x extent y extent include p dcl declare recalc entry declare x origin float 23 y origin float 23 x extent float 23 y extent float 23 unspec p 600b0000 Db4 p gt q Uwin xorg p gt q Uwin yora p gt q Uwin xext p gt q Uwin yext x origin y origin x extent y extent ua call recalc end 92 o_o 1 gt u gt nardy gt map gt port pll 3 09 54 Thursday April 28 1983 me i ri port procedure x origin y origin x extent y extent include p dcl declare recalc entry declare x origin fix 15 y origin fix 15 x extent fix 15 y extent fix 15 unspec p 000p0090 b4 p gt q Uprt xorg p q Uprt yorg p q Uprt xext p gt q Uprt yext
137. yph headers file glyph file stats glyphs glyph list modify glyph mod name mod glyph name source mod glyph source date mod glyph date base mod glyph base x hgt mod glyph xhgt cap mod glyph cap max hwd mod glyph max hwd last nbr mod glyph last nbr stats mod glyph stats append appglyph chr chr file chr file 1 dir chr dir init old init old chr init new init new chr term term chr draw chr draw one all headers file chrs modify name source date base x hgt cap max hwd last nbr stats append write chr chr lrn magico PROMPTS level one select option raw raw file operations glyph glyph file operations chr chr file operations lrn list reference names magic any magic six command raw Select option file list initiate terminate draw draw characters ons screen headers list header information modify change header information capture use vidicon to digitize font raw file select option 1 dir list raw directory init initiate raw file term terminate raw file r draw chr all chrs headers chr file stats chr list mod change chr name change chr source change chr date ch
Download Pdf Manuals
Related Search
Related Contents
取扱説明書 Mode d`emploi Primavera Analytics Licensing Information User Manual Release Informação de produto: DSCW610S.CEE8 2200CW user manual Bolens 316.292711 Cultivator User Manual ENET-AP001A-EN-P Instruction Copyright © All rights reserved.
Failed to retrieve file