Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/vm/code16.S need to be fixed.

0001 /* -*- Mode: asm; comment-start: "\/*"; comment-end: "*\/"; indent-tabs-mode: nil -*- */
0002 /*                    The Quest Operating System
0003  *  Copyright (C) 2005-2010  Richard West, Boston University
0004  *
0005  *  This program is free software: you can redistribute it and/or modify
0006  *  it under the terms of the GNU General Public License as published by
0007  *  the Free Software Foundation, either version 3 of the License, or
0008  *  (at your option) any later version.
0009  *
0010  *  This program is distributed in the hope that it will be useful,
0011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  *  GNU General Public License for more details.
0014  *
0015  *  You should have received a copy of the GNU General Public License
0016  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0017  */
0018 
0019         .section .text16, "ax"
0020         .align 0x1000
0021         .code16
0022         .globl vmx_code16_entry
0023         .type vmx_code16_entry,@function
0024 vmx_code16_entry:
0025         push %bp
0026         movw %sp, %bp
0027 test_outw:
0028         movw $0x8A00, %dx
0029         movw $0x8A00, %ax
0030         outw %ax, %dx
0031 test_outsw:
0032         movw %cs, %ax
0033         movw %ax, %ds
0034         leaw testdata, %si
0035         movw $3, %cx
0036         cld
0037         rep outsw
0038         pushf
0039         popf
0040 video_mode_13h:
0041         movw $0x13, %ax
0042         int $0x10
0043 drawtest:
0044         movw $0xA000, %di
0045         movw %di, %es
0046         xorw %di, %di
0047         movw $0x6, %cx
0048 2:
0049         movw %cx, %dx
0050         movw $0xF, %cx
0051 1:
0052         movw %cx, %ax
0053         movw $640, %cx
0054         rep stosb
0055         movw %ax, %cx
0056         loop 1b
0057         movw %dx, %cx
0058         loop 2b
0059 
0060         movw $0xFFFF, %cx
0061 3:
0062         movw $0x3C8, %dx
0063         movb %cl, %al
0064         andb $0x0F, %al
0065         outb %al, %dx
0066         movw $0x3C9, %dx
0067         movb %cl, %al
0068         outb %al, %dx
0069         movb %ch, %al
0070         outb %al, %dx
0071         movb %ch, %al
0072         outb %al, %dx
0073         loop 3b
0074 
0075 finish:
0076         movw %bp, %sp
0077         pop %bp
0078         hlt
0079         jmp vmx_code16_entry
0080         .size vmx_code16_entry,.-vmx_code16_entry
0081 testdata:
0082         .word 0x8A00
0083         .word 0x8A00
0084         .word 0x8A00
0085 
0086 /* vi: set et sw=8 sts=8: */