\input webmac % NASTY.TEX. Designed to catch bugs in Crudetype device driver % Here is TeX material that gets inserted after \input webmac \message{!! For lineprinter, magnify me to 115 percent !!} \def\hang{\hangindent 3em\indent\ignorespaces} \font\ninerm=cmr9 \let\mc=\ninerm % medium caps for names like PASCAL \def\PASCAL{{\mc PASCAL}} \def\pb{$\.|\ldots\.|$} % pascal brackets (|...|) \def\v{\.{\char'174}} % vertical (|) in typewriter font \mathchardef\BA="3224 % double arrow \def\({} % kludge for alphabetizing certain module names \def\title{TANGLE} \def\contentspagenumber{0} \def\topofcontents{\null\vfill \titlefalse % include headline on the contents page \def\rheader{\mainfont Appendix E\hfil \contentspagenumber} \centerline{\titlefont The {\ttitlefont TANGLE} processor} \vskip 15pt \centerline{(Version 2.5)} \vfill} \pageno=\contentspagenumber \advance\pageno by 1 \def\title{TANGLE changes for \AA Vax/VMS} \N199\*. System-dependent \AA changes. Here are the remaining changes to the program that are necessary to make \.{TANGLE} work on Vax/VMS. \fi \M1. \P$\X1:\X\S$\6 $\\{store\_two\_bytes}(\O{150000}+\\{module\_count})$;\C{$\O{150000}=\O{320}% \ast\O{400}$}\par \fi \M200\*. This variable is for speeding up the output routine. \Y\P$\4\X9:Globals in the outer block\X\mathrel{+}\S$\6 \4\\{out\_temp\_buffer}: \37\&{packed} \37\&{array} $[1\to\\{out\_buf\_size}]$ % \1\&{of}\5 \\{char};\2\par \fi \M201\*. On Vax/VMS we need the following special definitions, types, variables and procedures to be able to get the file name from the command line, or to prompt for them. \Y\P\D \37$\\{VAX\_volatile}\S\={volatile}$\par \P\D \37$\\{VAX\_lib\_get\_foreign}\S\={\ lib\$get\_foreign}$\par \P\D \37$\\{VAX\_length}\S\={length\ }$\par \fi \M143. Inputting the next token. As stated above, \.{TANGLE}'s most interesting input procedure is the \\{get\_next} routine that inputs the next token. However, the procedure isn't especially difficult. Another global variable, \\{scanning\_hex}, is \\{true} during the time that the letters \.A through \.F should be treated as if they were digits. \Y\P$\4\X9:Globals in the outer block\X\mathrel{+}\S$\6 \4\\{cur\_module}: \37\\{name\_pointer};\C{name of module just scanned}\6 \4\\{scanning\_hex}: \37\\{boolean};\C{are we scanning a hexadecimal constant?}% \par \fi \M144. \P$\X10:Set initial values\X\mathrel{+}\S$\6 $\\{scanning\_hex}\K\\{false}$;\par \fi \M146. \P$\X146:Go to \\{found} if \|c is a hexadecimal digit, otherwise set $% \\{scanning\_hex}\K\\{false}$\X\S$\6 \&{if} $((\|c\G\.{"0"})\W(\|c\L\.{"9"}))\V((\|c\G\.{"A"})\W(\|c\L\.{"F"}))$ \1% \&{then}\5 \&{goto} \37\\{found}\6 \4\&{else} $\\{scanning\_hex}\K\\{false}$\2\par \U section~145.\fi \def \<{\lbrack} \def \>{\rbrack} \def \nl{\hfill\break} \font\stt=cmtt9 \font\rr=cmr10 \def\cstok#1{\leavevmode\thinspace\hbox{\vrule\vtop{\vbox{\hrule\kern1pt \hbox{\vphantom{\stt/}\thinspace{\stt#1}\thinspace}} \kern1pt\hrule}\vrule}\thinspace} % control sequence token % %\def \boxit#1{\vbox{\hrule\hbox{\vrule\kern3pt % % \vbox{\kern3pt#1\kern3pt}\kern3pt\vrule}\hrule}} % \rr \vskip 0.5in \centerline{EXAM MARKING PROGRAM} 1. When the program types a question mark, it is asking you for input. All input must be terminated by typing the \cstok{RETURN} key. 2. Whenever you do not know what to do next ALWAYS start by typing a question mark, or {\tt H} (stands for HELP) (followed by \cstok{RETURN}). This should give a help message. \vskip 0.5in \centerline{Method of use} \vskip 0.4in Whenever the program types a question mark, it is asking you for input. All input must be terminated by typing the \cstok{RETURN} key. On some terminals this is labelled \cstok{ENTER}, on others it has a bent arrow. You cannot type ahead. You have to type 1 line at a time \& wait for the program to digest it. This line-at-a-time mode of operation is very old fashioned and clumsy, but I did not think it would be practical to attempt anything better with the present combination of a slow VAX, and VMS, and bug-eaten network. \N206\*. Index. \ch 1\*, 2\*, 3\*, 4\*, 7\*, 12\*, 20\*, 21\*, 22\*, 26\*, 27\*, 28\*, 38\*, 97% \*, 179\*, 180\*, 182\*, 187\*, 199\*, 200\*, 201\*, 202\*, 203\*, 204\*, 205% \*, 206\*. \inx \:\.{ Nested named module }, 189. \:\.{\AT!d is ignored in PASCAL text}, 167. \:\.{\AT!f is ignored in PASCAL text}, 167. \:\.{\AT!p is ignored in PASCAL text}, 167. \:\|{a}, \[74], \[87], \[165]. \:\\{abs}, 103, 157. \:\\{accumulator}, \[157], 158, 159. \:\\{add\_in}, \[157], 158. \:\.{Ambiguous prefix}, 69. \:\\{and\_sign}, \[15], 76, 114. \:\\{app}, \[99], 101, 102, 103, 111. \:\\{app\_repl}, \[93], 165, 166, 167, 168, 169. \:\\{app\_val}, \[99], 103, 111. \:{ASCII code}, 11, 72. \:\\{ASCII\_code}, \[11], 13, 27\*, 28\*, 38\*, 50, 65, 94, 95, 100, 126, 139, 141, 165, 198. \:\\{ask}, \[203\*], 205\*. \:\|{b}, \[87], \[97\*], \[165]. \:\.{bad character in input...}, 197. \:\\{bad\_case}, \[107], 109, 110. \:\\{bal}, \[87], 93, \[141], 142, \[165], 166. \:\\{banner}, \[1\*], 182\*. \:\&{begin}, 3\*. \:\\{begin\_comment}, \[72], 76, 121, 139, 147, 196. \:\\{begin\_pascal}, \[139], 156, 158, 167, 175. \:\\{boolean}, 28\*, 29, 124, 127, 143, 179\*, 193, 194, 203\*. \:\\{brace\_level}, \[82], 83, 98, 121, 196. \:\\{cur\_module}, \[143], 151, 167, 175. \:\\{cur\_name}, 78, \[79], 83, 84, 85. \:\\{cur\_repl}, 78, \[79], 80, 83, 84, 85. \:\\{cur\_repl\_text}, \[164], 165, 170, 175, 178. \:\\{cur\_state}, \[79], 84, 85. \:\\{cur\_val}, \[86], 87, 89, 116, 119, 121, 196. \par\vfil\end