-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path385B.asm
391 lines (358 loc) · 9.23 KB
/
385B.asm
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
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
*Title Disassembling CGEN.COM Hi-Tech C v3.09
*Heading Checking recreated code with original
; File - 385B.asm Created 09.03.2019 Last Modified 31.01.2021
;=========================================================
; sub_385B OK++
;=========================================================
global _sub_385B ; global _sub_385B
global ncsv,cret,indir ; global ncsv, cret, indir
global csv ; global csv
psect text
; Disassembled version ; After compiling C source code
_sub_385B:
call csv ; call csv
ld l,(ix+6) ; ld l,(ix+6)
ld h,(ix+7) ; ld h,(ix+7)
push hl ; push hl
pop iy ; pop iy
ld l,(iy+21) ; ld l,(iy+15h)
ld h,(iy+22) ; ld h,(iy+16h)
add hl,hl ; add hl,hl
add hl,hl ; add hl,hl
set 0,l ; set 0,l
ld (iy+21),l ; ld (iy+15h),l
ld (iy+22),h ; ld (iy+16h),h
jp cret ; jp cret
; End of function sub_385B OK++
;=========================================================
; sub_387A OK++
;=========================================================
global _sub_387A ; global _sub_387A
global _sub_37ED ; global _sub_37ED
global _nodesize ; global _nodesize
global csv ; global csv
; Disassembled version ; After compiling C source code
_sub_387A:
call csv ; call csv
push hl ; push hl
ld l,(ix+6) ; ld l,(ix+6)
ld h,(ix+7) ; ld h,(ix+7)
push hl ; push hl
pop iy ; pop iy
ld a,(iy+15h) ; ld a,(iy+21)
or (iy+16h) ; or (iy+22)
jr nz,loc_38AD ; jp nz,l14
ld e,(iy+17h) ; ld e,(iy+23)
ld d,(iy+18h) ; ld d,(iy+24)
ld hl,0Fh ; ld hl,15
add hl,de ; add hl,de
ld a,(hl) ; ld a,(hl)
inc hl ; inc hl
or (hl) ; or (hl)
jr nz,loc_38AD ; jp nz,l14
ld hl,0Dh ; ld hl,13
add hl,de ; add hl,de
ld a,(hl) ; ld a,(hl)
inc hl ; inc hl
or (hl) ; or (hl)
jr nz,loc_38AD ; jp nz,l14
ld hl,1 ; ld hl,1
jp cret ; jp cret
loc_38AD: ;l14:
push iy ; push iy
call _sub_37ED ; call _sub_37ED
pop bc ; pop bc
push iy ; push iy
call _nodesize ; call _nodesize
pop bc ; pop bc
ld (ix+-1),l ; ld (ix+-1),l
push iy ; push iy
call _sub_385B ; call _sub_385B
pop bc ; pop bc
ld l,(ix+-1) ; ld l,(ix+-1)
ld h, 0 ; ld h,0
jp cret ; jp cret
; End of function sub_387A OK++
;=========================================================
; sub_38CA OK++
;=========================================================
global _sub_38CA ; global _sub_38CA
global csv ; global csv
; Disassembled version ; After compiling C source code
_sub_38CA:
call csv ; call csv
ld e,(ix+6) ; ld e,(ix+6)
ld d,(ix+7) ; ld d,(ix+7)
ld hl,15h ; ld hl,21
add hl,de ; add hl,de
ld c,(hl) ; ld c,(hl)
inc hl ; inc hl
ld b,(hl) ; ld b,(hl)
ld a,c ; ld a,c
and (ix+8) ; and (ix+8)
ld l,a ; ld l,a
ld a,b ; ld a,b
and (ix+9) ; and (ix+9)
ld h,a ; ld h,a
ld a,l ; ld a,l
or h ; or h
jr z,loc_38EE ; jp z,l18
loc_38E8: ;L1:
ld hl,1 ; ld hl,1
jp cret ; jp cret
loc_38EE: ;l18:
ld e,(ix+6) ; ld e,(ix+6)
ld d,(ix+7) ; ld d,(ix+7)
ld hl,15h ; ld hl,21
add hl,de ; add hl,de
ld a, (hl) ; ld a,(hl)
inc hl ; inc hl
or (hl) ; or (hl)
jr z,loc_3903 ; jp z,l19
loc_38FD: ;L3:
ld hl,0 ; ld hl,0
jp cret ; jp cret
loc_3903: ;l19:
ld e,(ix+6) ; ld e,(ix+6)
ld d,(ix+7) ; ld d,(ix+7)
ld hl,17h ; ld hl,23
add hl,de ; add hl,de
ld c,(hl) ; ld c,(hl)
inc hl ; inc hl
ld b,(hl) ; ld b,(hl)
push bc ; push bc
pop iy ; pop iy
loc_3913: ;l22:
ld a,(iy+0Dh) ; ld a,(iy+13)
and (ix+8) ; and (ix+8)
ld l,a ; ld l,a
ld a,(iy+0Eh) ; ld a,(iy+14)
and (ix+9) ; and (ix+9)
ld h,a ; ld h,a
ld a,l ; ld a,l
or h ; or h
jr nz,loc_38E8 ; jp nz,L1
ld a,(iy+0Dh) ; ld a,(iy+13)
or (iy+0Eh) ; or (iy+14)
jr nz,loc_38FD ; jp nz,L3
ld l,(iy+0Fh) ; ld l,(iy+15)
ld h,(iy+10h) ; ld h,(iy+16)
push hl ; push hl
pop iy ; pop iy
ld a,l ; ld a,l
or h ; or h
jr nz,loc_3913 ; jp nz,l22
jr loc_38FD ; jp L3
; End of function sub_38CA OK++
;=========================================================
; sub_393C OK++
;=========================================================
global csv ; global csv
global _sub_393C ; global _sub_393C
; Disassembled version ; After compiling C source code
_sub_393C:
call csv ; call csv
ld hl,1 ; ld hl,1
push hl ; push hl
ld l,(ix+6) ; ld l,(ix+6)
ld h,(ix+7) ; ld h,(ix+7)
push hl ; push hl
call _sub_38CA ; call _sub_38CA
pop bc ; pop bc
pop bc ; pop bc
jp cret ; jp cret
; End of function sub_393C OK++
;=========================================================
; sub_33952 OK++
;=========================================================
global csv ; global csv
global _sub_3952 ; global _sub_3952
; Disassembled version ; After compiling C source code
_sub_3952:
call csv ; call csv
ld hl,2 ; ld hl,2
push hl ; push hl
ld l,(ix+6) ; ld l,(ix+6)
ld h,(ix+7) ; ld h,(ix+7)
push hl ; push hl
call _sub_38CA ; call _sub_38CA
pop bc ; pop bc
pop bc ; pop bc
jp cret ; jp cret
; End of function sub_3952 OK++
;=========================================================
; sub_3968 OK++
;=========================================================
global _sub_3968 ; global _sub_3968
global csv ; global csv
; Disassembled version ; After compiling C source code
_sub_3968:
call csv ; call csv
ld l,(ix+6) ; ld l,(ix+6)
ld h,(ix+7) ; ld h,(ix+7)
push hl ; push hl
pop iy ; pop iy
ld l,(iy+17h) ; ld l,(iy+23)
ld h,(iy+18h) ; ld h,(iy+24)
inc hl ; inc hl
inc hl ; inc hl
ld a,(hl) ; ld a,(hl)
cp 37h ; cp 55
jr nz,loc_398D ; jp nz,l28
bit 0,(iy+15h) ; bit 0,(iy+21)
jr nz,loc_398D ; jp nz,l28
ld hl,1 ; ld hl,1
jp cret ; jp cret
loc_398D: ;l28:
ld hl,0 ; ld hl,0
jp cret ; jp cret
; End of function sub_3968 OK++
;=========================================================
; nodesize OK++
;=========================================================
global csv ; global csv
global _uerror ; global _uerror
; Disassembled version ; After compiling C source code
_nodesize:
call csv ; call csv
ld l,(ix+6) ; ld l,(ix+6)
ld h,(ix+7) ; ld h,(ix+7)
push hl ; push hl
pop iy ; pop iy
bit 1,(iy+15h) ; bit 1,(iy+21)
jr z,loc_39AD ; jp z,l31
ld hl,19f ; ld hl,19f
push hl ; push hl
call _uerror ; call _uerror
pop bc ; pop bc
loc_39AD: ;l31:
bit 0,(iy+15h) ; bit 0,(iy+21)
jr z,loc_39B9 ; jp z,l32
ld hl,2 ; ld hl,2
jp cret ; jp cret
loc_39B9: ;l32:
ld e,(iy+17h) ; ld e,(iy+23)
ld d,(iy+18h) ; ld d,(iy+24)
ld hl,9 ; ld hl,9
add hl,de ; add hl,de
ld a,(hl) ; ld a,(hl)
inc hl ; inc hl
ld h,(hl) ; ld h,(hl)
ld l,a ; ld l,a
jp cret ; jp cret
; End of function nodesize OK++
;=========================================================
; sub_39CA OK++
;=========================================================
global _sub_39CA ; global _sub_39CA
global _sub_36E0 ; global _sub_36E0
global _sub_14F3 ; global _sub_14F3
global _sprintf ; global _sprintf
global _allocmem ; global _allocmem
global _strlen ; global _strlen
global _strcpy ; global _strcpy
global _sub_174C ; global _sub_174C
global _sub_3A79 ; global _sub_3A79
; Disassembled version ; After compiling C source code
_sub_39CA:
call ncsv ; call ncsv
defw 0FFCEh ; defw -34
ld l,(ix+6) ; ld l,(ix+6)
ld h,(ix+7) ; ld h,(ix+7)
push hl ; push hl
pop iy ; pop iy
ld l,(iy+1Bh) ; ld l,(iy+27)
ld h,(iy+1Ch) ; ld h,(iy+28)
push hl ; push hl
call _sub_36E0 ; call _sub_36E0
pop bc ; pop bc
push iy ; push iy
call _sub_14F3 ; call _sub_14F3
pop bc ; pop bc
ld a,l ; ld a,l
cp 3 ; cp 3
jr nz,loc_3A5C ; jp nz,l34
ld e,(iy+19h) ; ld e,(iy+25)
ld d,(iy+1Ah) ; ld d,(iy+26)
ld hl,19h ; ld hl,25
add hl,de ; add hl,de
ld e,(hl) ; ld e,(hl)
inc hl ; inc hl
ld d,(hl) ; ld d,(hl)
inc hl ; inc hl
ld a,(hl) ; ld a,(hl)
inc hl ; inc hl
ld h,(hl) ; ld h,(hl)
ld l,a ; ld l,a
push hl ; push hl
push de ; push de
ld hl,29f ; ld hl,29f
push hl ; push hl
push ix ; push ix
pop de ; pop de
ld hl,0FFCEh ; ld hl,-34
add hl,de ; add hl,de
push hl ; push hl
call _sprintf ; call _sprintf
pop bc ; pop bc
pop bc ; pop bc
pop bc ; pop bc
ld l,(iy+19h) ; ld l,(iy+25)
ld h,(iy+1Ah) ; ld h,(iy+26)
ex (sp),hl ; ex (sp),hl
call _sub_36E0 ; call _sub_36E0
push ix ; push ix
pop de ; pop de
ld hl,0FFCEh ; ld hl,-34
add hl,de ; add hl,de
ex (sp),hl ; ex (sp),hl
call _strlen ; call _strlen
pop bc ; pop bc
inc hl ; inc hl
push hl ; push hl
call _allocmem ; call _allocmem
ld (iy+19h),l ; ld (iy+25),l
ld (iy+1Ah),h ; ld (iy+26),h
push ix ; push ix
pop de ; pop de
ld hl,0FFCEh ; ld hl,-34
add hl,de ; add hl,de
ex (sp),hl ; ex (sp),hl
ld l,(iy+19h) ; ld l,(iy+25)
ld h,(iy+1Ah) ; ld h,(iy+26)
push hl ; push hl
call _strcpy ; call _strcpy
pop bc ; pop bc
pop bc ; pop bc
call _sub_174C ; call _sub_174C
ld (iy+1Bh),l ; ld (iy+27),l
ld (iy+1Ch),h ; ld (iy+28),h
ld (iy+0),44h ; ld (iy+0),68
push iy ; push iy
pop hl ; pop hl
jp cret ; jp cret
loc_3A5C: ;l34:
ld l,(iy+19h) ; ld l,(iy+25)
ld h,(iy+1Ah) ; ld h,(iy+26)
push hl ; push hl
push iy ; push iy
call _sub_3A79 ; call _sub_3A79
pop bc ; pop bc
pop bc ; pop bc
push iy ; push iy
call _sub_36E0 ; call _sub_36E0
pop bc ; pop bc
ld l,(iy+19h) ; ld l,(iy+25)
ld h,(iy+1Ah) ; ld h,(iy+26)
jp cret ; jp cret
; End of function sub_39CA OK++
psect data
p_nodesize_1:
19:
defb 99,97,110,39,116,32,116,97,107,101,32,115,105,122,101,111
defb 102,32,102,117,110,99,0
p_39ca_1:
29:
defb 37,108,100,46,0
psect text
; End of file 385B.asm