home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
CPROG
/
ISC366.ZIP
/
ISC
/
ISCSERVE.ASM
< prev
Wrap
Assembly Source File
|
1993-09-01
|
2KB
|
91 lines
;////////////////////////////////////////////////////////////////////////////
;// //
;// File: IscServe.asm //
;// restarted on: 8/10/92 //
;// //
;////////////////////////////////////////////////////////////////////////////
;// //
;// V3.6x //
;// ----------- //
;// //
;////////////////////////////////////////////////////////////////////////////
.MODEL large,C ;// DO NOT CHANGE MEMORY MODEL!!!
EXTRN C ISCDispatch:PROC
.DATA
ThunkMailboxOFF dw 0
ThunkMailboxSEG dw 0
.CODE
PUBLIC ThunkSize
PUBLIC ThunkSet
PUBLIC ThunkGetID
;;// The actual thunk.
;;//
Thunk PROC C
Thunk_start:
cli
push ax dx ds
mov ax, DGroup
mov ds, ax
LABEL Thunk_off_loc WORD
mov ax, 0
LABEL Thunk_seg_loc WORD
mov dx, 0
mov ThunkMailboxOFF, ax
mov ThunkMailboxSEG, dx
pop ds dx ax
jmp ISCDispatch
Thunk_end:
Thunk ENDP
;;// gets This as parameter, returns far pointer to Thunk.
;;//
ThunkSet PROC C ThisParam:DWORD
les bx, ThisParam
mov Thunk_off_loc[1], bx
mov Thunk_seg_loc[1], es
mov ax, offset cs:Thunk_start
mov dx, cs
ret
ThunkSet ENDP
;;// returns the size of the thunk.
;;//
ThunkSize PROC C
mov ax, offset Thunk_end- offset Thunk_start
ret
ThunkSize ENDP
;;// returns this.
ThunkGetID PROC C
mov ax, ThunkMailboxOFF
mov dx, ThunkMailboxSEG
ret
ThunkGetID ENDP
END