Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
i dont understand whay th cpu dont pop correct before exception handle
in some book and tuto like this http://www.logix.cz/michal/doc/i386/chp15-03.htm
info :
_ qemu emulator /Oracle virtualBox
_ gcc compilator
_ ubuntu
thnx , sorry for my english is not good
thnx b.zaar , bat this is my problem the CPU has mixing the ss with ss0 because ss0 value as 0x18 , i dont understande whay the CPU in GP as mixing this value , i need the old esp and old ss to run the vm86 monitor
I think you should be ignoring the 0x18xxxx of ss as it's above the 16 bit limit of a vm86 stack structure, do something like 0x180800 & 0xFFFF to get the low 16 bit value you need.
b.zaar wrote:I think you should be ignoring the 0x18xxxx of ss as it's above the 16 bit limit of a vm86 stack structure, do something like 0x180800 & 0xFFFF to get the low 16 bit value you need.
thnx b.zaar it work my first problem ase resolved now my problem with I/O port
the eflags value : 0x23202 : iopl as 3 but all time i have GP exception , in the monitor i emulate just this instruction
cli , sti , popf pushf , int x , iret , 0xef , 0xed :
in vm task test i call int 10 its work correctly just i dont semilate 0xee , 0xec instruction in google i understand this opcode its
b.zaar wrote:I think you should be ignoring the 0x18xxxx of ss as it's above the 16 bit limit of a vm86 stack structure, do something like 0x180800 & 0xFFFF to get the low 16 bit value you need.
thnx b.zaar it work my first problem ase resolved now my problem with I/O port
the eflags value : 0x23202 : iopl as 3 but all time i have GP exception , in the monitor i emulate just this instruction
cli , sti , popf pushf , int x , iret , 0xef , 0xed :
in vm task test i call int 10 its work correctly just i dont semilate 0xee , 0xec instruction in google i understand this opcode its
in/out
IOPL = 3 works differently between vm86 mode and protected mode and a vm86 task requires a valid I/O permission bitmap in the task state segment.
Read the section - 17.2.8.1 I/O-Port-Mapped I/O - in the intel manuals from Vol 3 - System Programming Guide.
section - 15.5.1 I/O-Mapped I/O - from you link to the original 386 programmers guide.
b.zaar wrote:
IOPL = 3 works differently between vm86 mode and protected mode and a vm86 task requires a valid I/O permission bitmap in the task state segment.
Read the section - 17.2.8.1 I/O-Port-Mapped I/O - in the intel manuals from Vol 3 - System Programming Guide.
section - 15.5.1 I/O-Mapped I/O - from you link to the original 386 programmers guide.