home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1992
/
11
/
labnotes
/
labnotes.inc
< prev
next >
Wrap
Text File
|
1992-02-24
|
2KB
|
60 lines
;LabNotes.Inc
;Include file for LabNotes.DLL routines
;Copyright (c) 1991 Jay Munro
;First published in PC Magazine June 16, 1992
;
;----------------------------------------------------------------------------
; Prolog and Epilog macros for exported functions
;----------------------------------------------------------------------------
WinProlog Macro
Push DS ;useless setup code
Pop AX
Nop
Inc BP ;adjust BP
Push BP ;save it
Mov BP,SP ;set up stack frame
Push DS ;save incoming DS
Mov DS,AX ;assign DS to DLL's DGroup
EndM
WinEpilog Macro
Dec BP ;adjust BP back from saved DS
Dec BP
Mov SP,BP ;reset SP
Pop DS ;retrieve original DS
Pop BP ;retrieve original BP
Dec BP ;readjust BP
EndM
ShortWinProlog Macro
Push DS ;useless setup code
Pop AX
Nop
Inc BP ;adjust BP
Push BP ;save it
Mov BP,SP ;set up stack frame
EndM
ShortWinEpilog Macro
Mov SP,BP ;reset SP
Pop BP ;retrieve original BP
Dec BP ;readjust BP
EndM
;----------------------------------------------------------------------------
;Register saving macros
;----------------------------------------------------------------------------
SaveESDISI Macro
Push ES
Push DI
Push SI
EndM
RestESDISI Macro
Pop SI
Pop DI
Pop ES
EndM