Virtual mode - problem
Posted: Sat Feb 24, 2007 2:39 pm
Hello.
I have a problem with vm86 in my system.
I try to turn on and make a brake in this simple programe.
I can turn on the virtual state but when I try to get the brake I get in the Bochs somthing like this
"exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting".
Please help.
Code: Select all
[ORG 0x7C00]
[BITS 16]
start:
mov ax, 0x1000
mov ss, ax
xor esp, esp
mov ax, cs
mov ds, ax
mov es, ax
mov ax, 3h
int 10h
xor ax, ax
mov ds, ax
lgdt [gdt_descr]
mov eax, cr0
or eax, 1
mov cr0, eax
jmp 0x08:start32
vm86: ;v8086 mode - 16-bits
mov ax, 3h
int 16h ;it's ok without this
vm86_stop:
jmp vm86_stop
[BITS 32]
start32:
mov ax, 10h
mov ss, ax
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov esp, 0x10000
push dword 0 ;real_mode_gs
push dword 0 ;real_mode_fs
push dword 0 ;real_mode_ds
push dword 0 ;real_mode_es
push dword 0 ;real_mode_ss
push dword 0 ;real_mode_esp
;===EFLAGS===
;pushfd ;(with vm86 bit = 1)
push dword 0x20000 ;0x23202
push dword 0 ;real_mode_cs
push dword vm86 ;real_mode_eip
iretd
gdt:
dd 0 ; NULL Descriptor
dd 0
dw 0xFFFF
dw 0
db 0
db 10011010b
db 11001111b
db 0
dw 0xFFFF
dw 0
db 0
db 10010010b
db 11001111b
db 0
gdt_end:
gdt_descr:
dw gdt_end - gdt - 1
dd gdt
times 510 - ($ - $$) db 0
dw 0xAA55
I try to turn on and make a brake in this simple programe.
I can turn on the virtual state but when I try to get the brake I get in the Bochs somthing like this
"exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting".
Please help.