|
|
1.1 root 1: !
2: ! This is a GPMDOC6 version of the MACRO SPITBOL Manual for VAX/VMS.
3: ! It is substantially modified translation of the Runoff version
4: ! produced by Dave Shields for the PDP11 Runoff. It produces everything
5: ! including an index, table of contents and a .HLP Help file.
6: !
7: !
8: ! Revision history:
9: ! -----------------
10: !
11: {Set Versionid,BCAB-2132}
12: {Set Revid,G}
13: !
14: ! Rev. G: 17-APR-1982 [SGD]:
15: ! o Add description of CHAR (new function).
16: ! o Clarify &ABEND and &DUMP (above 2) descriptions.
17: !
18: ! Rev. F: 11-MAR-1982 [SGD]:
19: ! o Changes to reflect new stack handling procedure
20: ! o Changes to reflect BUFFER type
21: ! o Miscellaneous edits to formats, eliminated some section headings that
22: ! caused excessive help nesting.
23: !
24: ! Rev. E: 25-FEB-1982 [SGD]:
25: ! o Enhanced description of &CODE
26: !
27: ! Rev. D: 08-AUG-1981 [SGD]:
28: ! o Fixed description of /LIST /NOLIST /OUTPUT and /NOOUTPUT to
29: ! conform to new semantics. LOADSTACK message removed as no longer
30: ! in existance. /CRC and /NOCRC documented.
31: !
32: ! Rev. C: 30-JUL-1981 [SGD]:
33: ! o Changed description of recommended link to reflect ABAA-4521 patch
34: ! which avoids need for /NOTRACE.
35: !
36: ! Rev. B: 19-JUL-1981 [SGD]:
37: ! o Fixed manual to reflect that delivery no longer includes SPITBOL image.
38: ! This image is built during delivery.
39: ! o Added {Revid} macro to provide manual revision level.
40: !
41: ! Definitions and Macros:
42: ! -----------------------
43: !
44: ! Define the names of the files involved.
45: !
46: {Set Textfile,SYS$LIBRARY:Spittext.Gpm}
47: {Set Outfile,Spitbol.Man}
48: {Set Helpfile,SYS$HELP:Spitbol.Hlp}
49: !
50: ! These macros will generate roman numerals ({Roman n}) from 0..99.
51: !
52: {Setq Roman,{Cond {Gt @1,10},{Genroman {/ @1,10},x,l,c}}-
53: {Genroman {Remdr @1,10},i,v,x}-
54: }
55: {Setq Genroman,{Cond -
56: {Le @1,3},{Dupl @2,@1},-
57: {Eq @1,4},{2}{3},-
58: {Le @1,8},{3}{Dupl @2,{- @1,5}},-
59: ,{2}{4}-
60: }}
61: !
62: ! We skip generating the manual if it isn't wanted.
63: !
64: {Cond {Leq N,{Substr {Caps {Query Do you want to generate the manual? }},-
65: 1,1}},-
66: {Tset input,,Begintext=!MANDONE,Endtext=!HELPSTART}}
67: {Set output,@Outfile}
68: !
69: !
70: ! Define the sections as numbers (in the help pass we will define them
71: ! as names)
72: !
73: {Set Sec_Func,Section 5}
74: {Set Sec_Impl,Section 12}
75: !
76: ! The Hl macro substitutes for the "Header Level" business of Runoff.
77: ! HL is given status as a property and the level <-> value associations
78: ! are stuffed there. Hlval is the current level number. Hlid is set to
79: ! the current level string (n.m form).
80: !
81: ! The number,title and page is entered on the TOC1 stack for the table of
82: ! content printing at the end. A level of 1 forces a new page with a
83: ! spiffy title block. Level 2 stuff is nicely underlined.
84: ! Lower level stuff is left to troglodytes.
85: !
86: {Creprop HL}
87: {Setq Hlval,0}
88: {Setq Hl,-
89: {Brk}-
90: {Cond {Gt @1,@Hlval},{Set {1}\HL,0}}-
91: {Set Hlval,@1}-
92: {Set.Add1 {1}\HL}-
93: {Set Hlid,-
94: {Doprop HL,-
95: {Cond {Le @1,@Hlval},{2}{Cond {Lt @1,@Hlval},.}},-
96: UP}-
97: }-
98: {Cond {Gt @Linenum,50},{p},,{Ls 2}}-
99: {Cond {Eq @1,1},-
100: {Center *------{Dupl -,{Dsize 2}}-*}-
101: {Center |~{Dbl {Rpad [{Hlid}],5}{2}}~|}-
102: {Center *------{Dupl -,{Dsize 2}}-*}-
103: {Tset Toc1,~},-
104: {Eq @1,2},-
105: {Outdent 3}{Ul {Dbl {Hlid}~~{2}}}{Brk},-
106: ,-
107: {Outdent 3}{Dbl {Hlid}~~{2}}{Brk}-
108: }-
109: {Tset Toc1,-
110: {Rpad -
111: {Rpad -
112: {Hlid},-
113: {+ 7,{* 2,@1}}-
114: }~{Cond {Eq @1,1},{Dbl @2},,@2},-
115: 64}-
116: {Pagenum}-
117: }-
118: }
119: !
120: ! These list macros are used to generate numbered lists. Some of the
121: ! Listelem references in the text may contain an argument to {Listelem},
122: ! any such argument is ignored by this version of the Listelem macro, but
123: ! it is used by a redefined version when producing the Help file (see below).
124: !
125: {Setq List,{Brk}{Lin 5}{Ls 1}-
126: {Set Listval,0}}
127: {Setq Listelem,{Ls 1}{Outdent 5}{Lpad {Setv.Add1 Listval}.~~,5}}
128: {Setq Endlist,{Ls 1}{Restore Lmg}}
129: !
130: ! The index macros do their business on the INDEX property tables
131: !
132: {Creprop INDEX}
133: {Setq Index,-
134: {Set.append {D 1}\INDEX,<, >{Pagenum}}-
135: }
136: !
137: ! Here we begin production of the actual manual
138: !
139: ! Produce the Title Page
140: !
141: {set bslack,3}
142: {Set lmg,5}{set rmg,70}
143: {set pagelength,60}
144: {setq newpage,{Ls 3}}
145: {Set Linenum,5}{Center *~~~~~~*~~~~~~*}
146: {Ls 5}{Center {Dbl M A C R O S P I T B O L}}
147: {Ls 1}{Center -------------------------}
148: {Ls 3}{Center PROGRAM REFERENCE MANUAL (Rev. {Revid})}
149: {LS 1}{CENTER --------------------------------{Dupl -,{Dsize Revid}}}
150: {Ls 3}{Center VAX/VMS Version 3.5 ({Versionid})}
151: {LS 1}{Center ----------------------{Dupl -,{Dsize Versionid}}}
152: {LS 2}{April 1980}
153: {Ls 3}{Tset Lmg,19}{Tset Rmg,55}{fj}
154: Copyright (c) 1980 by DEWAR INFORMATION SYSTEMS CORPORATION.
155: This manual may be reporduced provided that this
156: Dewar Information Systems Copyright Notice is
157: incorporated.
158: {Ls 3}VAX, VMS, DECwriter and PDP are registered trademarks
159: of the Digital Equipment Corporation.
160: {Set Linenum,50}{Restore Lmg}{Restore Rmg}{Nfj}
161: {Center DEWAR INFORMATION SYSTEMS CORPORATION}
162: {Center 221 West Lake Street}
163: {Center <Oak Park, Illinois USA 60302>}
164: {Ls 1}{Center (312) 524-1644}
165: {p}
166: {Set Linenum,30}
167: {Center {Dbl Please replace this page with the Table of Contents}}
168: {Center {Dbl (At the end)}}
169: {p}
170: !
171: ! Produce the preamble
172: !
173: {Fj}
174: This report is parallel to the University of Leeds Technical Report
175: Number 94, "Macro Spitbol - Decsystem 10 Version," McCann, Holden and
176: Dewar, Dec. 1976.
177: Differences will be found primarily in {SEC_IMPL}.
178: {Ls 2}
179: {nfj}
180: {center {Ul Revision History}}
181: {Ls 1}
182: {nfj}
183: This document has been revised as follows :
184: {Ls 1}
185: Dec 1976 to correspond with SPITBOL Version 3.0
186: Mar 1978 to correspond with SPITBOL Version 3.3
187: Sep 1978 to correspond with SPITBOL Version 3.4
188: Feb 1979 to correspond with SPITBOL Version 3.5
189: {fj}
190: {Ls 3}VAX/VMS MACRO SPITBOL Version {Versionid} is designed to
191: operate on the VAX 11/780 and VAX 11/750 computers running the
192: VMS operating system version 2.0, 2.1, 2.2, 2.3 or 2.4.
193: {Set Pagenum,0}
194: {Setq Newpage,{Title}{T 42}PAGE~{Pagenum}~-~[{Hlid}]{Brk}{Subtitle}{Ls 1}-
195: {Display Page {Pagenum} - {Subtitle}}-
196: }
197: {Set title,MACRO~SPITBOL V3.5}
198: {Set Subtitle,Introduction}
199: {p}
200: !
201: ! Read the text
202: !
203: {Tset input,@textfile}
204: !
205: ! Produce the index. All that is required is to dump the INDEX property
206: ! in sorted order in a suitable format, and then snuff the property and
207: ! the definition since it isn't used in generating the help library.
208: !
209: {Display}
210: {Display Generating the index and table of contents.}
211: {Display This is hard. Please be patient.}
212: {Display}
213: !
214: {Tset Hs,\}
215: {Delprop INDEXA}
216: {Set linenum,1}{Set pagenum,1}{Set pagelength,55}
217: {Set Lmg,45}{Set Rmg,72}{Nfj}
218: {Setq newpage,{Ls 3}}
219: {Setq endpage,{Ls 2}{Center Index - {Roman @Pagenum}}{eject}}
220: {Doprop INDEX,-
221: {Brk}-
222: {Outdent 40}-
223: {Rpad {D 1}\,40,.}-
224: {Substr @{D 1}\INDEX,2}-
225: {Cond {Eq {Remdr @Linenum,6},3},{Ls 1}}-
226: ,UP}
227: {Brk}{Restore Hs}
228: {Delprop INDEX}
229: {Setq Index}
230: {Set Lmg,5}
231: !
232: ! Now dump out the table of contents. Since the TOC1 stack is in inverted
233: ! order, we pop it over to another stack, then pop that stack successively
234: ! to print it out.
235: !
236: {p}
237: {Set Pagenum,1}
238: {Setq newpage,-
239: {Center {Ul TABLE OF CONTENTS {Cond {Gt @Pagenum,1},(CON'T)}}}-
240: {Ls 2}-
241: Section Title Page-
242: {Ls 1}-
243: }
244: {Setq endpage,{Ls 2}{Center {Roman @Pagenum}}{eject}}
245: {Ls 1}
246: {Dowhile {Differ @Toc1},{Tset Toc2,@Toc1}{Restore Toc1}}
247: {Dowhile {Differ @Toc2},{Toc2}{Brk}{Restore Toc2}}
248: {P}
249: !
250: !MANDONE
251: !HELPSTART
252: !
253: ! We skip generating the help file if it isn't wanted.
254: !
255: {Cond {Leq N,{Substr {Caps {Query Do you want to make the .HLP help file? }},-
256: 1,1}},-
257: {Tset input,,Begintext=!HELPDONE,Endtext=!MANDONE}}
258: !
259: ! Now generate the manual text in on-line help form
260: !
261: {Set Sec_Func,the help for functions}
262: {Set Sec_Impl,the help for implementation information}
263: !
264: {Set Outos,FALSE}
265: {Set output,@Helpfile}
266: !
267: {Display}{Display ...Starting to generate the on-line help file}
268: {Display}
269: !
270: {Setq Os,{D 1}}{Setq Ul,{D 1}}{Setq Dbl,{D 1}}
271: {Setq Hl,{Brk}{Tset Lmg,1}{Setv Hlval,{Add1 @1}} -
272: {Replace {Cond {Eq @1,1}{Gt {Dsize 2},31},{Substr @2,1,31},,@2},<~ >,__}-
273: {Brk}{Restore Lmg}{Display {Hlval} - {D 2}}-
274: }
275: {Set Pagelength,66}{Set lmg,2}{Set Rmg,60}{Fj}
276: {Set P}{Set Newpage}{Set Endpage}
277: {Setq List,{Brk}{Lin 5}{Ls 1}-
278: {Set Listval,0}}
279: {Setq Listelem,-
280: {Cond {Leq @1},{Ls 1}{Outdent 5}{Lpad {Setv.Add1 Listval}.~~,5},,-
281: {Hl @Hlval,@1}{Set.Sub1 Hlval}}-
282: }
283: {Setq Endlist,{Ls 1}{Restore Lmg}}
284: {set bslack,0}
285: {tset lmg,1}
286: 1 SPITBOL{brk}
287: {Tset.Add1 Lmg}
288: {Nfj}
289: Invokes the MACRO SPITBOL (SNOBOL4) interpreter.
290:
291: Format:
292:
293: SPITBOL file-spec
294:
295: {Brk}{Restore Lmg}
296: {Fj}
297: 2 Parameters{Brk}
298: file-spec{brk}
299: {Tset.Add1 Lmg}
300: A legal file specification designating the input file for SPITBOL without
301: wild cards.
302: Only one file can be designated for file-spec.
303: No logical concatenation via "+" or successive processing via "," is
304: supported.
305: {Brk}{restore Lmg}
306: 2 Qualifiers{Brk}
307: /CRC (D){Brk}
308: /NOCRC{Brk}
309: {Tset.Add1 Lmg}
310: This switch is only meaningful on a /LOAD=... operation, where the
311: specification of /NOCRC will bypass the cyclic reducdancy check of
312: the SPITBOL code region.
313: The purpose of this check is to insure that the version of SPITBOL
314: being used is the same as the version under which the exit module was
315: saved.
316: As SPITBOL also checks version identification data and other parameters,
317: the overhead for this check may be considered unnecessary for frequently
318: used load modules.
319: In such cases, /NOCRC can be profitably specified.
320: {Brk}{Restore Lmg}
321: /CSTATS (D){Brk}
322: /NOCSTATS{Brk}
323: {Tset.Add1 Lmg}
324: This switch will enable/disable the printing of compilation
325: statistics on the output file.
326: If /NOLIST has been specified, the default is /NOCSTATS.
327: {Brk}{Restore Lmg}
328: /ESTATS (D){Brk}
329: /NOESTATS{Brk}
330: {Tset.Add1 Lmg}
331: This switch will suppress the printing of execution
332: statistics on the output file.
333: If /NOLIST has been specified, then the default is /NOESTATS.
334: {Brk}{Restore Lmg}
335: /EXECUTE (D){Brk}
336: /NOEXECUTE{Brk}
337: {Tset.Add1 Lmg}
338: This switch has the same logical effect as a
339: -NOEXECUTE control card in the source program.
340: SPITBOL will process the source program, and then exit with a
341: message that Execution Was Suppressed.
342: {Brk}{Restore Lmg}
343: /LIST[=filename] (/LIST=Inputfile.LIS (D)){Brk}
344: /NOLIST{Brk}
345: {Tset.Add1 Lmg}
346: The /LIST switch allows specification of the filename for the
347: standard output channel.
348: If a terminal device is specified for the /LIST switch,
349: then form feeds in the program listing will be suppressed.
350: The default device and account for this file is the same as that under
351: which SPITBOL is being run.
352: The default name for the output file is the input file's name, and
353: the default extension is ".LIS".
354: The program listing and compilation statistics are sent to this file.
355: If neither of /OUTPUT=... or /NOOUTPUT are also specified on the command
356: line, then execution output is also directed to this file.
357: This includes OUTPUT assigned text and TRACE and DUMP output.
358: {Ls 1}The /NOLIST switch indicates that source listing is not to be generated.
359: /NOLIST also causes an implicit /NOESTATS and /NOCSTATS.
360: Note that the appearance of /NOLIST does not mean that
361: no output will be sent to the standard output channel.
362: However, if the program makes no reference to the standard output channel,
363: then if /NOLIST is specified, this channel will never be opened.
364: {Ls 1}/LIST with no filename inverts the effect of a previous /NOLIST spec.
365: That is, enables source listing and compilation statistics.
366: {Brk}{Restore Lmg}
367: !
368: /MINC=nnn (MINC=20 (D)){brk}
369: {Brk}{Tset.Add1 Lmg}
370: This switch controls the number of pages by which
371: SPITBOL's working store is expanded when it becomes exhausted.
372: Under normal circumstances, it should not be necessary to specify
373: this switch, however, "/MINC=0" will prevent any additional allocation
374: to SPITBOL past the MINT allocation, and may thus be useful in
375: preventing the unrestrained growth of the interpreter.
376: {Brk}{Restore Lmg}
377: !
378: /MINT=nnn (MINT=200 (D)){Brk}
379: {Tset.Add1 Lmg}
380: This switch controls the amount of virtual memory
381: (in 512 Byte pages) that will be initally allocated for SPITBOL's
382: working storage areas.
383: The SPITBOL VMS interface is designed to permit these working storage
384: areas to grow indefinitely, as long as the region remains contiguous,
385: and there are pages available in the process' virtual quota.
386: However, SPITBOL will not request additional memory from VMS unless
387: it cannot get enough by regenerating its existing store.
388: So, this switch may be useful in some situations
389: to avoid garbage collector thrashing.
390: {Ls 1}The default for this switch is "/MINT=200" which is equivalent to
391: about 100K bytes, or 25,000 SPITBOL 'words' (VAX Longwords).
392: Stack space is not included in the MINT allocation, instead,
393: stack is allocated by SPITBOL as needed.
394: {Brk}{Restore Lmg}
395: !
396: /OUTPUT[=Filename] (/OUTPUT (D)){brk}
397: /NOOUTPUT{Brk}
398: {Tset.Add1 Lmg}
399: The /OUTPUT=filename switch requests an alternate file for the
400: standard output channel at execution time. If this switch is not specified,
401: then execution output is directed at the same file as the source listing
402: (/LIST=filename).
403: This file is not opened until execution begins.
404: If at that time the channel cannot be opened, SPITBOL exits with a
405: fatal status.
406: {Ls 1}/NOOUTPUT directs any execution-time references to the standard
407: output channel to the null device (NL:)
408: {Ls 1}/OUTPUT with no filename restores the default condition.
409: That is, execution output is appended to the listing output.
410: {Ls 1}Note that /OUTPUT and /LIST are not synonymous.
411: {Brk}{Restore Lmg}
412: !
413: /PAGE (D){Brk}
414: /NOPAGE{brk}
415: {Tset.Add1 Lmg}
416: If this switch is specified, page separators in
417: the source listing and statistics will be a few blank lines, instead of
418: form feeds.
419: "/PAGE" is the default, unless the standard output channel
420: is a terminal, in which case "/NOPAGE" is the default.
421: {Brk}{Restore Lmg}
422: !
423: /WARN (D){Brk}
424: /NOWARN{Brk}
425: {Tset.Add1 Lmg}
426: When /NOWARN is indicated on the command line, only errors and severe
427: errors in the VMS interface logic will be reported on SYS$ERROR.
428: This can be useful to suppress messages regarding source line truncation,
429: exit module saves and similar messages.
430: /WARN, the default, causes reporting of such conditions.
431: {Ls 1}This switch does not affect in any way SPITBOL's handling of errors with
432: respect to the program.
433: {Brk}{Restore Lmg}
434: /WIDTH=nnn{brk}
435: {Tset.Add1 Lmg}
436: SPITBOL attempts to compute a proper width for the standard output file.
437: The switch "/WIDTH=n" can be used to override any default.
438: Otherwise, if the output device is record-oriented (including
439: spooled files), the default is the buffer for the device as
440: indicated by VMS.
441: If the buffer size cannot be obtained, or is outside the range
442: [0..255], then a final default of 132 (decimal) is applied.
443: {Brk}{Restore Lmg}
444: {Restore Lmg}
445: {Tset Input,@Textfile}
446: !HELPDONE
447: !MANDONE
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.