tests
This commit is contained in:
15
kern.c
15
kern.c
@@ -22,6 +22,13 @@
|
||||
|
||||
#include "net.h"
|
||||
|
||||
#if defined(__WATCOMC__)
|
||||
#define KERN_C_CALL _Cdecl
|
||||
#else
|
||||
#define KERN_C_CALL
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
unsigned int in_ax;
|
||||
unsigned int in_bx;
|
||||
@@ -58,7 +65,7 @@ NET_CALL_C_DEBUG Net_Call_C_Last;
|
||||
* Do not use it blindly for NCP87 yet; the previous F257 test hung through
|
||||
* the old wrapper, so we will first test old calls and register layout.
|
||||
*/
|
||||
int KERN_CALL Net_Call_C(unsigned int ax, void *req, void *repl)
|
||||
int KERN_C_CALL Net_Call_C(unsigned int ax, void *req, void *repl)
|
||||
{
|
||||
return Net_Call_CX(ax, 0, 0, 0, req, repl);
|
||||
}
|
||||
@@ -67,7 +74,7 @@ int KERN_CALL Net_Call_C(unsigned int ax, void *req, void *repl)
|
||||
* Extended variant with BX/CX/DX settable. This lets us experiment without
|
||||
* changing kern.asm every time.
|
||||
*/
|
||||
int KERN_CALL Net_Call_CX(unsigned int ax, unsigned int bx,
|
||||
int KERN_C_CALL Net_Call_CX(unsigned int ax, unsigned int bx,
|
||||
unsigned int cx, unsigned int dx,
|
||||
void *req, void *repl)
|
||||
{
|
||||
@@ -120,7 +127,7 @@ int KERN_CALL Net_Call_CX(unsigned int ax, unsigned int bx,
|
||||
* Text dump for quick testing. Later we can expose this through DEBUG.EXE
|
||||
* as "debug netcall" or similar.
|
||||
*/
|
||||
void KERN_CALL Net_Call_C_Dump(void)
|
||||
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",
|
||||
Net_Call_C_Last.in_ax,
|
||||
@@ -151,7 +158,7 @@ void KERN_CALL Net_Call_C_Dump(void)
|
||||
* 8 out_ax 9 out_bx 10 out_cx 11 out_dx
|
||||
* 12 out_si 13 out_di 14 out_flags 15 rc
|
||||
*/
|
||||
UI KERN_CALL Net_Call_C_GetDebug(UI idx)
|
||||
UI KERN_C_CALL Net_Call_C_GetDebug(UI idx)
|
||||
{
|
||||
switch (idx) {
|
||||
case 0: return Net_Call_C_Last.in_ax;
|
||||
|
||||
Reference in New Issue
Block a user