1 # Copyright (c) KATO Takenori, 1999, 2000.
3 # All rights reserved. Unpublished rights reserved under the copyright
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
10 # 1. Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer as
12 # the first lines of this file unmodified.
13 # 2. Redistributions in binary form must reproduce the above copyright
14 # notice, this list of conditions and the following disclaimer in the
15 # documentation and/or other materials provided with the distribution.
17 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 # $FreeBSD: src/sys/boot/pc98/boot0.5/syscons.s,v 1.1.2.1 2000/09/11 09:19:46 kato Exp $
29 # $DragonFly: src/sys/boot/pc98/boot0.5/Attic/syscons.s,v 1.2 2003/06/17 04:28:18 dillon Exp $
76 # destroyed: %ah, %bx, %cx
90 # Put a null terminated string
91 # %di: pointer to string
92 # destroyed: %ah, %cx, %di
106 # Change the current cursor position
109 # destroyed: %ax, %bx
125 addw %bx, %ax # AX=Y*64+Y*16=Y*80
133 # destroyed: %ax, %bx
139 int $0x18 # KBD/CRT BIOS
147 # destroyed: %ax, %bx, %cx
157 # Sense the state of shift key
160 .global sc_getshiftkey
162 movb $2, %ah # Sense KB_SHIFT_COD
163 int $0x18 # KBD/CRT BIOS
170 .global sc_iskeypress
173 int $0x18 # KBD/CRT BIOS
192 # Initialize CRT (normal mode)
195 # Disable graphic screen
198 # Init graphic screen
208 # Initialize CRT (hireso mode)
222 # Initialize screen (internal)
228 call init_screen_normal
231 call init_screen_hireso
235 # cursor home and off
254 curpos: .word 0 # Current cursor position