tests
This commit is contained in:
2
kern.h
2
kern.h
@@ -26,6 +26,8 @@ extern int KERN_CALL C32_NCP87_Raw_Probe(UI connLo, UI connHi,
|
||||
extern int KERN_CALL Net_Call_VLM_Raw(UI ax, UI bx, UI cx, UI dx,
|
||||
void *req, void *repl,
|
||||
UI p1, UI p2, UI p3);
|
||||
extern int KERN_CALL Net_Call_NWCVLMREQ(UI flags, void *regblk,
|
||||
UI p1, UI p2, UI p3);
|
||||
extern int KERN_CALL Net_Call_C(UI func, void *req, void *repl);
|
||||
extern int KERN_CALL Net_Call_CX(UI func, UI bx, UI cx, UI dx,
|
||||
void *req, void *repl);
|
||||
|
||||
113
kern_wasm.asm
113
kern_wasm.asm
@@ -26,6 +26,7 @@ public _C32_CallVersion_Nios_Probe
|
||||
public _C32_MapLock_Probe
|
||||
public _C32_NCP87_Raw_Probe
|
||||
public _Net_Call_VLM_Raw
|
||||
public _Net_Call_NWCVLMREQ
|
||||
|
||||
_IPXinit proc far
|
||||
push bp
|
||||
@@ -1045,4 +1046,116 @@ c32raw_name db 'COMPATNcpRequestReply',0
|
||||
_C32_NCP87_Raw_Probe endp
|
||||
|
||||
|
||||
; int Net_Call_NWCVLMREQ(UI flags, void *regblk, UI p1, UI p2, UI p3)
|
||||
;
|
||||
; 16-bit wrapper that reproduces the DeveloperNet NWCVLMREQ register-block
|
||||
; calling convention, but without using Novell globals.
|
||||
;
|
||||
; regblk layout, same as dvlmreq.o:
|
||||
; +00 SI
|
||||
; +02 DS
|
||||
; +04 DI
|
||||
; +06 ES
|
||||
; +08 AX
|
||||
; +0A BX
|
||||
; +0C CX
|
||||
; +0E DX
|
||||
;
|
||||
; It calls the VLM entry returned by INT 2F AX=7A20.
|
||||
; Stack args are pushed as p3,p2,p1, exactly like NWCVLMREQ.
|
||||
_Net_Call_NWCVLMREQ proc far
|
||||
push bp
|
||||
mov bp, sp
|
||||
sub sp, 4
|
||||
|
||||
push ds
|
||||
push si
|
||||
push di
|
||||
push es
|
||||
|
||||
mov ax, 7A20h
|
||||
xor bx, bx
|
||||
int 2Fh
|
||||
or ax, ax
|
||||
jz nwcvlm_found
|
||||
|
||||
mov ax, 88FFh
|
||||
jmp short nwcvlm_done
|
||||
|
||||
nwcvlm_found:
|
||||
; save VLM entry ES:BX in [bp-4]
|
||||
mov [bp-4], bx
|
||||
mov ax, es
|
||||
mov [bp-2], ax
|
||||
|
||||
les bx, dword ptr [bp+8] ; regblk
|
||||
|
||||
; Match NWCVLMREQ defaulting:
|
||||
; if !(flags & 2), set regblk.ES to current ES.
|
||||
; We normally pass flags=2, so this is skipped.
|
||||
test word ptr [bp+6], 2
|
||||
jne nwcvlm_skip_es
|
||||
mov ax, es
|
||||
mov word ptr es:[bx+6], ax
|
||||
nwcvlm_skip_es:
|
||||
|
||||
; if !(flags & 1), set regblk.DS to current DS.
|
||||
test word ptr [bp+6], 1
|
||||
jne nwcvlm_skip_ds
|
||||
mov ax, ds
|
||||
mov word ptr es:[bx+2], ax
|
||||
nwcvlm_skip_ds:
|
||||
|
||||
; Load target registers from regblk.
|
||||
mov ax, word ptr es:[bx+0Ah]
|
||||
push ax ; target BX
|
||||
mov ax, word ptr es:[bx+6]
|
||||
push ax ; target ES
|
||||
|
||||
mov ax, word ptr es:[bx+8]
|
||||
mov cx, word ptr es:[bx+0Ch]
|
||||
mov dx, word ptr es:[bx+0Eh]
|
||||
mov si, word ptr es:[bx+0]
|
||||
mov di, word ptr es:[bx+4]
|
||||
mov ds, word ptr es:[bx+2]
|
||||
|
||||
pop es
|
||||
pop bx
|
||||
|
||||
push word ptr [bp+10h] ; p3
|
||||
push word ptr [bp+0eh] ; p2
|
||||
push word ptr [bp+0ch] ; p1
|
||||
call dword ptr [bp-4]
|
||||
|
||||
; Store registers back into regblk.
|
||||
push bx
|
||||
push es
|
||||
|
||||
les bx, dword ptr [bp+8]
|
||||
mov word ptr es:[bx+8], ax
|
||||
pop ax
|
||||
mov word ptr es:[bx+6], ax
|
||||
pop ax
|
||||
mov word ptr es:[bx+0Ah], ax
|
||||
mov word ptr es:[bx+0Ch], cx
|
||||
mov word ptr es:[bx+0Eh], dx
|
||||
mov word ptr es:[bx+0], si
|
||||
mov word ptr es:[bx+4], di
|
||||
mov word ptr es:[bx+2], ds
|
||||
|
||||
mov ax, word ptr es:[bx+8]
|
||||
|
||||
nwcvlm_done:
|
||||
pop es
|
||||
pop di
|
||||
pop si
|
||||
pop ds
|
||||
|
||||
mov sp, bp
|
||||
pop bp
|
||||
ret
|
||||
_Net_Call_NWCVLMREQ endp
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user