home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
turbopas
/
procparm.arc
/
PROCPARM.ASM
next >
Wrap
Assembly Source File
|
1986-05-09
|
1KB
|
46 lines
; Version 2.1 86/05/09
;
; Author: Mike Babulic (Compuserve 72307,314, Fido 314/1)
;
;
; This is the source for ProcParm.BIN
; I actually used DEBUG to assemble it
;
; for NEAR dummy procedures
;
ORG 0
;
NEAR: POP AX ; Ret Address
POP BX ; Proc Ptr
PUSH AX
JMP BX ; Jump to Proc
;
; for FAR dummy procedures
;
FAR: POP AX ; Ret Addr
POP BX ; Proc. Offset
POP CX ; Proc. Segment
PUSH CS ; Push long return address onto stack
PUSH AX ;
PUSH CX ; Jump to Proc
PUSH BX
RETF
;
; for FAR procedures with Offset, NB. called within a TURBO procedure
;
; procedure OffsetProc(p:FarProcPtr; Offset:integer);
;
FAROFS: POP AX ; Ret Addr (throw away)
POP BX ; Sum Proc. offsets
POP CX ;
ADD BX,CX ;
POP CX ; Proc. Segment
MOV SP,BP ; Drop down one level
POP BP ;
POP AX ; Ret Addr of routine that called OffsetProc
PUSH CS ; Push long return address onto stack
PUSH AX ;
PUSH CX ; Jump to Proc
PUSH BX
RETF