VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelRealModeCodeToProtMode.asm@ 60554

最後變更 在這個檔案從60554是 60554,由 vboxsync 提交於 9 年 前

bs3kit: far updates.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.2 KB
 
1; $Id: bs3-cmn-SelRealModeCodeToProtMode.asm 60554 2016-04-18 19:11:32Z vboxsync $
2;; @file
3; BS3Kit - Bs3SelRealModeCodeToProtMode.
4;
5
6;
7; Copyright (C) 2007-2016 Oracle Corporation
8;
9; This file is part of VirtualBox Open Source Edition (OSE), as
10; available from http://www.alldomusa.eu.org. This file is free software;
11; you can redistribute it and/or modify it under the terms of the GNU
12; General Public License (GPL) as published by the Free Software
13; Foundation, in version 2 as it comes in the "COPYING" file of the
14; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16;
17; The contents of this file may alternatively be used under the terms
18; of the Common Development and Distribution License Version 1.0
19; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20; VirtualBox OSE distribution, in which case the provisions of the
21; CDDL are applicable instead of those of the GPL.
22;
23; You may elect to license modified versions of this file under the
24; terms and conditions of either the GPL or the CDDL or both.
25;
26
27%include "bs3kit-template-header.mac"
28
29;
30; Make sure we can get at all the segments.
31;
32BS3_BEGIN_TEXT16
33BS3_BEGIN_X0TEXT16
34BS3_BEGIN_X1TEXT16
35TMPL_BEGIN_TEXT
36
37
38;;
39; @cproto BS3_CMN_PROTO(uint16_t, Bs3SelRealModeCodeToProtMode,(uint16_t uRealSel), false);
40; @uses ax (return register)
41;
42BS3_PROC_BEGIN_CMN Bs3SelRealModeCodeToProtMode, BS3_PBC_NEAR
43 BS3_CALL_CONV_PROLOG 1
44 push xBP
45 mov xBP, xSP
46
47 mov ax, [xBP + xCB + cbCurRetAddr]
48 cmp ax, BS3TEXT16
49 je .bs3text16
50 cmp ax, BS3X0TEXT16
51 je .bs3x0text16
52 cmp ax, BS3X1TEXT16
53 je .bs3x1text16
54 extern BS3_CMN_NM(Bs3Panic)
55 call BS3_CMN_NM(Bs3Panic)
56 jmp .return
57
58.bs3x1text16:
59 mov ax, BS3_SEL_X1TEXT16_CS
60 jmp .return
61.bs3x0text16:
62 mov ax, BS3_SEL_X0TEXT16_CS
63 jmp .return
64.bs3text16:
65 mov ax, BS3_SEL_R0_CS16
66.return:
67 pop xBP
68 BS3_CALL_CONV_EPILOG 1
69 BS3_HYBRID_RET
70BS3_PROC_END_CMN Bs3SelRealModeCodeToProtMode
71
72;
73; We may be using the near code in some critical code paths, so don't
74; penalize it.
75;
76BS3_CMN_FAR_STUB Bs3SelRealModeCodeToProtMode, 2
77
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette