This commit is contained in:
Mario Fetka
2026-05-23 21:23:26 +02:00
parent 5f3882f4e9
commit 3ee8490c0c
3 changed files with 365 additions and 0 deletions

View File

@@ -1867,6 +1867,71 @@ static int tests_c32mapvarmatrix(void)
}
static int tests_nwreq87c32raw5(int argc, char *argv[])
{
UI lo = 0;
UI hi = 0;
uint8 connid = 0;
uint8 dhandle = 0;
uint8 flags = 0;
int drive;
uint8 hdr[16];
uint8 path[0x140];
uint8 rep0[0x60];
uint8 rep1[0x110];
uint8 out[32];
UI path_len;
uint16 ret_ax, ret_dx, act_lo, act_hi;
if (argc > 2)
lo = (UI)atoi(argv[2]);
if (argc > 3)
hi = (UI)atoi(argv[3]);
drive = tests_get_current_drive();
get_drive_info((uint8)drive, &connid, &dhandle, &flags);
memset(hdr, 0, sizeof(hdr));
hdr[0] = 6;
hdr[1] = 0;
hdr[2] = 0;
tests_put_word_lh(hdr + 3, 0x0006);
tests_put_dword_lh(hdr + 5, 0x00000004UL);
path_len = tests_build_novell_handle_path(path, dhandle, 0, 0, 1,
"LOGIN.EXE", 0, 0);
memset(rep0, 0, sizeof(rep0));
memset(rep1, 0, sizeof(rep1));
memset(out, 0, sizeof(out));
fprintf(stdout, "TEST NWREQ87C32RAW5 conn32=%04X:%04X\n", hi, lo);
fprintf(stdout, "d32wrap-compatible 5-slot/0x28 frag tables\n");
fprintf(stdout, "drive=%c: connid=%u dhandle=%u flags=%02X path_len=%u\n",
'A' + drive, connid, dhandle, flags, path_len);
C32_NCP87_Raw5_Probe(lo, hi,
hdr, 9,
path, path_len,
rep0, 0x4d,
rep1, 0x100,
out);
ret_ax = tests_get_word_lh(out + 14);
ret_dx = tests_get_word_lh(out + 16);
act_lo = tests_get_word_lh(out + 18);
act_hi = tests_get_word_lh(out + 20);
fprintf(stdout, "Return DX:AX=%04X:%04X actual=%04X:%04X\n",
ret_dx, ret_ax, act_hi, act_lo);
tests_dump_bytes("OUT :", out, 22);
tests_dump_bytes("REP0:", rep0, 64);
tests_dump_bytes("REP1:", rep1, 64);
return(0);
}
int func_tests(int argc, char *argv[], int mode)
{
if (argc >= 2) {
@@ -1891,6 +1956,9 @@ int func_tests(int argc, char *argv[], int mode)
if (tests_same_arg(argv[1], "NWREQ87C32RAW"))
return tests_nwreq87c32raw(argc, argv);
if (tests_same_arg(argv[1], "NWREQ87C32RAW5"))
return tests_nwreq87c32raw5(argc, argv);
if (tests_same_arg(argv[1], "C32PRIMREF"))
return tests_c32primref();