www.pudn.com > hpbios.rar > APM32.VSA
; []===========================================================[] ; ; NOTICE: THIS PROGRAM BELONGS TO AWARD SOFTWARE INTERNATIONAL(R) ; INC. IT IS CONSIDERED A TRADE SECRET AND IS NOT TO BE ; DIVULGED OR USED BY PARTIES WHO HAVE NOT RECEIVED ; WRITTEN AUTHORIZATION FROM THE OWNER. ; ; []===========================================================[] ; ;---------------------------------------------------------------------------- ;Rev Date Name Description ;---------------------------------------------------------------------------- ;R00 04/28/97 RCH Initial revision for GX86/VSA support. ; Note : Both APM/APM32 services are in VSA code .386p PAGE 60,132 TITLE APM_32.ASM -- APM 32 Bit Interface .XLIST INCLUDE BIOS.CFG INCLUDE COMMON.EQU INCLUDE COMMON.MAC INCLUDE POST.MAC INCLUDE BSETUP.INC include CMOS.EQU ;===================================================== CALL32 MACRO ADDRESS X = $ CALL ADDRESS IF2 Y = ADDRESS IF (X GT Y) X=X+3 ORG X DW 0FFFFh ENDIF ENDIF ENDM ;===================================================== .LIST DGROUP GROUP FCODE FCODE SEGMENT DWORD PUBLIC 'CODE' ASSUME CS:DGROUP ;---------------------------------------------------------------------------- ; apm32BitInterface - APM 32Bit protected mode entry point. ; Public apm32BitInterface apm32BitInterface PROC FAR push ebp ; Actually pushing EBP ; Set up stack for return from 16 bit code to 32 bit code mov bp, cs push bp mov ebp, OFFSET apm16To32Ret push bp ; Set up stack for call to 16-bit code mov bp, cs ; Get selector of 32-bit CS add bp, 8 ; IMPORTANT: Put 16-bit selector on stack push bp extrn apm16BitInterface:near mov ebp, OFFSET apm16BitInterface push bp DB 66h ; Do a 16-bit far return to 16-bit entry point ret ; This returns to the APM caller's code apm16To32Ret: pop ebp ; Restore EBP ret ; Return to 32-bit code apm32BitInterface ENDP FCODE ENDS END