Loading GDT causes triple-fault

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.
User avatar
KrnlHckr
Member
Member
Posts: 36
Joined: Tue Jul 17, 2007 9:16 am
Location: Washington, DC Metro Area
Contact:

Post by KrnlHckr »

SpooK wrote:Nice catch.

It would be a wise thing to stay away from the latest NASM dev branch as it is a mess due to the major updates it is receiving in both for x64 support and code clean-up.

NASM 0.98.39 (STABLE) works just fine :)
STABLE - it's not just for horses anymore! :P

I checked my notebook to find out how I managed to pull a dev branch. I discovered that a google link I followed directly to the source download page was used. I checked that page today (during my eureka moment) and found that there was no mention of dev/stable branches, just link to 0.99 and "older" releases like 0.98. Didn't even stop to think if an odd minor release was a stable one or not (thinking, "hey it isn't labeled as such"). Hitting the home page for the project said plain as day, "latest stable... latest development..." :roll: That oughta teach me!
"If your code won't run, verify that you are, indeed, using the STABLE branches of your toolchain!" -- KrnlHckr, 2007 :oops:
SpooK
Member
Member
Posts: 260
Joined: Sun Jun 18, 2006 7:21 pm

Post by SpooK »

KrnlHckr wrote:
SpooK wrote:Nice catch.

It would be a wise thing to stay away from the latest NASM dev branch as it is a mess due to the major updates it is receiving in both for x64 support and code clean-up.

NASM 0.98.39 (STABLE) works just fine :)
STABLE - it's not just for horses anymore! :P

I checked my notebook to find out how I managed to pull a dev branch. I discovered that a google link I followed directly to the source download page was used. I checked that page today (during my eureka moment) and found that there was no mention of dev/stable branches, just link to 0.99 and "older" releases like 0.98. Didn't even stop to think if an odd minor release was a stable one or not (thinking, "hey it isn't labeled as such"). Hitting the home page for the project said plain as day, "latest stable... latest development..." :roll: That oughta teach me!
Agreed :P

I was actually the one to update the NASM home page and get the ball rolling on NASM development again. However, the development part has been out of my hands for 4 months now so I don't honestly know where the sources stand... all I do know is that there is quite a few issues and that the best course of action is to stick to 0.98.39 unless you are helping NASM developers to shake-down the latest dev sources.

I've also heard of a release by Mac developers that include MACHO output, but I don't keep up with unofficial/private builds.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

I use the GNU assembler that came from my cross-compiler (rewrote the entire assembly part of Bran's tutorial in GAS syntax) so I'm always sure that it's the correct version, and it's always compatible with the other object files.

NASM is still ok though.
User avatar
KrnlHckr
Member
Member
Posts: 36
Joined: Tue Jul 17, 2007 9:16 am
Location: Washington, DC Metro Area
Contact:

Post by KrnlHckr »

pcmattman wrote:I use the GNU assembler that came from my cross-compiler (rewrote the entire assembly part of Bran's tutorial in GAS syntax) so I'm always sure that it's the correct version, and it's always compatible with the other object files.

NASM is still ok though.
I have used NASM up to this point because the tutorials all seem to be written in Intel syntax. I've been trying to get up to speed on AT&T syntax, but trying to learn both OS and gas was taxing my brain. I think that when I finish the last bits of the tutorial (learn IDT, IRQ, PIC, timer), I'll try attempting rewriting the asm bits in gas. That actually sounds like a fun thing to do. (Stay tuned for those posts! :)

I've been having a go at re-writing the C portions from the very beginning, taking advantage of typedefs and #define macros, etc. My C is a lot stronger than asm, though.

***
I'm still so tickled that the darn thing works now! :cool:
"If your code won't run, verify that you are, indeed, using the STABLE branches of your toolchain!" -- KrnlHckr, 2007 :oops:
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post by AJ »

Hi,

I think one of Brynet's favourite sayings is that you can use Intel syntax with GAS (correct me if I'm wrong!) - not that I've tried it or can remember how it is done. The Intel version just seems so much nicer.

Code: Select all

In C:
dest = src;

In Intel syntax:
mov dest, src

In AT&T:
movl src, dest
Spot the odd one out!

Cheers,
Adam
User avatar
os64dev
Member
Member
Posts: 553
Joined: Sat Jan 27, 2007 3:21 pm
Location: Best, Netherlands

Post by os64dev »

and yes we are on the intel vs at&t syntax again. ppl get a life and concentrate on stuff that is important instead of having discussions on preferences, which are futile because it concerns personal feelings.
Author of COBOS
Post Reply