home *** CD-ROM | disk | FTP | other *** search
- Title Subprogram to call any absolute location in memory
- Page 60,130
- ; Created 10-17-1987 k. murray
- ;
- Cseg Segment byte public 'Code'
- Assume Cs:Cseg,Ds:nothing,Es:nothing
- ;
- ; Define in program:
- ; Sub Absolute Offset% External "absolute.com"
- ; Call in program:
- ; Absolute Adr%
- ;
- ; Stack frame:
- ; Sp+4 Adr. of offset
- ; Sp+2 Return Segment
- ; Sp+0 Return Offset
- Start:
- Absolute Proc Far
- Pop Ax ; Get return offset
- Pop Dx ; Get return segment
- Pop Bx ; Address of offset%
- Push Dx
- Push Ax ; put return adr. back
- Push Ds:[4] ; Push current Def Seg segment
- Push [Bx] ; Push Offset% value
- Ret ; This will now do a far return to memory location
- Absolute Endp
- Cseg Ends
- End Start