Author Topic: Axe Compiler troubles  (Read 14385 times)

0 Members and 1 Guest are viewing this topic.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Axe Compiler troubles
« on: August 15, 2010, 03:42:45 am »
I'm extremely new to Axe, so this is probably just User error, but for me, Axe doesn't appear to want to compile programs. I copied an extremely simple sprite control from the documentation PDF to get a feel for how the language worked without accidentally destroying my RAM. When I tried to compile it in Axe 0.4.3, it gave me a File name error. Looking at the list of errors, supposedly I designated the compiled program as the source. However, I was never given the opportunity to designate any program names for the compiled code.

And just for reference, here's the code:

Code: [Select]
:.Steel A Parser
:[3C7EDBFFBDDB663C]→Pic1
:For(A,0,19)
:rand^88→{A+L1}
:rand^54→{A+L2}
:End
:For(A,0,19)
:Pt-On({A+L1},{A+L2},Pic1)
:End
:DispGraph

In all likelihood, any help will be a "duh" moment. But thanks.

Ps: I did search the forum for similar topics, but I didn't see any.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Compiler troubles
« Reply #1 on: August 15, 2010, 04:05:56 am »
The problem is your header, the

Code: [Select]
.Steel A Parser
Line.  What is after the period is what the parser is trying to create your compiled program as, and so it needs to be 8 characters or shorter (also try to use all and only uppercase letters).  Seems like the error documentation is slightly off.  Try changing it so something just like

Code: [Select]
.AXE or .THEGAME
and it should work.  Also, any future bug reports or problems should be posted in the bug reports topic, just so you know :)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Compiler troubles
« Reply #2 on: August 15, 2010, 07:29:00 am »
You can put additional stuff after the name, though. Example, you could have

Code: [Select]
.AXE The GameAnd if you compile for MirageOS or Ion, the stuff after .AXE would show as the file description in there.

Also welcome to the forums (and the world of Axe programming)

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Axe Compiler troubles
« Reply #3 on: August 15, 2010, 09:08:08 am »
^ THIS.

Since the problem was solved, the best thing I can say is...

Welcome to Omnimaga. :D
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







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 Compiler troubles
« Reply #4 on: August 15, 2010, 03:21:05 pm »
Thanks. That fixed the name problem, although apparently I got my arguments wrong. BASIC-like Syntax would be a good description of Axe from what I've seen. It behaves nothing like the TI-BASIC I'm familiar with. Disp Var gives a lot of weird scrolling text in symbols I've never seen on the calculator before.

And I'll be sure to post in the Bugs thread next time. I must have missed it.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Axe Compiler troubles
« Reply #5 on: August 15, 2010, 03:34:59 pm »
For your Disp problem, put a >Dec after the Disp Var. It's the first option in the MATH menu. Using >Dec displays the pointer as a number, >Char displays it as a character and >Tok diplays it as a token. If you don't put a modifier like that after Disp Var, it will attempt to display it as a string. If you're trying to display a number, there won't be a string, so it'll just output a bunch of garbage, which should be your problem.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

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 Compiler troubles
« Reply #6 on: August 15, 2010, 06:01:02 pm »
I noticed the >Dec in the Documentation after I posted that, but thanks. Does anyone happen to know of a good tutorial on Axe with things like user interaction, such as an Axe equivalent of the Input() command in BASIC? Even getting the Pxl-On command to work would be great. Just Pxl-On(x, y) doesn't appear to draw anything on the screen, although that's likely because I'm confused by the whole buffers concept.
« Last Edit: August 15, 2010, 06:04:23 pm by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Compiler troubles
« Reply #7 on: August 15, 2010, 06:13:36 pm »
The best place to start is the official documentation that comes with Axe. I realize normally everybody just says screw lengthy documentations and doesn't bother with it, but it gives a very good introduction to the basics of Axe. It is well-suited for programmers who are used to TI-BASIC. Although it may look long and hard to read, it isn't all that difficult. Just read it, and trust me, stuff will make a lot more sense. (Maybe not complete sense, but a lot more)
« Last Edit: August 15, 2010, 06:14:22 pm by Runer112 »

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Axe Compiler troubles
« Reply #8 on: August 15, 2010, 06:14:29 pm »
Pxl-On/Off is for sprites (see docu)
Use Pt-On/Off instead

Splut for Android [----------]
Paused/halted indefinitely, might be abandoned, our graphic designer quit and the rest of us simply doesn't have the time to work on it...

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Axe Compiler troubles
« Reply #9 on: August 15, 2010, 06:21:04 pm »
Pxl-On/Off is for sprites (see docu)
Use Pt-On/Off instead
No, he had it right. He probably just forgot a DispGraph after the Pxl-On(x,y).


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Axe Compiler troubles
« Reply #10 on: August 15, 2010, 06:33:13 pm »
Oh wait yeh.... was confused :)
Sorry about that...

Splut for Android [----------]
Paused/halted indefinitely, might be abandoned, our graphic designer quit and the rest of us simply doesn't have the time to work on it...

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 Compiler troubles
« Reply #11 on: August 15, 2010, 06:44:02 pm »
[Facepalm]

Another "Duh" moment. I guess I had assumed it was like TI-BASIC and graph instructions brought up the graph screen.

∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Compiler troubles
« Reply #12 on: August 15, 2010, 06:53:38 pm »
the FIX command is extremely useful, if used right, you won't need to have dispgraph over and over again.  (i probably am wrong.)

and welcome. Warning: stay away from Moria, we are afraid of trolls


(lord of the rings)
« Last Edit: August 15, 2010, 06:54:00 pm by happybobjr »
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe Compiler troubles
« Reply #13 on: August 15, 2010, 08:10:25 pm »
I noticed the >Dec in the Documentation after I posted that, but thanks. Does anyone happen to know of a good tutorial on Axe with things like user interaction, such as an Axe equivalent of the Input() command in BASIC? Even getting the Pxl-On command to work would be great. Just Pxl-On(x, y) doesn't appear to draw anything on the screen, although that's likely because I'm confused by the whole buffers concept.
In Axe (and z80 assembly), stuff is not drawn on the screen automatically, with the exception of a few things, like Output() and Bitmap()/Tangent(). It is stored inside a memory area on the calculator and you need to use the DispGraph command to update the LCD. It was done this way because the LCD driver is very slow, so updating the LCD everytime something new is displayed would be very slow. Also keep in mind Pxl-On( and Text( are X,Y, not Y,X.

In overall the graphic functions and variable storage of Axe are similar to BASIC, but some stuff, while being a bit similar, is different. The language was done so it is easier for BASIC programmers, though, so they don't have to learn a totally new language syntax from the very beginning.

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 Compiler troubles
« Reply #14 on: August 15, 2010, 08:53:35 pm »
Hey, I'm back from a vacation and just noticed this topic.  For your first question, the compiler ignores lowercase letters (unless you're compiling as an app) since program names can not have any lowercase letters.  Instead it will count that as part of the description.  So you were compiling the program "S" with description "teel A Parser" so my guess is that your source code file was also program "S".

The Axe language in general has very high similarity to both Assembly and Basic, so a strong background in either one will definitely help with programming.  An assembly tutorial will have some very useful information for you about how some things actually work and a Basic tutorial would help with program flow since the syntax is similar, however the optimizations are completely different and hardly any basic "tricks" can actually be carried over.  What programming languages do you have a background in?

Reading the entire commands list as well as the documentation should be enough to get started.  Some gaps can be filled with trial and error, other specific things feel free to ask in this forum, that's the primary purpose of it since there are no complete tutorials currently.
___Axe_Parser___
Today the calculator, tomorrow the world!