VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/bootsectors/bootsector2-boot-registers-1.asm@ 77807

Last change on this file since 77807 was 76553, checked in by vboxsync, 6 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1; $Id: bootsector2-boot-registers-1.asm 76553 2019-01-01 01:45:53Z vboxsync $
2;; @file
3; Bootsector that prints the register status at boot.
4;
5
6;
7; Copyright (C) 2007-2019 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 "iprt/asmdefs.mac"
29%include "iprt/x86.mac"
30%include "VBox/VMMDevTesting.mac"
31
32;
33; Initialize in real mode, preserving the registers.
34;
35%define BS2_INIT_RM
36%define BS2_INIT_SAVE_REGS
37%include "bootsector2-common-init-code.mac"
38
39main:
40 mov ax, BS2_REG_SAVE_ADDR
41 call NAME(TestDumpRegisters_r86)
42
43 xor ax, ax
44 mov al, [es:di]
45 push ax
46 mov al, [es:di + 1]
47 push ax
48 mov al, [es:di + 2]
49 push ax
50 mov al, [es:di + 3]
51 push ax
52 push ds
53 push .s_szPnpFmt1
54 call NAME(PrintF_r86)
55 pop ax
56 push .s_szPnpFmt2
57 call NAME(PrintF_r86)
58 pop ax
59 push .s_szPnpFmt3
60 call NAME(PrintF_r86)
61
62 call NAME(Bs2Panic)
63
64.s_szPnpFmt1:
65 db 'es:di -> %RX8 %RX8 %RX8 %RX8 ',0
66.s_szPnpFmt2:
67 db '%c%c%c%c', 0
68.s_szPnpFmt3:
69 db 13, 10, 0
70
71;
72; Pad the image so it loads cleanly.
73;
74BS2_PAD_IMAGE
75the_end:
76
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