This commit is contained in:
Mario Fetka
2026-05-23 16:56:04 +02:00
parent 0d466ce30a
commit a080dfaa56
3 changed files with 124 additions and 3 deletions

View File

@@ -545,9 +545,11 @@ static UI tests_build_nwreq87_path_multi(uint8 *buf, uint8 dhandle,
static void tests_wait_key(void)
{
fprintf(stdout, "Strike any key when ready . . . ");
fprintf(stdout, "\nStrike any key when ready . . . ");
fflush(stdout);
getch();
fprintf(stdout, "\n");
fflush(stdout);
}
static int tests_nwreq87vlm_one(char *label, uint8 connid,
@@ -1110,7 +1112,6 @@ static int tests_nwreq87vlmfull(void)
fprintf(stdout, "drive=%c: connid=%u dhandle=%u flags=%02X\n",
'A' + drive, connid, dhandle, flags);
tests_dump_bytes("HDR:", hdr, 9);
tests_wait_key();
tests_build_novell_handle_path(path, dhandle, 0, 0, 1,
"LOGIN.EXE", 0, 0);
@@ -1128,6 +1129,64 @@ static int tests_nwreq87vlmfull(void)
}
static uint16 tests_get_word_lh(uint8 *p)
{
return (uint16)(p[0] | ((uint16)p[1] << 8));
}
static uint32 tests_get_dword_lh2(uint8 *p)
{
return ((uint32)p[0] |
((uint32)p[1] << 8) |
((uint32)p[2] << 16) |
((uint32)p[3] << 24));
}
static int tests_c32type(void)
{
uint8 out[32];
int rc;
uint16 ax;
uint32 esi;
uint32 ecx;
uint16 bx;
uint16 cx;
uint16 dx;
uint16 si;
memset(out, 0, sizeof(out));
fprintf(stdout, "TEST Client32/NIOS probe\n");
fprintf(stdout, "Call INT 2F AX=D8C1 like DeveloperNet dninit.asm\n\n");
rc = C32_LoadNios_Probe(0xD8C1, out);
ax = tests_get_word_lh(out + 0);
esi = tests_get_dword_lh2(out + 2);
ecx = tests_get_dword_lh2(out + 6);
bx = tests_get_word_lh(out + 10);
cx = tests_get_word_lh(out + 12);
dx = tests_get_word_lh(out + 14);
si = tests_get_word_lh(out + 16);
fprintf(stdout, "C32 probe rc=%04X\n", rc);
fprintf(stdout, "INT2F D8C1 result AX=%04X\n", ax);
fprintf(stdout, "ESI=%08lX ECX=%08lX\n", esi, ecx);
fprintf(stdout, "BX=%04X CX=%04X DX=%04X SI=%04X\n", bx, cx, dx, si);
tests_dump_bytes("RAW:", out, 20);
if (ax == 0) {
fprintf(stdout, "\nClient32/NIOS entry appears present.\n");
fprintf(stdout, "Next step: use these values to reproduce C32BEGINUSE/_C32REQUEST.\n");
} else {
fprintf(stdout, "\nClient32/NIOS D8C1 did not report success.\n");
fprintf(stdout, "Then VLM/NETX fallback remains the only path.\n");
}
return(0);
}
int func_tests(int argc, char *argv[], int mode)
{
if (argc >= 2) {
@@ -1137,6 +1196,9 @@ int func_tests(int argc, char *argv[], int mode)
if (tests_same_arg(argv[1], "E300") || tests_same_arg(argv[1], "NETCALLE300"))
return tests_netcall_e300();
if (tests_same_arg(argv[1], "C32TYPE"))
return tests_c32type();
if (tests_same_arg(argv[1], "NWREQ87"))
return tests_nwreq87(argc, argv);