VirtualBox

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

Last change on this file since 66316 was 60657, checked in by vboxsync, 9 years ago

bs3kit: updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1; $Id: bs3-cmn-SelProtFar16DataToFlat.asm 60657 2016-04-22 15:57:22Z vboxsync $
2;; @file
3; BS3Kit - Bs3SelProtFar16DataToFlat.
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.virtualbox.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
28;*********************************************************************************************************************************
29;* Header Files *
30;*********************************************************************************************************************************
31%include "bs3kit-template-header.mac"
32
33
34;*********************************************************************************************************************************
35;* External Symbols *
36;*********************************************************************************************************************************
37BS3_EXTERN_CMN Bs3SelFar32ToFlat32NoClobber
38TMPL_BEGIN_TEXT
39%if TMPL_BITS == 16
40CPU 8086
41%endif
42
43
44;;
45; @cproto BS3_CMN_PROTO_NOSB(uint32_t, Bs3SelProtFar16DataToFlat,(uint32_t uFar1616));
46;
47; @uses Only return registers (ax:dx, eax, eax)
48; @remarks No 20h scratch area requirements.
49;
50BS3_PROC_BEGIN_CMN Bs3SelProtFar16DataToFlat, BS3_PBC_NEAR ; Far stub generated by the makefile/bs3kit.h.
51 push xBP
52 mov xBP, xSP
53
54 ;
55 ; Just call Bs3SelFar32ToFlat32NoClobber to do the job.
56 ;
57%if TMPL_BITS == 16
58 push word [xBP + xCB + cbCurRetAddr + 2]
59 xor ax, ax
60 push ax
61 push word [xBP + xCB + cbCurRetAddr]
62 call Bs3SelFar32ToFlat32NoClobber
63 add sp, 6
64%else
65 %if TMPL_BITS == 32
66 movzx eax, word [xBP + xCB + cbCurRetAddr + 2]
67 push eax
68 movzx eax, word [xBP + xCB + cbCurRetAddr]
69 push eax
70 call Bs3SelFar32ToFlat32NoClobber
71 add esp, 8
72 %else
73 push xDX
74 push xCX
75
76 mov edx, ecx ; arg #2: selector
77 shr edx, 16
78 movzx ecx, cx ; arg #1: offset
79 call Bs3SelFar32ToFlat32NoClobber
80
81 pop xDX
82 pop xCX
83 %endif
84%endif
85
86.return:
87 pop xBP
88 BS3_HYBRID_RET
89BS3_PROC_END_CMN Bs3SelProtFar16DataToFlat
90
Note: See TracBrowser for help on using the repository browser.

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