/
Typescript.txt
279 lines (148 loc) · 4.03 KB
/
Typescript.txt
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
C:\DOCUME~1\ICSUSE~1\Desktop\PROJEC~1>build
C:\DOCUME~1\ICSUSE~1\Desktop\PROJEC~1>flex proj4.l
C:\DOCUME~1\ICSUSE~1\Desktop\PROJEC~1>hyacc -dlt proj4.y
C:\DOCUME~1\ICSUSE~1\Desktop\PROJEC~1>gcc -w *.c -o compiler -DINFO
C:\DOCUME~1\ICSUSE~1\Desktop\PROJEC~1>compiler source.yapl
0 syntax errors encountered.
Object module created [source.obj].
Error report created [source.rpt].
Cross-reference list created [source.lst].
**************************************************
Notes:
-- Numbers are in bytes.
-- Code sizes and fixup sizes stacks are used to create pairs of LEDATA and F
IXUPP records.
-- Sizes of code sizes and fixup sizes stacks must be the same.
Current size of code stack: [ 9677]
Current size of fixup stack: [ 836]
Current size of code sizes stack: [ 48]
Current size of fixup sizes stack: [ 48]
Maximum size of code stack: [25000] <-- CODE_STACK_SIZE
Maximum size of fixup stack: [10000] <-- FIXUP_STACK_SIZE
Maximum size of code sizes stack: [ 500] <-- SIZES_STACK_SIZE
Maximum size of fixup sizes stack: [ 500] <-- SIZES_STACK_SIZE
Modify the four constants above to resize the respective stacks. The constants c
an be found in constants.h.
**************************************************
C:\DOCUME~1\ICSUSE~1\Desktop\PROJEC~1>link source,,,util.lib
Microsoft (R) Segmented Executable Linker Version 5.60.339 Dec 5 1994
Copyright (C) Microsoft Corp 1984-1993. All rights reserved.
Definitions File [nul.def]:
C:\DOCUME~1\ICSUSE~1\Desktop\PROJEC~1>source
Hello World!
Enter a value for VAR1: 2
Enter a value for VAR2: 5
--- Begin WHILE loop ---
VAR1 is now equal to VAR2!
Enter a value for VAR3: 7
Decrementing VAR3...
The answer is 6
Decrementing VAR3...
The answer is 5
Decrementing VAR3...
The answer is 4
--- End WHILE loop ---
VAR1 does not equal VAR2!
The answer is 6
The answer is 5
VAR1 is greater than VAR2!
--- Begin arithmetic calculations ---
Let VAR5 = 25.
VAR5 / -5
The answer is -5
-VAR5 / -5
The answer is 5
VAR5 * -5
The answer is -125
-VAR5 * -5
The answer is 125
VAR5 / -5 --> VAR5
The answer is -5
-VAR5 * -5 --> VAR5
The answer is 125
*************************************
Let VAR3 = 20 and VAR4 = 40.
VAR3 + -VAR4
The answer is -20
VAR3 - -VAR4
The answer is 60
-VAR3 + -VAR4
The answer is -60
-VAR3 - -VAR4
The answer is 20
VAR3 - -VAR4 --> VAR3
The answer is 60
-VAR3 + -VAR4 --> VAR3
The answer is -60
*************************************
Let VAR1 = 5, VAR2 = 10, VAR3 = 15, and VAR4 = 20.
VAR1 + VAR2 - VAR3 - VAR4 --> VAR5
The answer is -20
VAR2 * 5 * 5 + VAR3 + VAR3 - -VAR4 --> VAR5
The answer is 300
VAR4 / 5 * -VAR1 * -5 / -VAR4 --> VAR5
The answer is -5
Negating VAR5...
The answer is 5
-VAR5 + 5 --> VAR5
The answer is -15
-VAR5 - 5 * -1 - 5 + 10 --> VAR5
The answer is 30
*************************************
Let VAR1 = 1.
VAR1 + 2 - 3 + 4 - 5 * -6 / 3 * 10 / -2
The answer is -10
VAR1 - 2 + 3 - 4 + 5 * 3 / -3 * -4 / 2 --> VAR2
The answer is 6
--- End arithmetic calculations ---
--- Begin DO loop ---
Let VAR1 = 2 and VAR4 = 2.
The answer is 2
The answer is 2
Incrementing VAR4...
The answer is 4
Incrementing VAR4...
The answer is 6
Incrementing VAR4...
Incrementing VAR1...
The answer is 4
The answer is 2
Incrementing VAR4...
The answer is 4
Incrementing VAR4...
The answer is 6
Incrementing VAR4...
Incrementing VAR1...
The answer is 6
The answer is 2
Incrementing VAR4...
The answer is 4
Incrementing VAR4...
The answer is 6
Incrementing VAR4...
Incrementing VAR1...
The answer is 8
The answer is 2
Incrementing VAR4...
The answer is 4
Incrementing VAR4...
The answer is 6
Incrementing VAR4...
Incrementing VAR1...
The answer is 10
The answer is 2
Incrementing VAR4...
The answer is 4
Incrementing VAR4...
The answer is 6
Incrementing VAR4...
Incrementing VAR1...
--- End DO loop ---
VAR1 is less than VAR2!
Incrementing VAR1...
VAR1 is less than VAR2!
Incrementing VAR1...
VAR1 is now greater than VAR3!
VAR1 is equal to VAR2!
Goodbye!
C:\DOCUME~1\ICSUSE~1\Desktop\PROJEC~1>