tests
This commit is contained in:
@@ -21,6 +21,7 @@ public _IPXlisten
|
|||||||
public _xmemmove
|
public _xmemmove
|
||||||
public _Net_Call
|
public _Net_Call
|
||||||
public _C32_LoadNios_Probe
|
public _C32_LoadNios_Probe
|
||||||
|
public _C32_Call_ESI_Probe
|
||||||
public _Net_Call_VLM_Raw
|
public _Net_Call_VLM_Raw
|
||||||
|
|
||||||
_IPXinit proc far
|
_IPXinit proc far
|
||||||
|
|||||||
40
nwtests.c
40
nwtests.c
@@ -1182,6 +1182,43 @@ static int tests_c32type(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int tests_c32values(void)
|
||||||
|
{
|
||||||
|
uint8 out[32];
|
||||||
|
uint16 ax, bx, cx, dx, si, dsreg, esreg;
|
||||||
|
uint32 esi, ecx;
|
||||||
|
|
||||||
|
memset(out, 0, sizeof(out));
|
||||||
|
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);
|
||||||
|
dsreg = tests_get_word_lh(out + 18);
|
||||||
|
esreg = tests_get_word_lh(out + 20);
|
||||||
|
|
||||||
|
fprintf(stdout, "TEST C32VALUES\n");
|
||||||
|
fprintf(stdout, "AX=%04X ESI=%08lX ECX=%08lX\n", ax, esi, ecx);
|
||||||
|
fprintf(stdout, "BX=%04X CX=%04X DX=%04X SI=%04X DS=%04X ES=%04X\n",
|
||||||
|
bx, cx, dx, si, dsreg, esreg);
|
||||||
|
|
||||||
|
fprintf(stdout, "\nPointer interpretation:\n");
|
||||||
|
fprintf(stdout, "ESI as seg:off = %04lX:%04lX\n",
|
||||||
|
(esi >> 16) & 0xffff, esi & 0xffff);
|
||||||
|
fprintf(stdout, "ECX as seg:off = %04lX:%04lX\n",
|
||||||
|
(ecx >> 16) & 0xffff, ecx & 0xffff);
|
||||||
|
fprintf(stdout, "16-bit regs suggest entry offsets: SI=%04X DX=%04X CX=%04X\n",
|
||||||
|
si, dx, cx);
|
||||||
|
|
||||||
|
fprintf(stdout, "\nNext build will call C32BEGINUSE using these pointers.\n");
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int func_tests(int argc, char *argv[], int mode)
|
int func_tests(int argc, char *argv[], int mode)
|
||||||
{
|
{
|
||||||
if (argc >= 2) {
|
if (argc >= 2) {
|
||||||
@@ -1194,6 +1231,9 @@ int func_tests(int argc, char *argv[], int mode)
|
|||||||
if (tests_same_arg(argv[1], "C32TYPE"))
|
if (tests_same_arg(argv[1], "C32TYPE"))
|
||||||
return tests_c32type();
|
return tests_c32type();
|
||||||
|
|
||||||
|
if (tests_same_arg(argv[1], "C32VALUES"))
|
||||||
|
return tests_c32values();
|
||||||
|
|
||||||
if (tests_same_arg(argv[1], "NWREQ87"))
|
if (tests_same_arg(argv[1], "NWREQ87"))
|
||||||
return tests_nwreq87(argc, argv);
|
return tests_nwreq87(argc, argv);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user