Author Topic: Axe: Hex or Mnemonics?  (Read 4010 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Axe: Hex or Mnemonics?
« 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?

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Axe: Hex or Mnemonics?
« Reply #1 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.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Axe: Hex or Mnemonics?
« Reply #2 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.

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Axe: Hex or Mnemonics?
« Reply #3 on: May 25, 2011, 05:41:32 pm »
What's the advantage to converting it to mnemonics first?
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Axe: Hex or Mnemonics?
« Reply #4 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.
« Last Edit: May 25, 2011, 11:17:10 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Axe: Hex or Mnemonics?
« Reply #5 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.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ