Warning, cross-references for /kernel/vm/code16.S need to be fixed.
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
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