Omnimaga

Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: Munchor on May 25, 2011, 05:11:51 pm

Title: Axe: Hex or Mnemonics?
Post by: Munchor on May 25, 2011, 05:11:51 pm
I was wondering, @Quigibo, if after the parser reading the text it will convert it to mnemonics or hex, or maybe this is a stupid question, but I'm pretty sure you have like for "ClrDraw" you have like EF7450.

So I was wondering, do you convert stuff directly to hex or do you have an assembler inside Axe?
Title: Re: Axe: Hex or Mnemonics?
Post by: Quigibo on May 25, 2011, 05:18:49 pm
Its direct to machine code.  Although sometimes, its slightly indirect with placeholders that get filled in later, but usually its direct.  And its not a stupid question, most computer compilers actually DO do that.  I would have in Axe too if there was enough memory, but unfortunately there isn't.
Title: Re: Axe: Hex or Mnemonics?
Post by: Munchor on May 25, 2011, 05:25:06 pm
Its direct to machine code.  Although sometimes, its slightly indirect with placeholders that get filled in later, but usually its direct.  And its not a stupid question, most computer compilers actually DO do that.  I would have in Axe too if there was enough memory, but unfortunately there isn't.

That's actually great news. Thus the compiling is much faster, I guess.
Title: Re: Axe: Hex or Mnemonics?
Post by: Freyaday on May 25, 2011, 05:41:32 pm
What's the advantage to converting it to mnemonics first?
Title: Re: Axe: Hex or Mnemonics?
Post by: Quigibo on May 25, 2011, 11:16:41 pm
Its way easier to make the compiler (assuming you already have a working assembler) and it allows you to hand optimize the code really easily if you want to since you can get an assembly output.  But Mimas wasn't around at the time I started Axe so that wasn't an option back then.
Title: Re: Axe: Hex or Mnemonics?
Post by: AngelFish on May 25, 2011, 11:20:09 pm
It also makes the compiler more portable, since you can change assemblers for different systems and most assemblers use similar syntax.