tests
This commit is contained in:
23
kern.c
23
kern.c
@@ -136,10 +136,8 @@ int KERN_C_CALL Net_Call_CX(unsigned int ax, unsigned int bx,
|
||||
* int 21h
|
||||
*
|
||||
* Return convention mirrors Novell wrapper and old kern.asm Net_Call:
|
||||
* if AL != 0, AH is set to 89h in Net_Call_F2_C_Last.out_ax
|
||||
* return AL only
|
||||
*/
|
||||
int KERN_C_CALL Net_Call_F2_C(UI conn, UI function, UI cx, void *req, void *repl)
|
||||
int KERN_C_CALL Net_Call_F2_C(UI function, UI req_len, UI repl_len,
|
||||
void *req, void *repl)
|
||||
{
|
||||
union REGS inregs;
|
||||
union REGS outregs;
|
||||
@@ -151,10 +149,19 @@ int KERN_C_CALL Net_Call_F2_C(UI conn, UI function, UI cx, void *req, void *repl
|
||||
memset(&segregs, 0, sizeof(segregs));
|
||||
memset(&Net_Call_C_Last, 0, sizeof(Net_Call_C_Last));
|
||||
|
||||
/*
|
||||
* Official FLAG.EXE wrapper shape:
|
||||
* AH = F2h
|
||||
* AL = NCP function, e.g. 57h for NCP 87
|
||||
* CX = request length
|
||||
* DX = reply buffer length
|
||||
* DS:SI = request buffer
|
||||
* ES:DI = reply buffer
|
||||
*/
|
||||
inregs.h.ah = 0xF2;
|
||||
inregs.h.al = (uint8)(function & 0xff);
|
||||
inregs.x.dx = conn;
|
||||
inregs.x.cx = cx;
|
||||
inregs.x.cx = req_len;
|
||||
inregs.x.dx = repl_len;
|
||||
inregs.x.si = FP_OFF(req);
|
||||
inregs.x.di = FP_OFF(repl);
|
||||
segregs.ds = FP_SEG(req);
|
||||
@@ -191,10 +198,6 @@ int KERN_C_CALL Net_Call_F2_C(UI conn, UI function, UI cx, void *req, void *repl
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Text dump for quick testing. Later we can expose this through DEBUG.EXE
|
||||
* as "debug netcall" or similar.
|
||||
*/
|
||||
void KERN_C_CALL Net_Call_C_Dump(void)
|
||||
{
|
||||
fprintf(stdout, "NETCALLC in : AX=%04X BX=%04X CX=%04X DX=%04X DS:SI=%04X:%04X ES:DI=%04X:%04X\n",
|
||||
|
||||
Reference in New Issue
Block a user