Re: How to enter user mode?
Posted: Mon May 20, 2013 6:38 am
somewhat like this:gabemaiberger wrote:I have the code to switch to user mode ready. However, I have one problem: (I know I already asked but...) I would like to know what the TSS structure:looks like in nasm syntax with db, dw, dd and dq preferably.Code: Select all
<snip>
Code: Select all
struc TSS
.prevTss resd 1
.esp0 resd 1
.ss0 resd 1
.esp1 resd 1
.ss1 resd 1
.esp2 resd 1
.ss2 resd 1
.cr3 resd 1
.eip resd 1
.eflags resd 1
.eax resd 1
.ecx resd 1
.edx resd 1
.ebx resd 1
.esp resd 1
.ebp resd 1
.esi resd 1
.edi resd 1
.es resd 1
.cs resd 1
.ss resd 1
.ds resd 1
.fs resd 1
.gs resd 1
.ldt resd 1
.trap resw 1
.iomap resw 1
endstruc