VirtualBox

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

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

bs3-cpu-basic-2: started on sidt.

  • 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-cpu-basic-2-template.mac 60445 2016-04-12 08:35: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;*********************************************************************************************************************************
32;* External Symbols *
33;*********************************************************************************************************************************
34%undef Bs3Printf
35BS3_EXTERN_CMN Bs3Printf
36
37
38
39TMPL_BEGIN_TEXT
40
41%if 0 ; Will be doing the testing in C, I think.
42BS3_PROC_BEGIN_MODE bs3CpuBasic2_iret
43 BS3_CALL_CONV_PROLOG 1
44 push xBP
45 mov xBP, xSP
46 sub xSP, 20h
47
48%if TMPL_BITS == 64
49%if TMPL_BITS == 16
50 xor ax, ax
51 mov al, [xBP + xCB*2]
52 push ax
53 push cs
54 push .szMsg wrt BS3TEXT16
55 call Bs3Printf
56 add sp, 6
57%else
58 movzx xDX, byte [xBP + xCB*2]
59 push xDX
60 push .szMsg wrt FLAT
61 BS3_CALL Bs3Printf, 2
62 add xSP, xCB * 2
63%endif
64%endif
65
66 ; Return
67 xor al, al
68;mov al, TMPL_MODE ; remove me
69
70
71 mov xSP, xBP
72 pop xBP
73 BS3_CALL_CONV_EPILOG 1
74 ret
75.szMsg: db 'hello world %#x!', 13, 10, 0
76
77BS3_PROC_END_MODE bs3CpuBasic2_iret
78%endif
79
80
81BS3_PROC_BEGIN_MODE bs3CpuBasic2_Int80
82 int 80h
83.again: ud2
84 jmp .again
85BS3_PROC_END_MODE bs3CpuBasic2_Int80
86
87
88BS3_PROC_BEGIN_MODE bs3CpuBasic2_Int81
89 int 81h
90.again: ud2
91 jmp .again
92BS3_PROC_END_MODE bs3CpuBasic2_Int81
93
94
95BS3_PROC_BEGIN_MODE bs3CpuBasic2_Int82
96 int 82h
97.again: ud2
98 jmp .again
99BS3_PROC_END_MODE bs3CpuBasic2_Int82
100
101
102BS3_PROC_BEGIN_MODE bs3CpuBasic2_Int83
103 int 83h
104.again: ud2
105 jmp .again
106BS3_PROC_END_MODE bs3CpuBasic2_Int83
107
108
109BS3_PROC_BEGIN_MODE bs3CpuBasic2_sidt_bx_ud2
110 sidt [xBX]
111.again: ud2
112 jmp .again
113BS3_PROC_END_MODE bs3CpuBasic2_sidt_bx_ud2
114
115
116BS3_PROC_BEGIN_MODE bs3CpuBasic2_lidt_bx_ud2
117 lidt [xBX]
118.again: ud2
119 jmp .again
120BS3_PROC_END_MODE bs3CpuBasic2_lidt_bx_ud2
121
122
123
124%include "bs3kit-template-footer.mac" ; reset environment
125
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