-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path4B89.asm
73 lines (66 loc) · 2.04 KB
/
4B89.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
*Title Disassembling CGEN.COM Hi-Tech C v3.09
*Heading Checking recreated code with original
; File - 4B89.asm Created 09.03.2019 Last Modified 31.01.2021
;=========================================================
; sub_4B89 OK++
;
; Restored function sub_4B89 is assigned the uchar type to avoid
; casting type when it is called in other functions (sub_4C12,
; sub_54B6) and generating code corresponding to binary image.
; For this reason, return value is passed in register "l".
;=========================================================
global _sub_4B89 ; global _sub_4B89
global ncsv,cret,indir ; global ncsv, cret, indir
global _dopetab ; global _dopetab
global csv
psect text
; Disassembled version ; After compiling C source code
_sub_4B89:
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 de,_dopetab ; ld de,_dopetab
ld l,(iy+0) ; ld l,(iy+0)
ld h,0 ; ld h,0
add hl,hl ; add hl,hl
add hl,de ; add hl,de
ld c,(hl) ; ld c,(hl)
inc hl ; inc hl
ld b,(hl) ; ld b,(hl)
bit 4,c ; bit 4,c
jr nz,loc_4BDF ; jp nz,L3 <----+ Different
ld a,(iy+0) ; ld a,(iy+0) : jump
cp 9 ; cp 9 : address
jr nz,loc_4BB8 ; jp nz,L1 :
ld l,(iy+25) ; ld l,(iy+25) :
ld h,(iy+26) ; ld h,(iy+26) :
ld a,(hl) ; ld a,(hl) :
cp 66 ; cp 66 :
jr z,loc_4BDF ; jp z,L3 <----+
loc_4BB8: ;L1: :
ld a,(iy+0) ; ld a,(iy+0) :
cp 14 ; cp 14 :
jr nz,loc_4BD9 ; jp nz,l14 <----+
ld l,(iy+27) ; ld l,(iy+27) :
ld h,(iy+28) ; ld h,(iy+28) :
ld a,(hl) ; ld a,(hl) :
cp 67 ; cp 67 :
jr nz,loc_4BD9 ; jp nz,l14 <----+
ld l,(iy+25) ; ld l,(iy+25)
ld h,(iy+26) ; ld h,(iy+26)
push hl ; push hl
call _sub_4B89 ; call _sub_4B89
pop bc ; pop bc
ld a,l ; ld a,l ; Different
or a ; or a ; conditions and
jr nz,loc_4BDF ; jp z,l14 <----+ jump address
loc_4BD9: ;L3:
ld hl,0 ; ld l,1 <----+ Different
jp cret ; jp cret : assigned
loc_4BDF: ;l14: : values
ld hl,1 ; ld l,0 <----+
jp cret ; jp cret
; End of function sub_4B89 OK+
; End of file 4B89.as