-
Notifications
You must be signed in to change notification settings - Fork 2
/
make_vax_vector.tes
254 lines (229 loc) · 7.18 KB
/
make_vax_vector.tes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
! !
! 2013 April 17 !
! !
! The author disclaims copyright to this source code. In place of !
! a legal notice, here is a blessing: !
! !
! May you do good and not evil. !
! May you find forgiveness for yourself and forgive others. !
! May you share freely, never taking more than you give. !
! !
!***********************************************************************!
! This module generates a VAX-specific transfer vector for the !
! SQLite 3 shareable image. !
! !
@^A%MAKE_VAX_VECTOR V1.0% ! Identify myself... !
13^T 10^T
0J Z"N <@FS%^ES% %;> ! Clean up the buffer, if it's there !
0J 0A-32"E D ' ! strip leading spaces !
ZJ -1A-32"E -D ' ! and trailing spaces !
' ! endif buffer there !
HXZ HK ! Save possible command !
! Set flags for our use, and close this file !
[S ^XUS [S EDUS [S EHUS [S ! Save all the existing flags !
ESUS [S EVUS [S ETUS [S EUUS [S ! so we can restore the user to !
! his original state on exit !
^D ! Set Radix to 10 !
0^X ! Case-sensitive search !
0ED ! ^ in search means ConTRL !
! Disable Y or _ if data loss !
2EH ! Full error messages !
0ES 0EV ! No typeout after search !
2#16#128#512#8192ET
! Set ET flag as follows - !
! 1 rw typeout in image mode !
! 2 rw terminal is a scope !
! 4 rw read lower case !
! 8 rw ^T reads with no echo !
! 16 rw cancel ^O on typeout !
! 32 rw read with no wait, returns -1 if no input !
! 64 rw detach flag !
! 128 rw abort on error !
! 256 rw truncate to set width !
! 512 ro terminal is scope and watch is present !
! 1024 ro terminal is refresh and watch is present !
! 2048 xx not used !
! 4096 rw 1 => 8bit, 0 => 7bit !
! 8192 rw Surrogate escape on !
! 16384 xx not used !
! 32768 rw trap ^C and reset !
-1EU ! No case flagging on output !
! EO is Teco's Version Number !
! 0EJ is Job Number !
! 1EJ is KB Number !
! 2EJ is PPN !
@EI%% ! Close this file !
! --------------------------------------------------------------------- !
! * Load the date routine !
! !
! Executed from D$ !
! Value returned in 0$ !
! --------------------------------------------------------------------- !
@^UD$^[
.U.P ZJ .U.Z
^B/32/16+1900\ @I% %
^B/32&15U.M
-1%.M"E @I%January% @O!GOTMON! '
-1%.M"E @I%February% @O!GOTMON! '
-1%.M"E @I%March% @O!GOTMON! '
-1%.M"E @I%April% @O!GOTMON! '
-1%.M"E @I%May% @O!GOTMON! '
-1%.M"E @I%June% @O!GOTMON! '
-1%.M"E @I%July% @O!GOTMON! '
-1%.M"E @I%August% @O!GOTMON! '
-1%.M"E @I%September% @O!GOTMON! '
-1%.M"E @I%October% @O!GOTMON! '
-1%.M"E @I%November% @O!GOTMON! '
@I%December%
!GOTMON! @I% %
^B&31+100\ 3R D ZJ
Q.Z,.X0 Q.Z,.K
Q.PJ ^[$
! --------------------------------------------------------------------- !
! * Load transfer vector generation for VAX !
! --------------------------------------------------------------------- !
GZ ! Dump command line into buffer !
0J Z"N <@FS%^ES% %;> ! Clean up the buffer, if there !
@^UX%% @^UY%% @^UZ%% ! init filename buffers !
0J 0A-32"E D ' ! strip leading spaces !
ZJ -1A-32"E -D ' ! and trailing spaces !
0J
< 0A:@^UY%% C 0A-^^="E C0;' >
< 0A:@^UX%% C 0A-^^ "E C0;' >
.,ZXZ
'
@^A%...Loading existing symbol vector table...%
:QX"N
HK ! Clear text buffer !
:@ER%^EQX%"S ! If can open existing vector !
:EY ! then load it into buffer !
' ! endif !
0J HXT HK
@^A%done...% 13^T 10^T
|
@^A%unable to open % :GX @^A%...% 13^T 10^T
'
:QT"N
@^A%...Generating VAX MACRO-32 Transfer Vector...%
MD ! get current date, in 0$ !
HK ! clear buffer !
@I%;% 13@I%% 10@I%% ! generate header... !
@I%; % G0 13@I%% 10@I%%
@I%;
; The author disclaims copyright to this source code. In place of
; a legal notice, here is a blessing:
;
; May you do good and not evil.
; May you find forgiveness for yourself and forgive others.
; May you share freely, never taking more than you give.
;
;***********************************************************************
; This is automatically generated by MAKE_SYMBOL_VECTOR. DO NOT EDIT!!!
;
.TITLE SQLITE3_VECTOR
.MACRO ROUTINE NAME
.EXTRN NAME
.ALIGN QUAD
.TRANSFER NAME
.MASK NAME
JMP NAME+2
.ENDM
.MACRO SPARE ?L1
.EXTRN LIB$NOT_IMPLEMENTED
.ALIGN QUAD
BSBB L1
L1: JMP LIB$NOT_IMPLEMENTED
.ENDM
.PSECT ___SQLITE3_VECTOR -
PIC,USR,CON,REL,LCL,SHR,EXE,RD,NOWRT,QUAD
%
0U.P < ! Init pointer !
@^U.S%%
<
Q.PQT:@^U.S%%
%.PQT-^^,"E
3%.P^[
Q.PQT-^^S"E
@I% SPARE ;% G.S 13@I%% 10@I%%
| Q.PQT-^^P"E
@I% ROUTINE % G.S 13@I%% 10@I%%
' '
< %.PQT-10"E 0;' >
%.P^[
0;
'
>
:QT-Q.P"E 0;' >
@I%
.END
%
:@EW%^EQY/STM%"S ! If open vector file !
HP ! then dump out to file !
EF ! close vector file !
@^A%done...% 13^T 10^T
| ! else !
@^A%Could not open vector file % :GY 13^T 10^T
' ! end if !
@^A%...Generating VAX UPPER CASE aliases...%
HK ! clear buffer !
@I%#% 13@I%% 10@I%% ! build header... !
@I%# % G0 13@I%% 10@I%%
@I%#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
# This is automatically generated by MAKE_SYMBOL_VECTOR. DO NOT EDIT!!!
#
.text
.align 8
.macro routine uc,lc
.align 8
.extern _\lc
.global _\uc
_\uc:
.word 0xff
jmp _\lc+2
.endm
%
0U.P < ! Init pointer !
@^U.L%% @^U.U%% ! Init symbol and alias !
<
Q.PQT:@^U.L%%
Q.PQT"V
Q.PQT-^^ :@^U.U%%
|
Q.PQT:@^U.U%%
'
%.PQT-^^,"E
3%.P^[
Q.PQT-^^P"E
@I% routine % G.U @I%,% G.L 13@I%% 10@I%%
'
< %.PQT-10"E 0;' >
%.P^[
0;
'
>
:QT-Q.P"E 0;' >
@I% .end
%
:@EW%^EQZ/STM%"S ! If open vector file !
HP ! then dump out to file !
EF ! close vector file !
@^A%done...% 13^T 10^T
| ! else !
@^A%Could not open alias file % :GZ 13^T 10^T
' ! end if !
'
! --------------------------------------------------------------------- !
! * Now restore all the flags and exit !
! --------------------------------------------------------------------- !
]S QSEU ]S QSET ]S QSEV ]S QSES ]S ! Restore all the flags we !
QSEH ]S QSED ]S QS^X ]S ! saved at the start !
^C