How to enter user mode?

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.
halofreak1990
Member
Member
Posts: 41
Joined: Thu Aug 09, 2012 5:10 am

Re: How to enter user mode?

Post by halofreak1990 »

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:

Code: Select all

<snip>
looks like in nasm syntax with db, dw, dd and dq preferably.
somewhat like this:

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
<PixelToast> but i cant mouse

Porting is good if you want to port, not if you want maximum quality. -- sortie
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: How to enter user mode?

Post by Combuster »

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:

Code: Select all

(...)
looks like in nasm syntax with db, dw, dd and dq preferably.
An excellent homework question! Practice reading manuals ;)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply