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.
75 # destroyed: %ah, %bx, %cx
89 # Put a null terminated string
90 # %di: pointer to string
91 # destroyed: %ah, %cx, %di
105 # Change the current cursor position
108 # destroyed: %ax, %bx
124 addw %bx, %ax # AX=Y*64+Y*16=Y*80
132 # destroyed: %ax, %bx
138 int $0x18 # KBD/CRT BIOS
146 # destroyed: %ax, %bx, %cx
156 # Sense the state of shift key
159 .global sc_getshiftkey
161 movb $2, %ah # Sense KB_SHIFT_COD
162 int $0x18 # KBD/CRT BIOS
169 .global sc_iskeypress
172 int $0x18 # KBD/CRT BIOS
191 # Initialize CRT (normal mode)
194 # Disable graphic screen
197 # Init graphic screen
207 # Initialize CRT (hireso mode)
221 # Initialize screen (internal)
227 call init_screen_normal
230 call init_screen_hireso
234 # cursor home and off
253 curpos: .word 0 # Current cursor position