include "hdr1.html"; ?>
Line | Address | Object Code | Label | F1 | N1 | B | F2 | N2 | Comments | Check |
---|---|---|---|---|---|---|---|---|---|---|
1 | 0 | ; tape1.d/boolexp.t2 | ||||||||
2 | 0 | ;------------------- | ||||||||
3 | 0 | ; | ||||||||
4 | 0 | ; compile boolean expression | ||||||||
5 | 0 | ; | ||||||||
6 | 0 | compbool:: | ; | |||||||
7 | 0 | ; | ||||||||
8 | 0 | =2915 | ||||||||
9 | 2915 | 0000000000000 | W2915: | +0 | ; | @2915 | ||||
10 | 2916 | =2917 | ||||||||
11 | 2917 | 0000000000000 | W2917: | +0 | ; | @2917 | ||||
12 | 2918 | 0000000000041 | W2918: | +33 | ; | @2918 | ||||
13 | 2919 | 0000000000043 | W2919: | +35 | ; | @2919 | ||||
14 | 2920 | 0000000000044 | W2920: | +36 | ; | @2920 | ||||
15 | 2921 | 0000000000042 | W2921: | +34 | ; | @2921 | ||||
16 | 2922 | 0000000000055 | W2922: | +45 | ; | @2922 | ||||
17 | 2923 | ; | ||||||||
18 | 2923 | ; | ||||||||
19 | 2923 | .ent: | ; | |||||||
20 | 2923 | 0605541 | lod | .lnk | ; return address | @2923 | ||||
21 | 2923+ | pad | ; | |||||||
21+1 | 2923+ | 0000000 | 00 | 0 | ||||||
22 | 2924 | call | ; stack return address | @2924 | ||||||
22+1 | 2924 | 7323731005012 | lnk | push.lnk | : | jmp | push.ent | |||
23 | 2925 | 2210646537777 | inc | stkp | / | cls | -1 | ; | ||
24 | 2926 | 0021403005556 | o00 | W2240 | / | jmp | .sw-1 | ;switch | @2926 | |
25 | 2927 | ; | ||||||||
26 | 2927 | .sw: | ; | |||||||
27 | 2927 | call | ; +1 get token | @2927 | ||||||
27+1 | 2927 | 7322411004503 | lnk | advance.lnk | : | jmp | advance.ent | |||
28 | 2928 | 1105566 | jmp | .sw2 | : | pad | ; +2 | @2928 | ||
28+1 | 2928+ | 0000000 | 00 | 0 | ||||||
29 | 2929 | 3021415005565 | lod | W2243 | : | jmp | .sw3 | ; +3 | ||
30 | 2930 | 0604303 | lod | W2243 | : | pad | ; +4 | @2930 | ||
30+1 | 2930+ | 0000000 | 00 | 0 | ||||||
31 | 2931 | call | ; | |||||||
31+1 | 2931 | 7323731005012 | lnk | push.lnk | : | jmp | push.ent | |||
32 | 2932 | 1005607 | jmp | .2951 | : | pad | ; | @2932 | ||
32+1 | 2932+ | 0000000 | 00 | 0 | ||||||
33 | 2933 | .sw3: | ; | |||||||
34 | 2933 | call | ; | |||||||
34+1 | 2933 | 7323731005012 | lnk | push.lnk | : | jmp | push.ent | |||
35 | 2934 | 1005602 | jmp | .2946 | ; | @2934 | ||||
36 | 2934+ | ; | ||||||||
37 | 2934+ | .sw2: | ; | |||||||
38 | 2934+ | 0600600 | lod | token | ;token | @2934+ | ||||
39 | 2935 | 0124340 | sub | K2b | ;=2 [if] | |||||
40 | 2935+ | 1045637 | jz | .bcond | ;special case | |||||
41 | 2936 | call | ;test for operand/operator | @2936 | ||||||
41+1 | 2936 | 7326605005766 | lnk | L3062.lnk | : | jmp | L3062.ent | |||
42 | 2937 | .bloop: | ; | |||||||
43 | 2937 | 1045574 | jz | .cont | ;->OK | |||||
44 | 2937+ | .bloopa: | ; | |||||||
45 | 2937+ | 0600600 | lod | token | ; | |||||
46 | 2938 | call | ; | @2938 | ||||||
46+1 | 2938 | 7323731005012 | lnk | push.lnk | : | jmp | push.ent | |||
47 | 2939 | call | ; | |||||||
47+1 | 2939 | 7326611005775 | lnk | L3069.lnk | : | jmp | L3069.ent | |||
48 | 2940 | ; | ||||||||
49 | 2940 | .cont: | ; | |||||||
50 | 2940 | call | ; | @2940 | ||||||
50+1 | 2940 | 7326605005760 | lnk | TBoolVar.lnk | : | jmp | TBoolVar.ent | |||
51 | 2941 | 1145577 | jz | .2943P | ; | |||||
52 | 2941+ | pad | ;no-op | |||||||
52+1 | 2941+ | 0000000 | 00 | 0 | ||||||
53 | 2942 | .2942: | ; | |||||||
54 | 2942 | call | ; | @2942 | ||||||
54+1 | 2942 | 7326605006002 | lnk | BoolPrim.lnk | : | jmp | BoolPrim.ent | |||
55 | 2943 | 1005607 | jmp | .2951 | ; | |||||
56 | 2943+ | ; | ||||||||
57 | 2943+ | 0603427 | .2943P: | lod | idptr | ; | ||||
58 | 2944 | call | ; | @2944 | ||||||
58+1 | 2944 | 7323731005012 | lnk | push.lnk | : | jmp | push.ent | |||
59 | 2945 | call | ; | |||||||
59+1 | 2945 | 7322411004503 | lnk | advance.lnk | : | jmp | advance.ent | |||
60 | 2946 | .2946: | ; | |||||||
61 | 2946 | call | ; | @2946 | ||||||
61+1 | 2946 | 7326621005641 | lnk | BoolFactor.lnk | : | jmp | BoolFactor.ent | |||
62 | 2947 | 1145571 | jz | .bloopa | ; | |||||
63 | 2947+ | nop | ; | |||||||
63+1 | 2947+ | 1005604 | jmp | .1 | ||||||
63+2 | 2948 | .1: | ; | |||||||
64 | 2948 | 0010646577777 | o00 | stkp | / | lod | -1 | ; | @2948 | |
65 | 2949 | 1145635 | jz | .2973P | ; | |||||
66 | 2949+ | 0000000 | o00 | 0 | ; | |||||
67 | 2950 | call | ; | @2950 | ||||||
67+1 | 2950 | 7323731005037 | lnk | GenLoad0.lnk | : | jmp | GenLoad0.ent | |||
68 | 2951 | ; from 2943 | ||||||||
69 | 2951 | .2951: | call | |||||||
69+1 | 2951 | 7326611005655 | lnk | L2989.lnk | : | jmp | L2989.ent | |||
70 | 2952 | 1125621 | jn | .2961P | ; | @2952 | ||||
71 | 2952+ | 0000000 | o00 | 0 | ; no-op | |||||
72 | 2953 | .2953: | ; | |||||||
73 | 2953 | call | ; test for eqv/hk/or | |||||||
73+1 | 2953 | 7326605005772 | lnk | BoolOper1.lnk | : | jmp | BoolOper1.ent | |||
74 | 2954 | 1045620 | jz | .2960 | ;yes, get rest of expression | @2954 | ||||
75 | 2954+ | 0000000 | o00 | 0 | ;no-op | |||||
76 | 2955 | 0010646577777 | o00 | stkp | / | lod | -1 | ; | ||
77 | 2956 | 0064345 | and | W2277 | ;=0001774017777 | @2956 | ||||
78 | 2956+ | 1045616 | jz | .2958 | ;zero-> | |||||
79 | 2957 | 1005620 | jmp | .2960 | ; | |||||
80 | 2957+ | ; | ||||||||
81 | 2957+ | pad | ; | |||||||
81+1 | 2957+ | 0000000 | 00 | 0 | ||||||
82 | 2958 | ; | ||||||||
83 | 2958 | 0010646577776 | .2958: | o00 | stkp | / | lod | -2 | ; | @2958 |
84 | 2959 | 1144752 | jz | expression.done | ; | |||||
85 | 2959+ | pad | ;noop | |||||||
85+1 | 2959+ | 0000000 | 00 | 0 | ||||||
86 | 2960 | .2960: | ; | |||||||
87 | 2960 | call | ; | @2960 | ||||||
87+1 | 2960 | 7326605006045 | lnk | L3109.lnk | : | jmp | L3109.ent | |||
88 | 2961 | 1005607 | jmp | .2951 | ||||||
89 | 2961+ | ; | ||||||||
90 | 2961+ | 0600600 | .2961P: | lod | token | ; | ||||
91 | 2962 | call | ; | @2962 | ||||||
91+1 | 2962 | 7323731005012 | lnk | push.lnk | : | jmp | push.ent | |||
92 | 2963 | call | ; | |||||||
92+1 | 2963 | 7326611005775 | lnk | L3069.lnk | : | jmp | L3069.ent | |||
93 | 2964 | call | ; | @2964 | ||||||
93+1 | 2964 | 7326605005760 | lnk | TBoolVar.lnk | : | jmp | TBoolVar.ent | |||
94 | 2965 | 1025634 | jn | .2972 | ; | |||||
95 | 2965+ | 0603427 | lod | idptr | ; | |||||
96 | 2966 | call | ; | @2966 | ||||||
96+1 | 2966 | 7323731005012 | lnk | push.lnk | : | jmp | push.ent | |||
97 | 2967 | call | ; | |||||||
97+1 | 2967 | 7322411004503 | lnk | advance.lnk | : | jmp | advance.ent | |||
98 | 2968 | call | ; | @2968 | ||||||
98+1 | 2968 | 7326611005655 | lnk | L2989.lnk | : | jmp | L2989.ent | |||
99 | 2969 | 1045611 | jz | .2953 | ; | |||||
100 | 2969+ | 0000000 | o00 | 0 | ; | |||||
101 | 2970 | call | ; | @2970 | ||||||
101+1 | 2970 | 7323761005021 | lnk | SaveTemp.lnk | : | jmp | SaveTemp.ent | |||
102 | 2971 | 1005571 | jmp | .bloop | ; | |||||
103 | 2971+ | ; | ||||||||
104 | 2971+ | 0000000 | o00 | 0 | ; | |||||
105 | 2972 | ; | ||||||||
106 | 2972 | .2972: | call | ; | @2972 | |||||
106+1 | 2972 | 7323761005021 | lnk | SaveTemp.lnk | : | jmp | SaveTemp.ent | |||
107 | 2973 | 1005576 | jmp | .2942 | ; | |||||
108 | 2973+ | ; | ||||||||
109 | 2973+ | 0604340 | .2973P: | lod | K2b | ;=2 | ||||
110 | 2974 | 1661044 | _err34: | lnk | errlnk | ;error 34: empty boolean expr | @2974 | |||
111 | 2974+ | 1001070 | jmp | Error | ;call error routine | |||||
112 | 2975 | .bcond: | ; | |||||||
113 | 2975 | call | ; | |||||||
113+1 | 2975 | 7326605006100 | lnk | L3136.lnk | : | jmp | L3136.ent | |||
114 | 2976 | 1144752 | jz | expression.done | ; | @2976 | ||||
115 | 2976+ | pad | ; | |||||||
115+1 | 2976+ | 0000000 | 00 | 0 | ||||||
116 | 2977 | ;-------------------------------------------------------------------- | ||||||||
117 | 2977 | ; | ||||||||
118 | 2977 | BoolFactor:: | ; | |||||||
119 | 2977 | ; | ||||||||
120 | 2977 | .ent: | ; | |||||||
121 | 2977 | call | ; test equiv/hook/or | |||||||
121+1 | 2977 | 7326605005772 | lnk | BoolOper1.lnk | : | jmp | BoolOper1.ent | |||
122 | 2978 | 1125652 | jn | .2986P | ;no, end of boolean expression | @2978 | ||||
123 | 2978+ | 0000000 | o00 | 0 | ||||||
124 | 2979 | 0010646577776 | o00 | stkp | / | lod | -2 | ; | ||
125 | 2980 | 1045654 | jz | .2988 | ; | @2980 | ||||
126 | 2980+ | 0000000 | o00 | 0 | ; | |||||
127 | 2981 | 0125546 | sub | W2918 | ; | |||||
128 | 2981+ | 1045654 | jz | .2988 | ; | |||||
129 | 2982 | 0124341 | sub | K3a | ;=3 | @2982 | ||||
130 | 2982+ | 1145647 | jz | .2983P | ; | |||||
131 | 2983 | 1005651 | jmp | .2985 | ; | |||||
132 | 2983+ | ; | ||||||||
133 | 2983+ | .2983P: | ; | |||||||
134 | 2983+ | 0600600 | lod | token | ; | |||||
135 | 2984 | 0125547 | sub | W2919 | ; | @2984 | ||||
136 | 2984+ | 1145652 | jz | .2986P | ; | |||||
137 | 2985 | .2985: | ; | |||||||
138 | 2985 | 0600600 | lod | token | ; | |||||
139 | 2985+ | 0165546 | bus | W2918 | ; | |||||
140 | 2986 | .2986: | ; | |||||||
141 | 2986 | 1025654 | jn | .2988 | ; | @2986 | ||||
142 | 2986+ | ; from 2978 | ||||||||
143 | 2986+ | 0604321 | .2986P: | lod | False | ; | ||||
144 | 2987 | ret | ;return | |||||||
144+1 | 2987 | 0026623000001 | o00 | BoolFactor.lnk | / | jmp | 1 | |||
145 | 2988 | ; from 2986 | ||||||||
146 | 2988 | .2988: | ; | |||||||
147 | 2988 | 0626623000001 | cla | Link5 | / | jmp | 1 | ;return, clearing acc | ||
148 | 2989 | ;--------------------------------------------------------- | ||||||||
149 | 2989 | ; | ||||||||
150 | 2989 | L2989:: | ; | |||||||
151 | 2989 | ; | ||||||||
152 | 2989 | .ent: | ; | |||||||
153 | 2989 | call | ; compile bool factor | @2989 | ||||||
153+1 | 2989 | 7326621005641 | lnk | BoolFactor.lnk | : | jmp | BoolFactor.ent | |||
154 | 2990 | 1025667 | jn | .2999 | ; return acc=0 | @2990 | ||||
155 | 2990+ | 0000000 | o00 | 0 | ; no-op | |||||
156 | 2991 | 0010646577776 | o00 | stkp | / | lod | -2 | ; | ||
157 | 2992 | 1145670 | jz | .3000P | ; | @2992 | ||||
158 | 2992+ | 0405543 | sto | W2915 | ; | |||||
159 | 2993 | 0125547 | sub | W2919 | ; | |||||
160 | 2993+ | 1145662 | jz | .2994P | ; | |||||
161 | 2994 | 1005664 | jmp | .2996 | ; | @2994 | ||||
162 | 2994+ | ; | ||||||||
163 | 2994+ | 0600600 | .2994P: | lod | token | ; | ||||
164 | 2995 | 0125550 | sub | W2920 | ; | |||||
165 | 2995+ | 1145670 | jz | .3000P | ; | |||||
166 | 2996 | .2996: | ; | |||||||
167 | 2996 | 0605543 | lod | W2915 | ; | @2996 | ||||
168 | 2996+ | 0165546 | bus | W2918 | ; | |||||
169 | 2997 | 1025667 | jn | .2999 | ; | |||||
170 | 2997+ | 0600600 | lod | token | ; | |||||
171 | 2998 | 0165551 | bus | W2921 | ; | @2998 | ||||
172 | 2998+ | 1125670 | jn | .3000P | ; | |||||
173 | 2999 | .2999: | ; | |||||||
174 | 2999 | 0626613000001 | cla | Link30a | / | jmp | 1 | ; return with acc zero | ||
175 | 3000 | ; | ||||||||
176 | 3000 | 0000000 | o00 | 0 | ||||||
177 | 3000+ | ; | ||||||||
178 | 3000+ | 0604321 | .3000P: | lod | False | ; | ||||
179 | 3001 | ret | ; return non-zero | |||||||
179+1 | 3001 | 0026613000001 | o00 | L2989.lnk | / | jmp | 1 | |||
180 | 3002 | ;-------------------------------------------------------------------- | ||||||||
181 | 3002 | ; BoolComp - generate code for Boolean comparison. Assume first arithmetic | ||||||||
182 | 3002 | ; expression already compiled, result on stack. | ||||||||
183 | 3002 | ; | ||||||||
184 | 3002 | BoolComp:: | ; | |||||||
185 | 3002 | ; | ||||||||
186 | 3002 | .ent: | ; | |||||||
187 | 3002 | 0605541 | lod | .lnk | ;return address | @3002 | ||||
188 | 3002+ | 1661044 | _err35: | lnk | errlnk | ;error 35: missing rel op | ||||
189 | 3003 | 0010646177777 | o00 | stkp | / | exa | -1 | ;swap with expression result | ||
190 | 3004 | call | ;save expression result | @3004 | ||||||
190+1 | 3004 | 7323731005012 | lnk | push.lnk | : | jmp | push.ent | |||
191 | 3005 | call | ;check for rel operator | |||||||
191+1 | 3005 | 7323761105003 | lnk | Relop.lnk | : | jmp | Relop.ent | |||
192 | 3006 | 1045677 | jz | .1 | ;OK, save operator | @3006 | ||||
193 | 3006+ | 1004772 | jmp | error2 | ;error | |||||
194 | 3007 | ; | ||||||||
195 | 3007 | .1: | ; | |||||||
196 | 3007 | 0600600 | lod | token | ; | |||||
197 | 3007+ | 0544300 | cls | W2240 | ; | |||||
198 | 3008 | call | ;add operator to stack | @3008 | ||||||
198+1 | 3008 | 7323731005012 | lnk | push.lnk | : | jmp | push.ent | |||
199 | 3009 | call | ;get next token | |||||||
199+1 | 3009 | 7322411004503 | lnk | advance.lnk | : | jmp | advance.ent | |||
200 | 3010 | 0600600 | lod | token | ;load token id | @3010 | ||||
201 | 3010+ | 1025750 | jn | .bconst | ;<0, constant | |||||
202 | 3011 | call | ;get variable? | |||||||
202+1 | 3011 | 7323761005054 | lnk | SimpleTerm.lnk | : | jmp | SimpleTerm.ent | |||
203 | 3012 | 1025713 | jn | .bcomplex | ; | @3012 | ||||
204 | 3012+ | .bnonzero: | ; | |||||||
205 | 3012+ | 0603427 | lod | idptr | ;get id/const info | |||||
206 | 3013 | call | ;add info to stack | |||||||
206+1 | 3013 | 7323731005012 | lnk | push.lnk | : | jmp | push.ent | |||
207 | 3014 | call | ;get next token | @3014 | ||||||
207+1 | 3014 | 7322411004503 | lnk | advance.lnk | : | jmp | advance.ent | |||
208 | 3015 | call | ;test for arith operator | |||||||
208+1 | 3015 | 7323761005070 | lnk | TestArithOp.lnk | : | jmp | TestArithOp.ent | |||
209 | 3016 | 1025720 | jn | .bsimple | ;no, end of arith expression | @3016 | ||||
210 | 3016+ | 0040000 | o02 | 0 | ;=1 | |||||
211 | 3017 | 2710646600000 | o27 | stkp | / | lod | 0 | ;pop item from stack | ||
212 | 3018 | .bfull: | ; | |||||||
213 | 3018 | 0404303 | sto | W2243 | ;save info on 1st part of exprn | @3018 | ||||
214 | 3018+ | 0444300 | inc | W2240 | ;bump entry switch | |||||
215 | 3019 | .bcomplex: | ; | |||||||
216 | 3019 | call | ; | |||||||
216+1 | 3019 | 7323761005021 | lnk | SaveTemp.lnk | : | jmp | SaveTemp.ent | |||
217 | 3020 | 0444300 | inc | W2240 | ;bump entry switch | @3020 | ||||
218 | 3020+ | 0444300 | inc | W2240 | ;by (another) 2 | |||||
219 | 3021 | call | ;compile rest of expression | |||||||
219+1 | 3021 | 7323131004627 | lnk | expression.lnk | : | jmp | expression.ent | |||
220 | 3022 | call | ;store result in temp | @3022 | ||||||
220+1 | 3022 | 7323761005021 | lnk | SaveTemp.lnk | : | jmp | SaveTemp.ent | |||
221 | 3023 | call | ; | |||||||
221+1 | 3023 | 7323731005040 | lnk | GenLoad2.lnk | : | jmp | GenLoad2.ent | |||
222 | 3024 | .bsimple: | ; | |||||||
223 | 3024 | 0010646577777 | o00 | stkp | / | lod | -1 | ; | @3024 | |
224 | 3025 | 0404031 | sto | IdInfo | ; | |||||
225 | 3025+ | 0540004 | cls | 4 | ; | |||||
226 | 3026 | call | ; | @3026 | ||||||
226+1 | 3026 | 7323761005051 | lnk | FreeTemp.lnk | : | jmp | FreeTemp.ent | |||
227 | 3027 | .bdone: | ; | |||||||
228 | 3027 | 0604322 | lod | TBool | ; | |||||
229 | 3027+ | pad | ;noop | |||||||
229+1 | 3027+ | 0000000 | 00 | 0 | ||||||
230 | 3028 | 0010646177775 | o00 | stkp | / | exa | -3 | ; | @3028 | |
231 | 3029 | 0404306 | sto | W2246 | ;comparison type | |||||
232 | 3029+ | 0604340 | lod | K2b | ;=2 | |||||
233 | 3030 | 2710646600000 | o27 | stkp | / | lod | 0 | ;reload operator | @3030 | |
234 | 3031 | 0124332 | sub | K52 | ;=52 [GR] odd case | |||||
235 | 3031+ | 1045731 | jz | .bgr | ;yes, skip | |||||
236 | 3032 | 0104337 | add | K24a | ; | @3032 | ||||
237 | 3032+ | 0104313 | add | K1b | ;=1 convert less (28) to 1 etc. | |||||
238 | 3033 | .bgr: | ; | |||||||
239 | 3033 | 2400022605734 | ads | 4 | / | lod | CmpTab | ;load appropriate pattern | ||
240 | 3034 | call | ;and generate the ocode | @3034 | ||||||
240+1 | 3034 | 7320121004032 | lnk | gencode1.lnk | : | jmp | gencode1.ent | |||
241 | 3035 | 1005073 | jmp | Pop1 | ;return via stack | |||||
242 | 3035+ | pad | ||||||||
242+1 | 3035+ | 0000000 | 00 | 0 | ||||||
243 | 3036 | ;------- | ||||||||
244 | 3036 | ; | ||||||||
245 | 3036 | CmpTab: | ; | |||||||
246 | 3036 | 0000000000043 | +35 | ; +0 GR | @3036 | |||||
247 | 3037 | 0000000000042 | +34 | ; +1 LS | @3037 | |||||
248 | 3038 | 0000000000044 | +36 | ; +2 LE | @3038 | |||||
249 | 3039 | 0000000000040 | +32 | ; +3 EQ | @3039 | |||||
250 | 3040 | 0000000000045 | +37 | ; +4 GE | @3040 | |||||
251 | 3041 | 0000000000037 | +31 | ; +5 NE | @3041 | |||||
252 | 3042 | 0000000000111 | +73 | ; +6 GR rev | @3042 | |||||
253 | 3043 | 0000000000041 | +33 | ; +7 LS rev | @3043 | |||||
254 | 3044 | 0000000000112 | +74 | ; +8 LE rev | @3044 | |||||
255 | 3045 | 0000000000114 | +76 | ; +9 EQ rev | @3045 | |||||
256 | 3046 | 0000000000115 | +77 | ;+10 GE rev | @3046 | |||||
257 | 3047 | 0000000000113 | +75 | ;+11 NE rev | @3047 | |||||
258 | 3048 | ; | ||||||||
259 | 3048 | .bconst: | ; | |||||||
260 | 3048 | 0016136600000 | o00 | idptr | / | lod | 0 | ;fetch constant value | @3048 | |
261 | 3049 | jnz | ;non-zero, normal test needed | |||||||
261+1 | 3049 | 1045752 | jz | .1 | ||||||
261+2 | 3049+ | 1105704 | jmp | BoolComp.bnonzero | ||||||
261+3 | 3050 | .1: | ; | |||||||
262 | 3050 | call | ;get next token | @3050 | ||||||
262+1 | 3050 | 7322411004503 | lnk | advance.lnk | : | jmp | advance.ent | |||
263 | 3051 | call | ;arith operator - expression incomplete? | |||||||
263+1 | 3051 | 7323761005070 | lnk | TestArithOp.lnk | : | jmp | TestArithOp.ent | |||
264 | 3052 | 1125755 | jn | .bcrev | ;no, just constant | @3052 | ||||
265 | 3052+ | 0603427 | lod | idptr | ; | |||||
266 | 3053 | 1005712 | jmp | .bfull | ; | |||||
267 | 3053+ | ; | ||||||||
268 | 3053+ | .bcrev: | ; | |||||||
269 | 3053+ | 0604350 | lod | W2280 | ;=6 | |||||
270 | 3054 | 0400004 | sto | 4 | ;modify base for second set | @3054 | ||||
271 | 3054+ | 0442151 | inc | stkp | ; | |||||
272 | 3055 | 1005723 | jmp | .bdone | ; | |||||
273 | 3055+ | pad | ; | |||||||
273+1 | 3055+ | 0000000 | 00 | 0 | ||||||
274 | 3056 | ;-------------------------------------------------------------------- | ||||||||
275 | 3056 | ; | ||||||||
276 | 3056 | TBoolVar:: | ; | |||||||
277 | 3056 | ; | ||||||||
278 | 3056 | .ent: | ; | |||||||
279 | 3056 | call | ; | @3056 | ||||||
279+1 | 3056 | 7323761005054 | lnk | SimpleTerm.lnk | : | jmp | SimpleTerm.ent | |||
280 | 3057 | .ret1: | ; | |||||||
281 | 3057 | 0026607020001 | o00 | .lnk | / | jn | 1 | ;return +1 if <(not an operand) | ||
282 | 3058 | 0603427 | lod | idptr | ; | @3058 | ||||
283 | 3058+ | 0064324 | and | T_Mask | ;=00700000000000 | |||||
284 | 3059 | 0164322 | bus | TBool | ;type=bool? | |||||
285 | 3059+ | 1045765 | jz | .rett | ;yes, return true | |||||
286 | 3060 | ; | ||||||||
287 | 3060 | .retf: | ; | |||||||
288 | 3060 | 0604321 | lod | False | ;=04000000000000 | @3060 | ||||
289 | 3060+ | 1005761 | jmp | .ret1 | ;return with acc < 0 | |||||
290 | 3061 | ; | ||||||||
291 | 3061 | .rett: | ; | |||||||
292 | 3061 | 0626607000001 | cla | .lnk | / | jmp | 1 | ;return +1 with 0 in acc | ||
293 | 3062 | ;-------------------------------------------------------------------- | ||||||||
294 | 3062 | ; | ||||||||
295 | 3062 | ; | ||||||||
296 | 3062 | L3062.ent: | ; | |||||||
297 | 3062 | call | ; | @3062 | ||||||
297+1 | 3062 | 7323761004775 | lnk | TestOpd.lnk | : | jmp | TestOpd.ent | |||
298 | 3063 | 1045765 | jz | .rett | ;return with acc = 0 - constant/identifier etc. | |||||
299 | 3063+ | pad | ; | |||||||
299+1 | 3063+ | 0000000 | 00 | 0 | ||||||
300 | 3064 | call | ; | @3064 | ||||||
300+1 | 3064 | 7323761005070 | lnk | TestArithOp.lnk | : | jmp | TestArithOp.ent | |||
301 | 3065 | 1045765 | jz | .rett | ;return with acc = 0 | |||||
302 | 3065+ | 1005764 | jmp | .retf | ;return with acc < 0 | |||||
303 | 3066 | ;-------------------------------------------------------------------- | ||||||||
304 | 3066 | ; | ||||||||
305 | 3066 | ; test for boolean low priority operators [equiv, hook, or] | ||||||||
306 | 3066 | ; | ||||||||
307 | 3066 | BoolOper1.ent: | ; | |||||||
308 | 3066 | 0600600 | lod | token | ;token | @3066 | ||||
309 | 3066+ | 0125546 | sub | W2918 | ;=33 [equiv,hook,or] | |||||
310 | 3067 | 1025764 | jn | .retf | ;no -> return with < 0 | |||||
311 | 3067+ | 0164341 | bus | K3a | ;=3 | |||||
312 | 3068 | 1025764 | jn | .retf | ;no -> return with < 0 | @3068 | ||||
313 | 3068+ | 1005765 | jmp | .rett | ;return with 0 | |||||
314 | 3069 | ;-------------------------------------------------------------------- | ||||||||
315 | 3069 | ; | ||||||||
316 | 3069 | L3069:: | ; | |||||||
317 | 3069 | ; | ||||||||
318 | 3069 | .ent: | ; | |||||||
319 | 3069 | call | ; | @3069 | ||||||
319+1 | 3069 | 7322411004503 | lnk | advance.lnk | : | jmp | advance.ent | |||
320 | 3070 | call | ; | @3070 | ||||||
320+1 | 3070 | 7326605005766 | lnk | L3062.lnk | : | jmp | L3062.ent | |||
321 | 3071 | 1046001 | jz | .3073 | ; | |||||
322 | 3071+ | 0604340 | lod | K2b | ;=2 | |||||
323 | 3072 | 1661044 | _err36: | lnk | errlnk | ;error 36: missing operand in boolex | @3072 | |||
324 | 3072+ | 1001070 | jmp | Error | ; call error routine | |||||
325 | 3073 | .3073: | ; | |||||||
326 | 3073 | ret | ; | |||||||
326+1 | 3073 | 0026613000001 | o00 | L3069.lnk | / | jmp | 1 | |||
327 | 3074 | ;-------------------------------------------------------------------- | ||||||||
328 | 3074 | ; | ||||||||
329 | 3074 | BoolPrim:: | ; | |||||||
330 | 3074 | ; | ||||||||
331 | 3074 | .ent: | ; | |||||||
332 | 3074 | 1661044 | _err37: | lnk | errlnk | ;error 37: bad bool primary | @3074 | |||
333 | 3074+ | 0605541 | lod | .lnk | ; | |||||
334 | 3075 | call | ; | |||||||
334+1 | 3075 | 7323731005012 | lnk | push.lnk | : | jmp | push.ent | |||
335 | 3076 | 0600600 | lod | token | ; | @3076 | ||||
336 | 3076+ | 0124323 | sub | K47 | ;=47 [(] | |||||
337 | 3077 | 1046017 | jz | .bnest | ;nested expression | |||||
338 | 3077+ | 0104331 | add | K10a | ;=10 =>[NOT] | |||||
339 | 3078 | 1046034 | jz | .bnot | ;unary operator | @3078 | ||||
340 | 3078+ | 0600600 | lod | token | ; | |||||
341 | 3079 | 1046010 | jz | .bident | ;identifer | |||||
342 | 3079+ | 1106014 | jmp | .bother | ;-> | |||||
343 | 3080 | ; | ||||||||
344 | 3080 | .bident: | ; | |||||||
345 | 3080 | 0603427 | lod | idptr | ; | @3080 | ||||
346 | 3080+ | 0064324 | and | T_Mask | ;=00700000000000 | |||||
347 | 3081 | 0124322 | sub | TBool | ;=00100000000000 | |||||
348 | 3081+ | 1144567 | jz | Primary.prim | ;not | |||||
349 | 3082 | .bconst: | ; | |||||||
350 | 3082 | 0604340 | lod | K2b | ;=2 | @3082 | ||||
351 | 3082+ | 0404300 | sto | W2240 | ;set entry switch=2 | |||||
352 | 3083 | call | ;compile arithmetic expression | |||||||
352+1 | 3083 | 7323131004627 | lnk | expression.lnk | : | jmp | expression.ent | |||
353 | 3084 | 1006117 | jmp | L3136.3 | ;-> | @3084 | ||||
354 | 3084+ | ; | ||||||||
355 | 3084+ | .bother: | ; | |||||||
356 | 3084+ | 1026012 | jn | .bconst | ;constant | |||||
357 | 3085 | call | ; | |||||||
357+1 | 3085 | 7323761005070 | lnk | TestArithOp.lnk | : | jmp | TestArithOp.ent | |||
358 | 3086 | 1046012 | jz | .bconst | ; | @3086 | ||||
359 | 3086+ | 1004772 | jmp | error2 | ;error | |||||
360 | 3087 | ; | ||||||||
361 | 3087 | .bnest: | ; | |||||||
362 | 3087 | call | ; | |||||||
362+1 | 3087 | 7326605006126 | lnk | L3158.lnk | : | jmp | L3158.ent | |||
363 | 3088 | 0600600 | lod | token | ; | @3088 | ||||
364 | 3088+ | 0124327 | sub | K48 | ;=48 [)] | |||||
365 | 3089 | 1046022 | jz | .bterm | ; | |||||
366 | 3089+ | 1105140 | jmp | _err26 | ; | |||||
367 | 3090 | ; | ||||||||
368 | 3090 | .bterm: | ; | |||||||
369 | 3090 | call | ; | @3090 | ||||||
369+1 | 3090 | 7322411004503 | lnk | advance.lnk | : | jmp | advance.ent | |||
370 | 3091 | 0604322 | lod | TBool | ; | |||||
371 | 3091+ | 0205545 | exa | W2917 | ; | |||||
372 | 3092 | 0124322 | sub | TBool | ; | @3092 | ||||
373 | 3092+ | 1045073 | jz | Pop1 | ;return via stack | |||||
374 | 3093 | call | ; | |||||||
374+1 | 3093 | 7323761005070 | lnk | TestArithOp.lnk | : | jmp | TestArithOp.ent | |||
375 | 3094 | 1026117 | jn | L3136.3 | ; | @3094 | ||||
376 | 3094+ | 0040000 | o02 | 0 | ;=1 | |||||
377 | 3095 | 2710646600000 | o27 | stkp | / | lod | 0 | ; | ||
378 | 3096 | 0404303 | sto | W2243 | ; | @3096 | ||||
379 | 3096+ | 0604347 | lod | K4a | ;=4 | |||||
380 | 3097 | 0404300 | sto | W2240 | ; | |||||
381 | 3097+ | pad | ; | |||||||
381+1 | 3097+ | 0000000 | 00 | 0 | ||||||
382 | 3098 | call | ; | @3098 | ||||||
382+1 | 3098 | 7323131004627 | lnk | expression.lnk | : | jmp | expression.ent | |||
383 | 3099 | 1006117 | jmp | L3136.3 | ; | |||||
384 | 3099+ | pad | ; | |||||||
384+1 | 3099+ | 0000000 | 00 | 0 | ||||||
385 | 3100 | ; | ||||||||
386 | 3100 | .bnot: | ; | |||||||
387 | 3100 | call | ; | @3100 | ||||||
387+1 | 3100 | 7322411004503 | lnk | advance.lnk | : | jmp | advance.ent | |||
388 | 3101 | call | ; | |||||||
388+1 | 3101 | 7326605005760 | lnk | TBoolVar.lnk | : | jmp | TBoolVar.ent | |||
389 | 3102 | 1026043 | jn | .3107 | ; | @3102 | ||||
390 | 3102+ | 0603427 | lod | idptr | ; | |||||
391 | 3103 | call | ; | |||||||
391+1 | 3103 | 7323731005012 | lnk | push.lnk | : | jmp | push.ent | |||
392 | 3104 | call | ; | @3104 | ||||||
392+1 | 3104 | 7323731005037 | lnk | GenLoad0.lnk | : | jmp | GenLoad0.ent | |||
393 | 3105 | call | ; | |||||||
393+1 | 3105 | 7322411004503 | lnk | advance.lnk | : | jmp | advance.ent | |||
394 | 3106 | .3106: | ; | |||||||
395 | 3106 | 0603501 | lod | GPs+28 | ; | @3106 | ||||
396 | 3106+ | 1006123 | jmp | L3136.6 | ; | |||||
397 | 3107 | ; | ||||||||
398 | 3107 | .3107: | call | ; | ||||||
398+1 | 3107 | 7326605006002 | lnk | BoolPrim.lnk | : | jmp | BoolPrim.ent | |||
399 | 3108 | 1006042 | jmp | .3106 | ; | @3108 | ||||
400 | 3108+ | pad | ; | |||||||
400+1 | 3108+ | 0000000 | 00 | 0 | ||||||
401 | 3109 | ; | ||||||||
402 | 3109 | ;L3109:: | ||||||||
403 | 3109 | ; | ||||||||
404 | 3109 | L3109.ent: | ; | |||||||
405 | 3109 | 0010646577777 | o00 | stkp | / | lod | -1 | ; | ||
406 | 3110 | 0404031 | sto | IdInfo | ; | @3110 | ||||
407 | 3110+ | 0064324 | and | T_Mask | ;=00700000000000 | |||||
408 | 3111 | 0164322 | bus | TBool | ; | |||||
409 | 3111+ | 1126053 | jn | .3115P | ; | |||||
410 | 3112 | 0010646577775 | o00 | stkp | / | lod | -3 | ; | @3112 | |
411 | 3113 | 1046055 | jz | .3117 | ; | |||||
412 | 3113+ | 0405543 | sto | W2915 | ; | |||||
413 | 3114 | 0064324 | and | T_Mask | ;=00700000000000 | @3114 | ||||
414 | 3114+ | 0124322 | sub | TBool | ; | |||||
415 | 3115 | 1046056 | jz | .3118 | ; | |||||
416 | 3115+ | .3115P: | ; | |||||||
417 | 3115+ | 0604357 | lod | W2287 | ; | |||||
418 | 3116 | _err38: | ; | |||||||
419 | 3116 | 1661044 | lnk | errlnk | ;error 38: illegal operator in boolex | @3116 | ||||
420 | 3116+ | 1001070 | jmp | Error | ;call error routine | |||||
421 | 3117 | .3117: | ; | |||||||
422 | 3117 | 0605574 | lod | compbool.cont | ; | |||||
423 | 3117+ | 1006054 | jmp | _err38 | ; | |||||
424 | 3118 | ; | ||||||||
425 | 3118 | 0605543 | .3118: | lod | W2915 | ; | @3118 | |||
426 | 3118+ | 0064345 | and | W2277 | ; | |||||
427 | 3119 | 1046062 | jz | .3122 | ; | |||||
428 | 3119+ | 0605543 | lod | W2915 | ; | |||||
429 | 3120 | 0404031 | sto | IdInfo | ; | @3120 | ||||
430 | 3120+ | 0604322 | lod | TBool | ; | |||||
431 | 3121 | 0010646377775 | o00 | stkp | / | sto | -3 | ; | ||
432 | 3122 | .3122: | ; | |||||||
433 | 3122 | 0604031 | lod | IdInfo | ; | @3122 | ||||
434 | 3122+ | 0000000 | o00 | 0 | ; | |||||
435 | 3123 | call | ; | |||||||
435+1 | 3123 | 7323761005051 | lnk | FreeTemp.lnk | : | jmp | FreeTemp.ent | |||
436 | 3124 | 0010646577776 | o00 | stkp | / | lod | -2 | ; | @3124 | |
437 | 3125 | 0165550 | bus | W2920 | ; | |||||
438 | 3125+ | 1026055 | jn | .3117 | ; | |||||
439 | 3126 | 0164341 | bus | K3a | ;=3 | @3126 | ||||
440 | 3126+ | 1026055 | jn | .3117 | ; | |||||
441 | 3127 | 2026616606074 | sto | W2915 | / | lod | Tab3132 | ; | ||
442 | 3128 | 1046055 | jz | .3117 | ; | @3128 | ||||
443 | 3128+ | 0000000 | o00 | 0 | ; | |||||
444 | 3129 | call | ; | |||||||
444+1 | 3129 | 7320121004032 | lnk | gencode1.lnk | : | jmp | gencode1.ent | |||
445 | 3130 | 0604340 | lod | K2b | ;=2 | @3130 | ||||
446 | 3130+ | 0562151 | o27 | stkp | ; | |||||
447 | 3131 | ret | ; | |||||||
447+1 | 3131 | 0026607000001 | o00 | BoolPrim.lnk | / | jmp | 1 | |||
448 | 3132 | ; | ||||||||
449 | 3132 | Tab3132: | ; | |||||||
450 | 3132 | 0000000000046 | +38 | |||||||
451 | 3133 | 0000000000000 | +0 | |||||||
452 | 3134 | 0000000000036 | +30 | |||||||
453 | 3135 | 0000000000035 | +29 | |||||||
454 | 3136 | ;-------------------------------------------------------------------- | ||||||||
455 | 3136 | ; | ||||||||
456 | 3136 | L3136:: | ; | |||||||
457 | 3136 | ; | ||||||||
458 | 3136 | L3136.ent: | ; | |||||||
459 | 3136 | 0605541 | lod | .lnk | ; | @3136 | ||||
460 | 3136+ | 0545230 | cls | W2712 | ; | |||||
461 | 3137 | call | ; | |||||||
461+1 | 3137 | 7323731005012 | lnk | push.lnk | : | jmp | push.ent | |||
462 | 3138 | call | ; | @3138 | ||||||
462+1 | 3138 | 7325115005260 | lnk | compif.lnk | : | jmp | compif.ent | |||
463 | 3139 | 1006105 | jmp | .1 | ; | |||||
464 | 3139+ | ; | ||||||||
465 | 3139+ | pad | ; | |||||||
465+1 | 3139+ | 0000000 | 00 | 0 | ||||||
466 | 3140 | 0000000000000 | +0 | ; | @3140 | |||||
467 | 3141 | ; | ||||||||
468 | 3141 | .1: | ; | |||||||
469 | 3141 | call | ; | |||||||
469+1 | 3141 | 7326605006127 | lnk | L3159.lnk | : | jmp | L3159.ent | |||
470 | 3142 | 0600600 | lod | token | ; | @3142 | ||||
471 | 3142+ | 0124370 | sub | W2296 | ; | |||||
472 | 3143 | 1146124 | jz | .7 | ; | |||||
473 | 3143+ | 1105236 | jmp | _err28 | ; | |||||
474 | 3144 | ; | ||||||||
475 | 3144 | .2: | ; | |||||||
476 | 3144 | 0544300 | cls | W2240 | ; | @3144 | ||||
477 | 3144+ | 0604335 | lod | W2269 | ; | |||||
478 | 3145 | call | ; | |||||||
478+1 | 3145 | 7320121004032 | lnk | gencode1.lnk | : | jmp | gencode1.ent | |||
479 | 3146 | 0444300 | inc | W2240 | ; | @3146 | ||||
480 | 3146+ | 0605545 | lod | W2917 | ; | |||||
481 | 3147 | 0124322 | sub | TBool | ; | |||||
482 | 3147+ | 1046121 | jz | .4 | ; | |||||
483 | 3148 | call | ; | @3148 | ||||||
483+1 | 3148 | 7323131004627 | lnk | expression.lnk | : | jmp | expression.ent | |||
484 | 3149 | pad | ; | |||||||
484+1 | 3149 | 0000000 | 00 | 0 | ||||||
485 | 3149+ | 0604346 | lod | W2278 | ; | |||||
486 | 3150 | call | ; | @3150 | ||||||
486+1 | 3150 | 7320121004032 | lnk | gencode1.lnk | : | jmp | gencode1.ent | |||
487 | 3151 | .3: | ; | |||||||
488 | 3151 | call | ; | |||||||
488+1 | 3151 | 7326605005672 | lnk | BoolComp.lnk | : | jmp | BoolComp.ent | |||
489 | 3152 | 1005073 | jmp | Pop1 | ;return via stack | @3152 | ||||
490 | 3152+ | pad | ||||||||
490+1 | 3152+ | 0000000 | 00 | 0 | ||||||
491 | 3153 | ; | ||||||||
492 | 3153 | .4: | ; | |||||||
493 | 3153 | call | ; | |||||||
493+1 | 3153 | 7326605005553 | lnk | compbool.lnk | : | jmp | compbool.ent | |||
494 | 3154 | pad | ; | @3154 | ||||||
494+1 | 3154 | 0000000 | 00 | 0 | ||||||
495 | 3154+ | .5: | ; | |||||||
496 | 3154+ | 0603474 | lod | GPs+23 | ;=04000000000014 | |||||
497 | 3155 | .6: | ; | |||||||
498 | 3155 | call | ; | |||||||
498+1 | 3155 | 7320121004033 | lnk | gencode.lnk | : | jmp | gencode.ent | |||
499 | 3156 | 1005073 | jmp | Pop1 | ;return via stack | @3156 | ||||
500 | 3156+ | ; | ||||||||
501 | 3156+ | .7: | ; | |||||||
502 | 3156+ | 0040000 | o02 | 0 | ;=1 | |||||
503 | 3157 | 0562151 | o27 | stkp | ; | |||||
504 | 3157+ | 1006110 | jmp | .2 | ; | |||||
505 | 3158 | ;-------------------------------------------------------------------- |