1 " Begin include file ...... et_macros.incl.alm
2 " Written 6/15/77 by Noel I. Morris
3 " Modified '82 so error code entries are in first page of segment.
4
5 " This include file contains macros for generating error tables
6 " for both system and non-system use.
7
8 " ET MACRO
9 "
10 " This macro is used to initialize the error table for either
11 " system or non-system use. It is invoked at the beginning of
12 " the error table as follows:
13 "
14 " et table_namesystem
15 "
16
17 macro et
18 maclist on
19
20 name &1
21
22 &^=&2,system&
23
24 include stack_header
25
26 ^L
27
28 use codes
29 .code_start:
30
31 use past_codes
32 .code_end:
33
34 join /link/codespast_codes
35
36 use messages
37
38 .trapproc:
39 epaq 0ic
40 eax0 0au
41 epbpsb sp|0
42 lprplp sb|stack_header.lot_ptr*au
43 eax1 .code_start
44 .loop: stx0 lp|0x1
45 eax1 1x1
46 cmpx1 .code_enddu
47 tmi .loop-*ic
48 short_return
49
50 firstref <*text>|.trapproc
51
52 &; use codes
53 use messages
54
55 join /text/codesmessages
56
57 &
58
59 bool .segno,77777
60
61 maclist off
62
63 &end
64
65 ^L
66
67 " EC MACRO
68 "
69 " This macro is used to define an error code as shown:
70 "
71 " ec name,short_mess,long_mess
72 "
73 " If more than a single name is to be defined for a given message,
74 " a list of names separated by commas and enclosed in parentheses
75 " must be given. short_mess must be 8 or less characters. If omitted,
76 " the short_mess will be set to the name. long_mess is enclosed
77 " in parentheses in order to cause ALM to ignore embedded blanks. Please
78 " note that double quote characters in either short_mess or long_mess
79 " must be doubled in order to make the ALM assembly work properly.
80 " Note that a macro invocation line terminated by a comma will cause that
81 " statement to be continued on the next line.
82
83 macro ec
84 use codes
85
86 maclist on,save
87 &1 segdef &i
88 & maclist restore
89 &1&i:
90 & maclist object,save
91 zero .segno,&U
92 maclist restore
93 use messages
94 &^=&l2,0& shortname &2
95 &; shortname &1
96 &
97 &U:
98 maclist on,save
99 acc "&3"
100
101 maclist restore
102 &end
103
104 macro shortname
105 maclist on,save
106 aci "&1",8
107 maclist restore
108 &end
109
110 ^L
111
112 " A typical error table source program might have the following format:
113 "
114 " include et_macros
115 "
116 " et name_of_error_table
117 "
118 " ec error_code_1,ecode1,This is error code 1.
119 "
120 " ec error_code_2,ecode2,This is error code 2.
121 "
122 " : : : :
123 "
124 " ec error_code_n,ecoden,This is the nth error code.
125 "
126 " end
127 "
128
129 " End of include file ...... et_macros.incl.alm
130