Skip to content

Commit

Permalink
Take Host If library in use. #149
Browse files Browse the repository at this point in the history
  • Loading branch information
frehwagen authored and Falk Rehwagen committed Jul 8, 2024
1 parent ad227f0 commit f9aaa5b
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 85 deletions.
1 change: 0 additions & 1 deletion Driver/Socket/HstTCPIP/hsttcpipManager.asm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ include sem.def
include Internal/heapInt.def
include Internal/im.def
include Internal/threadIn.def
include Internal/host.def

include file.def
include localize.def
Expand Down
40 changes: 9 additions & 31 deletions Driver/Socket/HstTCPIP/tcpipEntry.asm
Original file line number Diff line number Diff line change
Expand Up @@ -497,28 +497,6 @@ EC < Assert thread bx >
TcpipReceiveInterrupt endp


SetGeosConvention

TCPIPRECEIVESTOP proc far connection:word
;regs local PMRealModeRegister
uses cx, ax, ds
newBuffer local optr
.enter

mov cx, connection
mov bx, handle dgroup
call MemDerefES

EC < WARNING TCPIP_RECEIVE_STOP >

; close the socket on host side
mov ax, 1007
int GEOS_HOST_API
done:
.leave
ret
TCPIPRECEIVESTOP endp


TCPIPRECEIVESTART proc far connection:word
;regs local PMRealModeRegister
Expand Down Expand Up @@ -728,9 +706,9 @@ TcpipInit proc far
cmp ax, 0
je straightError

mov ax, 1
mov cx, 1
int GEOS_HOST_API
mov ax, HIF_CHECK
mov cx, 1 ; check function group networking
call HostIfCall

cmp ax, 0
jne error
Expand All @@ -740,8 +718,8 @@ TcpipInit proc far
;
segmov es, <segment ResidentCode>
mov bx, offset ResidentCode:TcpipReceiveInterrupt
mov ax, 2
int GEOS_HOST_API
mov ax, HIF_SET_RECEIVE_HANDLE
call HostIfCall

;
; Create the input queue.
Expand Down Expand Up @@ -850,8 +828,8 @@ TcpipExit proc far

clr bx
mov es, bx
mov ax, 2
int GEOS_HOST_API
mov ax, HIF_SET_RECEIVE_HANDLE
call HostIfCall

mov bx, handle dgroup
call MemDerefDS
Expand Down Expand Up @@ -1186,8 +1164,8 @@ EC < call ECCheckCallerThread >
EC < call ECCheckClientHandle >

;call TSocketCreateConnection ; ax = error or handle
mov ax, HF_NC_ALLOC_CONNECTION
int HOST_INT
mov ax, HIF_NC_ALLOC_CONNECTION
call HostIfCall
cmp bx, 0
je success
mov ax, SDE_INSUFFICIENT_MEMORY
Expand Down
2 changes: 1 addition & 1 deletion Driver/Socket/HstTCPIP/tcpipGlobal.def
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,4 @@ global TCPIPDHCPSTARTRENEW:far
global TCPIPDHCPTIMERHANDLER:far

global TCPIPRECEIVESTART:far
global TCPIPRECEIVESTOP:far

46 changes: 0 additions & 46 deletions Include/Internal/host.def

This file was deleted.

21 changes: 21 additions & 0 deletions Include/hostif.def
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,30 @@ EOF equ -1
SetGeosConvention

global HostIfDetect:far
;
; Detect if host interface is available and what version is supported.
;
; Pass: nothing
;
; Return: ax - version number or 0 for not host interface available
;

global HOSTIFDETECT:far

global HostIfCall:far
;
; Call an host interface method.
;
; Pass: ax - Interface function to call.
; si - data1 low (optional, depends on function called)
; bx - data1 high (optional, depends on function called)
; cx - data2 low (optional, depends on function called)
; dx - data2 high (optional, depends on function called)
; di - data3 (optional, depends on function called)
;
; Return: ax:dx - result (depends on function called, see function contract)
;

global HOSTIFCALL:far

HostIfFunctions etype word
Expand Down
10 changes: 5 additions & 5 deletions Installed/Driver/Socket/HstTCPIP/dependencies.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ hsttcpipManager.eobj: geos.def heap.def geode.def Internal/interrup.def \
driver.def thread.def Internal/semInt.def sem.def \
Internal/heapInt.def sysstats.def Internal/im.def \
Objects/processC.def Objects/metaC.def chunkarr.def \
geoworks.def Internal/threadIn.def Internal/host.def \
file.def initfile.def assert.def disk.def drive.def \
medium.def ui.def vm.def text.def fontID.def graphics.def \
font.def color.def char.def win.def input.def hwr.def \
gcnlist.def Objects/Text/tCommon.def stylesh.def iacp.def \
geoworks.def Internal/threadIn.def file.def initfile.def \
assert.def disk.def drive.def medium.def ui.def vm.def \
text.def fontID.def graphics.def font.def color.def \
char.def win.def input.def hwr.def gcnlist.def \
Objects/Text/tCommon.def stylesh.def iacp.def \
Objects/uiInputC.def Objects/visC.def Objects/vCompC.def \
Objects/vCntC.def Internal/vUtils.def Objects/genC.def \
uDialog.def Objects/gInterC.def token.def \
Expand Down
2 changes: 1 addition & 1 deletion bin/target.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ IF DEFINED GEOS_CDROM_DRIVE (
IF EXIST ensemble\init.bat (
echo swatgo >> ensemble\init.bat
)
start /B %BASEBOX% -conf %ROOT_DIR%\bin\basebox.conf -conf %LOCAL_ROOT%\basebox_user.conf -noconsole
start /B %BASEBOX% -conf %ROOT_DIR%\bin\basebox.conf -conf %LOCAL_ROOT%\basebox_user.conf -noconsole > nul 2>&1
cd %OLD_PATH%
@cls
:waitForFile
Expand Down

0 comments on commit f9aaa5b

Please sign in to comment.