This commit is contained in:
Mario Fetka
2026-05-23 20:49:59 +02:00
parent f07488978c
commit dcb52b8708
3 changed files with 336 additions and 0 deletions

View File

@@ -1711,6 +1711,52 @@ static int tests_c32scaniter(int argc, char *argv[])
}
static int tests_c32mapfull(void)
{
uint8 out[32];
uint16 load_ax, res_off, res_seg, tramp_off, tramp_seg;
uint16 fn_off, fn_seg, ret_ax, ret_dx;
uint16 result_lo, result_hi, cref_lo, cref_hi;
memset(out, 0, sizeof(out));
fprintf(stdout, "TEST C32MAPFULL\n");
fprintf(stdout, "Exact-ish w95mconn __C32MapConn16To32 scan step for server MARS\n");
C32_MapFull_Probe(out);
load_ax = tests_get_word_lh(out + 0);
res_off = tests_get_word_lh(out + 2);
res_seg = tests_get_word_lh(out + 4);
tramp_off = tests_get_word_lh(out + 6);
tramp_seg = tests_get_word_lh(out + 8);
fn_off = tests_get_word_lh(out + 10);
fn_seg = tests_get_word_lh(out + 12);
ret_ax = tests_get_word_lh(out + 14);
ret_dx = tests_get_word_lh(out + 16);
result_lo = tests_get_word_lh(out + 18);
result_hi = tests_get_word_lh(out + 20);
cref_lo = tests_get_word_lh(out + 22);
cref_hi = tests_get_word_lh(out + 24);
fprintf(stdout, "Load AX=%04X Resolver=%04X:%04X Tramp=%04X:%04X\n",
load_ax, res_seg, res_off, tramp_seg, tramp_off);
fprintf(stdout, "Function CONNScanInfo=%04X:%04X\n", fn_seg, fn_off);
fprintf(stdout, "Return DX:AX=%04X:%04X\n", ret_dx, ret_ax);
fprintf(stdout, "resultRef=%04X:%04X connRefLocal=%04X:%04X\n",
result_hi, result_lo, cref_hi, cref_lo);
tests_dump_bytes("OUT:", out, 26);
if (ret_ax == 0 && ret_dx == 0 && (result_lo || result_hi)) {
fprintf(stdout, "\nTry next:\n");
fprintf(stdout, " TESTS C32OPENREF %u %u\n", result_lo, result_hi);
fprintf(stdout, " TESTS NWREQ87C32RAW %u %u\n", result_lo, result_hi);
}
return(0);
}
int func_tests(int argc, char *argv[], int mode)
{
if (argc >= 2) {
@@ -1753,6 +1799,9 @@ int func_tests(int argc, char *argv[], int mode)
if (tests_same_arg(argv[1], "C32SCANITER"))
return tests_c32scaniter(argc, argv);
if (tests_same_arg(argv[1], "C32MAPFULL"))
return tests_c32mapfull();
if (tests_same_arg(argv[1], "NWREQ87C32MATRIX"))
return tests_nwreq87c32matrix();