VirtualBox

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

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

bs3kit: v8086, long, fixes, updates.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1; $Id: bs3-cmn-PrintChr.asm 60000 2016-03-11 19:12:05Z vboxsync $
2;; @file
3; BS3Kit - Bs3PrintChr.
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;*********************************************************************************************************************************
37%if TMPL_BITS == 16
38BS3_EXTERN_DATA16 g_bBs3CurrentMode
39%endif
40BS3_EXTERN_CMN Bs3Syscall
41
42
43TMPL_BEGIN_TEXT
44
45;;
46; @cproto BS3_DECL(void) Bs3PrintChr_c16(char ch);
47;
48BS3_PROC_BEGIN_CMN Bs3PrintChr
49 BS3_CALL_CONV_PROLOG 1
50 push xBP
51 mov xBP, xSP
52 push xAX
53 push xCX
54 push xBX
55
56%if TMPL_BITS == 16
57 ; If we're in real mode or v8086 mode, call the VGA BIOS directly.
58 mov bl, [g_bBs3CurrentMode]
59 cmp bl, BS3_MODE_RM
60 je .do_vga_bios_call
61;later ; and bl, BS3_MODE_CODE_MASK
62;later ; cmp bl, BS3_MODE_CODE_V86
63 jne .do_system_call
64
65.do_vga_bios_call:
66 mov al, [xBP + xCB*2] ; Load the char
67 mov bx, 0ff00h
68 mov ah, 0eh
69 int 10h
70 jmp .return
71%endif
72
73.do_system_call:
74 mov cl, [xBP + xCB*2] ; Load the char
75 mov ax, BS3_SYSCALL_PRINT_CHR
76 call Bs3Syscall ; (no BS3_CALL!)
77
78.return:
79 pop xBX
80 pop xCX
81 pop xAX
82 leave
83 BS3_CALL_CONV_EPILOG 1
84 ret
85BS3_PROC_END_CMN Bs3PrintChr
86
Note: See TracBrowser for help on using the repository browser.

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