Skip to content

Commit

Permalink
Update after code changes in holdec
Browse files Browse the repository at this point in the history
  • Loading branch information
rfalke committed Apr 6, 2023
1 parent a3720ac commit 6176c1d
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 4 deletions.
28 changes: 28 additions & 0 deletions from_holdec/i386_16bit_segment/ia32_mz/by_holdec_regtest.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Decompiled by holdec

// address: 00000000.0
// full-signature: func(F_00000000, return=[<int(undef, 2),null,reg[ax]>], parameter=[], varargs=false)
d2 F_00000000(void)
{
(void) F_0000003b();
(void) F_0000003c();
(void) msdos_terminateWithReturnCode(0);
// not reached
}

// address: 0000003b.0
// full-signature: func(F_0000003b, return=[<int(undef, 2),null,reg[ax]>], parameter=[], varargs=false)
d2 F_0000003b(void)
{
reg_a = msdos_consoleReadOrWrite(97);
return WIDEN(EXTRACT(reg_a, charRead)) | 0x600;
}

// address: 0000003c.0
// full-signature: func(F_0000003c, return=[<int(undef, 2),null,reg[ax]>], parameter=[], varargs=false)
d2 F_0000003c(void)
{
reg_a = msdos_consoleReadOrWrite(113);
return WIDEN(EXTRACT(reg_a, charRead)) | 0x600;
}

10 changes: 10 additions & 0 deletions from_holdec/i386_16bit_segment/ia32_mz/by_holdec_regtest.hints
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[activeFunctions]
0x000000
0x00003b
0x00003c

[dataRanges]
0x000021-0x00003b

[readOnlyRanges]
0x000021-0x00003b
28 changes: 28 additions & 0 deletions from_holdec/i386_16bit_segment/ia32_mz/by_holdec_regtest.verified
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Decompiled by holdec

// address: 00000000.0
// full-signature: func(F_00000000, return=[<int(undef, 2),null,reg[ax]>], parameter=[], varargs=false)
d2 F_00000000(void)
{
(void) F_0000003b();
(void) F_0000003c();
(void) msdos_terminateWithReturnCode(0);
// not reached
}

// address: 0000003b.0
// full-signature: func(F_0000003b, return=[<int(undef, 2),null,reg[ax]>], parameter=[], varargs=false)
d2 F_0000003b(void)
{
reg_a = msdos_consoleReadOrWrite(97);
return WIDEN(EXTRACT(reg_a, charRead)) | 0x600;
}

// address: 0000003c.0
// full-signature: func(F_0000003c, return=[<int(undef, 2),null,reg[ax]>], parameter=[], varargs=false)
d2 F_0000003c(void)
{
reg_a = msdos_consoleReadOrWrite(113);
return WIDEN(EXTRACT(reg_a, charRead)) | 0x600;
}

4 changes: 2 additions & 2 deletions from_pouet.net/with_source_087/ia32_com/by_holdec_regtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ d2 main(void)
reg_f = reg_var1 + 1;
reg_var1++;
} while(reg_f != 0);
reg_h = setVideoMode(19);
reg_h = msdos_setVideoMode(19);
reg_var3 = WIDEN(reg_h);
while(1) {
reg_var4 = 255;
Expand All @@ -27,7 +27,7 @@ d2 main(void)
reg_var7 = NARROW(reg_var6);
reg_v = reg_var4 & 0xff00 | 0xa0;
reg_var4 = 0;
(void) _holdec_memcpy2(UNSIGNED_EXTEND(reg_s), SEGMENT2ADDR(-24576) + UNSIGNED_EXTEND(reg_var5), reg_v * 2);
(void) _holdec_memcpy2(UNSIGNED_EXTEND(reg_s), UNSIGNED_EXTEND(reg_var5) + 655360, reg_v * 2);
reg_var5 += reg_v * 2;
} while(reg_var5 < -1536 || reg_var5 > -1);
reg_var3 = reg_var6a;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ d2 main(void)
reg_f = reg_var1 + 1;
reg_var1++;
} while(reg_f != 0);
reg_h = setVideoMode(19);
reg_h = msdos_setVideoMode(19);
reg_var3 = WIDEN(reg_h);
while(1) {
reg_var4 = 255;
Expand All @@ -27,7 +27,7 @@ d2 main(void)
reg_var7 = NARROW(reg_var6);
reg_v = reg_var4 & 0xff00 | 0xa0;
reg_var4 = 0;
(void) _holdec_memcpy2(UNSIGNED_EXTEND(reg_s), SEGMENT2ADDR(-24576) + UNSIGNED_EXTEND(reg_var5), reg_v * 2);
(void) _holdec_memcpy2(UNSIGNED_EXTEND(reg_s), UNSIGNED_EXTEND(reg_var5) + 655360, reg_v * 2);
reg_var5 += reg_v * 2;
} while(reg_var5 < -1536 || reg_var5 > -1);
reg_var3 = reg_var6a;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ signature: void copy_with_or(d2 src <si>, d2 dest <di>, d2 num_words <cx>, d1 va
[activeFunctions]
do_adlib_io
copy_with_or

[dataRanges]
0x000520-0x000949
0x00099b-0x000ef2

0 comments on commit 6176c1d

Please sign in to comment.