From e5aa3a8b908e596494411f9f82d59f68165f0a24 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sat, 23 May 2026 13:23:47 +0200 Subject: [PATCH] tests --- kern.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/kern.c b/kern.c index 7f61048..44bbac2 100644 --- a/kern.c +++ b/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;