home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
C
/
ISC365
/
ISCSERVE.ASM
< prev
next >
Wrap
Assembly Source File
|
1992-10-15
|
2KB
|
90 lines
;////////////////////////////////////////////////////////////////////////////
;// //
;// File: IscServe.asm //
;// restarted on: 8/10/92 //
;// //
;////////////////////////////////////////////////////////////////////////////
;// //
;// V3.6 //
;// ---------- //
;// //
;////////////////////////////////////////////////////////////////////////////
.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