Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 June, 2013, 00:38:20 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1] 2 3 ... 110   Go Down
  Print  
Author Topic: Axe Q&A -  (Read 60142 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
squidgetx
Food.
Coder Of Tomorrow
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: 16 June, 2013, 19:53:03
Date Registered: 30 May, 2010, 19:54:18
Location: eating somewhere
Posts: 1849


Topic starter
Total Post Ratings: +480

View Profile
« on: 12 February, 2011, 18:28:50 »
+2

Since we no longer have the Axe Parser general thread due to the forum split (and since q/a wasn't even that appropriate for the Axe Parser thread), this topic will be the new quick question/answer thread. Smiley
If you have any quick questions about Axe programming: things that you feel don't quite merit their own thread, feel free to post them here. Smiley Anyone able to answer your question will most certainly do so.

Questions like "What does [function] do" or "How do I do grayscale" are suited for this thread, while we encourage the creation of a new thread for more indepth questions and issues Smiley

FAQ/RANDOM:

Please, do not refer to Axe "lists" L1, L2, etc. as "lists." Instead, refer to them as "saferam" or "free ram." The term "list" is reserved for the OS lists that are used in plots and BASIC
Q-Help! Why doesn't Fill({L1},1000) work?
Fill() takes a pointer as an argument. Fill({L1},XXX) is incorrect. You want Fill(L1,XXX). Same with the Copy/Exch commands.[/green]

Q-Help! My program is inexplicably crashing on execution!
A-Asm programs have a size limit of 8192 bytes. If you compile for MOS/DCS, you have a limit of 8811 bytes of code, and unlimited data (well as much data that you can fit into RAM). If you're over 8811 bytes, you might want to think about compiling to an application, using Crabcake or Fullrene. or optimizing some more.

Q-How come this doesn't work: 0->{GDB1+xxxx}???
A-GDB1, Str1, etc. are all static pointers This means that you aren't supposed to change the data defined there. You can however, do this (called SMC; and be warned that it will not work in an application) by using Copy and Exch, or by storing the static pointer to a variable and then using that variable as a pointer instead, eg GDB1->theta:0->{theta}

Q-How do I do realistic gravity???
A: Check out Builderboy's physics lessons.
« Last Edit: 04 March, 2012, 03:13:25 by squidgetx » Logged

Read my webcomic! | My SoundCloud
Projects:

Check out the demo now!- Current progress: battle engine and stuff
Proud author of: Cuberunner | SpaceDash | The Psyche | XXEdit | AxeSynth | StickNinja | Gravity Guy | Embers:Phoenix | Zombie Gun
Axe: Need help optimizing?
User of Axe | zStart | TokenIDE | CalcGS | MirageOS
aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:37:53
Date Registered: 15 September, 2010, 06:00:00
Location: Netherlands, Overijssel
Posts: 3144


Total Post Ratings: +120

View Profile
« Reply #1 on: 12 February, 2011, 21:38:15 »
0

Yay 1st question!

How to deal with variable string lengths, like as in an input routine?
Logged

If something above sounds rude, feel free to vote it down, it was not meant to be rude<<lolol
--Always stay relAXEd!--


Spoiler for Hidden:


[







Spoiler for Still Alive:
This was a triumph.
I'm making a note here: HUGE SUCCESS.
It's hard to overstate my satisfaction.

Aperture Science:
We do what we must because we can.
For the good of all of us
Except the ones who are dead.

But there's no sense crying over every mistake
You just keep on trying till you run out of cake
And the science gets done and you make a neat gun
For the people who are still alive.

I'm not even angry.
I'm being so sincere right now.
Even though you broke my heart and killed me.
And tore me to pieces.
And threw every piece into a fire.
As they burned it hurt because
I was so happy for you.

Now these points of data make a beautiful line
And we're out of beta we're releasing on time.
So I'm GLaD I got burned think of all the things we learned
For the people who are still alive.

Go ahead and leave me.
I think I prefer to stay inside.
Maybe you'll find someone else to help you.
Maybe Black Mesa -
THAT WAS A JOKE. HA HA, FAT CHANCE.
Anyway, this cake is great:
It's so delicious and moist.

Look at me still talking when there's science to do.
When I look out there it makes me GLaD I'm not you.
I've experiments to run there is research to be done
On the people who are still alive

And believe me I am still alive.
I'm doing science and I'm still alive.
I feel FANTASTIC and I'm still alive.
While you're dying I'll be still alive.
And when you're dead I will be still alive.

Still alive
Still alive
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Yesterday at 07:32:26
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645


Total Post Ratings: +589

View Profile
« Reply #2 on: 12 February, 2011, 21:39:06 »
0

what do you mean how to deal with them?  What do you need to do?
Logged

aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:37:53
Date Registered: 15 September, 2010, 06:00:00
Location: Netherlands, Overijssel
Posts: 3144


Total Post Ratings: +120

View Profile
« Reply #3 on: 12 February, 2011, 21:41:35 »
0

I mean, if you put in some data in str1, the next time you start the program the same data is still in str1 ( maybe this is more like self-modifying-code )
Logged

If something above sounds rude, feel free to vote it down, it was not meant to be rude<<lolol
--Always stay relAXEd!--


Spoiler for Hidden:


[







Spoiler for Still Alive:
This was a triumph.
I'm making a note here: HUGE SUCCESS.
It's hard to overstate my satisfaction.

Aperture Science:
We do what we must because we can.
For the good of all of us
Except the ones who are dead.

But there's no sense crying over every mistake
You just keep on trying till you run out of cake
And the science gets done and you make a neat gun
For the people who are still alive.

I'm not even angry.
I'm being so sincere right now.
Even though you broke my heart and killed me.
And tore me to pieces.
And threw every piece into a fire.
As they burned it hurt because
I was so happy for you.

Now these points of data make a beautiful line
And we're out of beta we're releasing on time.
So I'm GLaD I got burned think of all the things we learned
For the people who are still alive.

Go ahead and leave me.
I think I prefer to stay inside.
Maybe you'll find someone else to help you.
Maybe Black Mesa -
THAT WAS A JOKE. HA HA, FAT CHANCE.
Anyway, this cake is great:
It's so delicious and moist.

Look at me still talking when there's science to do.
When I look out there it makes me GLaD I'm not you.
I've experiments to run there is research to be done
On the people who are still alive

And believe me I am still alive.
I'm doing science and I'm still alive.
I feel FANTASTIC and I'm still alive.
While you're dying I'll be still alive.
And when you're dead I will be still alive.

Still alive
Still alive
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: 17 June, 2013, 03:12:44
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7832


Total Post Ratings: +713

View Profile WWW
« Reply #4 on: 12 February, 2011, 21:45:37 »
0

You mean saving back to the program? Because (as you probably know) Str1 isn't a real variable. It's a chunk of bytes in the program itself. So if you want to save back to the program, you have to find the program in memory, then calculate the offset of Str1 from the beginning of the program, then Copy( the bytes there. I made a little routine to do that in PapiJump Cheesy Let's see if I can find it...
Logged




aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:37:53
Date Registered: 15 September, 2010, 06:00:00
Location: Netherlands, Overijssel
Posts: 3144


Total Post Ratings: +120

View Profile
« Reply #5 on: 12 February, 2011, 21:47:11 »
0

Yes, restoring the default value of a string, that would help me out a whole lot times Cheesy
Logged

If something above sounds rude, feel free to vote it down, it was not meant to be rude<<lolol
--Always stay relAXEd!--


Spoiler for Hidden:


[







Spoiler for Still Alive:
This was a triumph.
I'm making a note here: HUGE SUCCESS.
It's hard to overstate my satisfaction.

Aperture Science:
We do what we must because we can.
For the good of all of us
Except the ones who are dead.

But there's no sense crying over every mistake
You just keep on trying till you run out of cake
And the science gets done and you make a neat gun
For the people who are still alive.

I'm not even angry.
I'm being so sincere right now.
Even though you broke my heart and killed me.
And tore me to pieces.
And threw every piece into a fire.
As they burned it hurt because
I was so happy for you.

Now these points of data make a beautiful line
And we're out of beta we're releasing on time.
So I'm GLaD I got burned think of all the things we learned
For the people who are still alive.

Go ahead and leave me.
I think I prefer to stay inside.
Maybe you'll find someone else to help you.
Maybe Black Mesa -
THAT WAS A JOKE. HA HA, FAT CHANCE.
Anyway, this cake is great:
It's so delicious and moist.

Look at me still talking when there's science to do.
When I look out there it makes me GLaD I'm not you.
I've experiments to run there is research to be done
On the people who are still alive

And believe me I am still alive.
I'm doing science and I'm still alive.
I feel FANTASTIC and I'm still alive.
While you're dying I'll be still alive.
And when you're dead I will be still alive.

Still alive
Still alive
Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: 17 June, 2013, 03:12:44
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7832


Total Post Ratings: +713

View Profile WWW
« Reply #6 on: 12 February, 2011, 21:48:01 »
0

Yes, restoring the default value of a string, that would help me out a whole lot times Cheesy


Wait, what exactly are you trying to do?
Logged




aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:37:53
Date Registered: 15 September, 2010, 06:00:00
Location: Netherlands, Overijssel
Posts: 3144


Total Post Ratings: +120

View Profile
« Reply #7 on: 12 February, 2011, 21:49:10 »
0

nvm, what you said earlier
<offtopic> yay my axeparser usrbar changed lol </offtopic>
and, I lost You just lost the game
« Last Edit: 12 February, 2011, 21:50:00 by aeTIos » Logged

If something above sounds rude, feel free to vote it down, it was not meant to be rude<<lolol
--Always stay relAXEd!--


Spoiler for Hidden:


[







Spoiler for Still Alive:
This was a triumph.
I'm making a note here: HUGE SUCCESS.
It's hard to overstate my satisfaction.

Aperture Science:
We do what we must because we can.
For the good of all of us
Except the ones who are dead.

But there's no sense crying over every mistake
You just keep on trying till you run out of cake
And the science gets done and you make a neat gun
For the people who are still alive.

I'm not even angry.
I'm being so sincere right now.
Even though you broke my heart and killed me.
And tore me to pieces.
And threw every piece into a fire.
As they burned it hurt because
I was so happy for you.

Now these points of data make a beautiful line
And we're out of beta we're releasing on time.
So I'm GLaD I got burned think of all the things we learned
For the people who are still alive.

Go ahead and leave me.
I think I prefer to stay inside.
Maybe you'll find someone else to help you.
Maybe Black Mesa -
THAT WAS A JOKE. HA HA, FAT CHANCE.
Anyway, this cake is great:
It's so delicious and moist.

Look at me still talking when there's science to do.
When I look out there it makes me GLaD I'm not you.
I've experiments to run there is research to be done
On the people who are still alive

And believe me I am still alive.
I'm doing science and I'm still alive.
I feel FANTASTIC and I'm still alive.
While you're dying I'll be still alive.
And when you're dead I will be still alive.

Still alive
Still alive
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Yesterday at 07:32:26
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645


Total Post Ratings: +589

View Profile
« Reply #8 on: 12 February, 2011, 21:51:06 »
0

Well if you use MirageOS, it has automatic copyBack, so anything you modify will stay modified.  Maybe just make your program for MirageOS/Doors?
Logged

Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: 17 June, 2013, 03:12:44
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7832


Total Post Ratings: +713

View Profile WWW
« Reply #9 on: 12 February, 2011, 21:53:25 »
0

Well if you use MirageOS, it has automatic copyBack, so anything you modify will stay modified.  Maybe just make your program for MirageOS/Doors?

That would work, and if by

Yes, restoring the default value of a string, that would help me out a whole lot times Cheesy


you meant you want it to stay unmodified, just use a saferam area (L1, L2, etc.) and initialize it at the beginning of your program.
Logged




aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:37:53
Date Registered: 15 September, 2010, 06:00:00
Location: Netherlands, Overijssel
Posts: 3144


Total Post Ratings: +120

View Profile
« Reply #10 on: 12 February, 2011, 21:54:25 »
0

Sorry, i'm not clear.
What I mean, is actually not the modifying. so if I set "0000->str1, the next time its loaded, it should be again "0000 and not "1111 or so.
I hope this is more clear and not ambiguous (is that the right word here?)

EDIT: and, Deep Thought, I've tried that earlier, but that didnt work Huh?

EDIT2: nvm, understood it.
« Last Edit: 12 February, 2011, 21:59:24 by aeTIos » Logged

If something above sounds rude, feel free to vote it down, it was not meant to be rude<<lolol
--Always stay relAXEd!--


Spoiler for Hidden:


[







Spoiler for Still Alive:
This was a triumph.
I'm making a note here: HUGE SUCCESS.
It's hard to overstate my satisfaction.

Aperture Science:
We do what we must because we can.
For the good of all of us
Except the ones who are dead.

But there's no sense crying over every mistake
You just keep on trying till you run out of cake
And the science gets done and you make a neat gun
For the people who are still alive.

I'm not even angry.
I'm being so sincere right now.
Even though you broke my heart and killed me.
And tore me to pieces.
And threw every piece into a fire.
As they burned it hurt because
I was so happy for you.

Now these points of data make a beautiful line
And we're out of beta we're releasing on time.
So I'm GLaD I got burned think of all the things we learned
For the people who are still alive.

Go ahead and leave me.
I think I prefer to stay inside.
Maybe you'll find someone else to help you.
Maybe Black Mesa -
THAT WAS A JOKE. HA HA, FAT CHANCE.
Anyway, this cake is great:
It's so delicious and moist.

Look at me still talking when there's science to do.
When I look out there it makes me GLaD I'm not you.
I've experiments to run there is research to be done
On the people who are still alive

And believe me I am still alive.
I'm doing science and I'm still alive.
I feel FANTASTIC and I'm still alive.
While you're dying I'll be still alive.
And when you're dead I will be still alive.

Still alive
Still alive
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Yesterday at 07:32:26
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645


Total Post Ratings: +589

View Profile
« Reply #11 on: 12 February, 2011, 21:56:04 »
0

So you want the Data to always be the same when you start the program?  The best way to do that would be to never modify it in the first place.  If you need to modify it, you can copy() it to a SafeRam location such as L1 and work with it from there
Logged

aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:37:53
Date Registered: 15 September, 2010, 06:00:00
Location: Netherlands, Overijssel
Posts: 3144


Total Post Ratings: +120

View Profile
« Reply #12 on: 12 February, 2011, 21:58:47 »
0

Ah ok, I understand it, i'll try, thanks all!
Logged

If something above sounds rude, feel free to vote it down, it was not meant to be rude<<lolol
--Always stay relAXEd!--


Spoiler for Hidden:


[







Spoiler for Still Alive:
This was a triumph.
I'm making a note here: HUGE SUCCESS.
It's hard to overstate my satisfaction.

Aperture Science:
We do what we must because we can.
For the good of all of us
Except the ones who are dead.

But there's no sense crying over every mistake
You just keep on trying till you run out of cake
And the science gets done and you make a neat gun
For the people who are still alive.

I'm not even angry.
I'm being so sincere right now.
Even though you broke my heart and killed me.
And tore me to pieces.
And threw every piece into a fire.
As they burned it hurt because
I was so happy for you.

Now these points of data make a beautiful line
And we're out of beta we're releasing on time.
So I'm GLaD I got burned think of all the things we learned
For the people who are still alive.

Go ahead and leave me.
I think I prefer to stay inside.
Maybe you'll find someone else to help you.
Maybe Black Mesa -
THAT WAS A JOKE. HA HA, FAT CHANCE.
Anyway, this cake is great:
It's so delicious and moist.

Look at me still talking when there's science to do.
When I look out there it makes me GLaD I'm not you.
I've experiments to run there is research to be done
On the people who are still alive

And believe me I am still alive.
I'm doing science and I'm still alive.
I feel FANTASTIC and I'm still alive.
While you're dying I'll be still alive.
And when you're dead I will be still alive.

Still alive
Still alive
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Yesterday at 07:32:26
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5645


Total Post Ratings: +589

View Profile
« Reply #13 on: 12 February, 2011, 21:59:50 »
0

Also note that if you are running from the homescreen, there are no issues and the data will always reset back to its default Smiley
Logged

Elsewhere
LV2 Member (Next: 40)
**
Offline Offline

Last Login: 17 February, 2012, 19:59:01
Date Registered: 10 February, 2011, 03:30:44
Posts: 26


Total Post Ratings: +4

View Profile
« Reply #14 on: 12 February, 2011, 23:38:01 »
0

Okay, here's a question (or two):

The Text( command seems to only draw whatever you want it to for one frame at which point the text seems to disappear. Is this just how Text( works or am I doing something wrong? So, if I wanted to output text that would stay there (the graph screen) until I used ClrDraw, how would I go about doing that? (Sprites would be really inefficient, mind you).

Also, what does it mean when I try to run my program after compiling and get ERR:INVALID? I have ample RAM left (>15000) and tons of archive (>100000) so I couldn't think it'd be a memory issue, but all the same it happened after I wrote a few everyday lines. An example of the format these lines were in is:

1
:If A=0:If B=0:Text(1,1,"COOL"):End:End
After commenting those lines out it worked fine again, but if I bring one back my sprites glitch up and more makes me get ERR:INVALIDs again. My game is rather huge, using like, 30 pictures, all the letter variables, and a bit of L1, so it makes me think it might have to do with free RAM or whatever? Mind you, it's not an Axe error but a TI error I'm getting, after trying to run the game.

Logged
Pages: [1] 2 3 ... 110   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.329 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.