LGDT Instruction

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.
Post Reply
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

LGDT Instruction

Post by crazygray »

Would someone clarify how to use the lgdt instruction because I am having problems with it in my code.
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Post by neon »

LGDT is just used to load the address of the GDT base pointer into the GDTR register.

If you like, post your current code and error information and we may be able to spot the problem.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post by crazygray »

Never mind It was a stupid mistake. :oops: I fixed it though. :D :D
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
iammisc
Member
Member
Posts: 269
Joined: Thu Nov 09, 2006 6:23 pm

Post by iammisc »

You do realize that you've asked two questions now both of which you have found the answer to by just thinking.

Next time try asking questions *after* trying to fix it by yourself.
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post by crazygray »

I do that all the time actually If I say the question out loud it comes to me easier.
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
LordMage
Member
Member
Posts: 115
Joined: Sat Sep 22, 2007 7:26 am
Contact:

Post by LordMage »

So your saying it out loud in type??? Just kidding, I have the same problem. I find a lot of answers that have been bugging my for hours by asking a stupid question.
Getting back in the game.
Post Reply