VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2-template.mac@ 60194

Last change on this file since 60194 was 60194, 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: 2.5 KB
Line 
1; $Id: bs3-cpu-basic-2-template.mac 60194 2016-03-26 13:17:53Z vboxsync $
2;; @file
3; BS3Kit - bs3-cpu-basic-2 assembly template.
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%include "bs3kit-template-header.mac" ; setup environment
29
30
31%undef Bs3Printf
32BS3_EXTERN_CMN Bs3Printf
33
34
35%if 0 ; Will be doing the testing in C, I think.
36BS3_PROC_BEGIN_MODE bs3CpuBasic2_iret
37 BS3_CALL_CONV_PROLOG 1
38 push xBP
39 mov xBP, xSP
40 sub xSP, 20h
41
42%if TMPL_BITS == 64
43%if TMPL_BITS == 16
44 xor ax, ax
45 mov al, [xBP + xCB*2]
46 push ax
47 push cs
48 push .szMsg wrt BS3TEXT16
49 call Bs3Printf
50 add sp, 6
51%else
52 movzx xDX, byte [xBP + xCB*2]
53 push xDX
54 push .szMsg wrt FLAT
55 BS3_CALL Bs3Printf, 2
56 add xSP, xCB * 2
57%endif
58%endif
59
60 ; Return
61 xor al, al
62;mov al, TMPL_MODE ; remove me
63
64
65 mov xSP, xBP
66 pop xBP
67 BS3_CALL_CONV_EPILOG 1
68 ret
69.szMsg: db 'hello world %#x!', 13, 10, 0
70
71BS3_PROC_END_MODE bs3CpuBasic2_iret
72%endif
73
74
75BS3_PROC_BEGIN_MODE bs3CpuBasic2_Int80
76 int 80h
77 ud2
78BS3_PROC_END_MODE bs3CpuBasic2_Int80
79
80
81BS3_PROC_BEGIN_MODE bs3CpuBasic2_Int81
82 int 81h
83 ud2
84BS3_PROC_END_MODE bs3CpuBasic2_Int81
85
86
87BS3_PROC_BEGIN_MODE bs3CpuBasic2_Int82
88 int 82h
89 ud2
90BS3_PROC_END_MODE bs3CpuBasic2_Int82
91
92
93BS3_PROC_BEGIN_MODE bs3CpuBasic2_Int83
94 int 83h
95 ud2
96BS3_PROC_END_MODE bs3CpuBasic2_Int83
97
98
99
100
101%include "bs3kit-template-footer.mac" ; reset environment
102
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