pmode.inc revision 94fde0b66aced35ee31b2218ab4371f2a48888c1
;; @file
;; Enter and exit a minimal protected-mode environment.
;;
;;
;; Copyright (C) 2004-2011 Oracle Corporation
;;
;; This file is part of VirtualBox Open Source Edition (OSE), as
;; available from http://www.virtualbox.org. This file is free software;
;; you can redistribute it and/or modify it under the terms of the GNU
;; General Public License (GPL) as published by the Free Software
;; Foundation, in version 2 as it comes in the "COPYING" file of the
;; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
;; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;;
;; Caveats: May only be called from the F000 segment (16-bit). Does not
;; switch stacks. Must be run with disabled interrupts(!), any exceptions
;; will cause a crash. On return from pmode_enter, DS contains a selector
;; which can address the entire 4GB address space.
public pmode_enter
public pmode_exit
public pmbios_gdt_desc
public pmbios_gdt
pmode_enter proc near
.386p
or al, 1
; jmp far ptr 20h:really_enter_pm
dw 20h
really_enter_pm:
pmode_enter endp
pmode_exit proc near
.286
really_exit_pm:
pmode_exit endp
pmbios_gdt_desc:
pmbios_gdt: