• Axe Q&A 5 5
Currently:  

Author Topic: Axe Q&A  (Read 532124 times)

0 Members and 1 Guest are viewing this topic.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Q&A
« Reply #135 on: March 04, 2011, 09:09:50 am »
How do I create a program with GetCalc(? I can create appvars just fine, but trying to create a program crashes. (It really just freezes, actually.)
Don't you get the prgm token from the catalog, then type the name of the desired program?

Actually it's under the PRGM menu (PRGM I/O > D:prgm), but yeah, it's the same process as making an appvar. I noticed there are occasionally some issues when the program already exists, however, so try deleting the program before creating it again with GetCalc(.




Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Q&A
« Reply #136 on: March 04, 2011, 10:39:04 am »
Already tried that, providing that's what DelVar Str1 does :P
« Last Edit: March 04, 2011, 10:39:28 am by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Camdenmil

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 121
  • Rating: +4/-0
    • View Profile
Re: Axe Q&A
« Reply #137 on: March 08, 2011, 09:26:08 pm »
Are there any places in axe that goto will cause a memory leak. Does it cause any damage to use goto in a subroutine to go to another part of a subroutine, as long as it ends up returning.
It is bad luck to be superstitious.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Q&A
« Reply #138 on: March 08, 2011, 09:40:13 pm »
I don't think that there are any memory leaks, so long as you make sure you never do anything like goto from a subroutine to your main code.

If you use 'goto' to jump to another subroutine, then as long as you return, there won't be any damage.  As a general rule of thumb, you have to match each 'sub(' with a 'Return'.

Can somebody else confirm?
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #139 on: March 08, 2011, 10:17:52 pm »
I don't think that there are any memory leaks, so long as you make sure you never do anything like goto from a subroutine to your main code.

If you use 'goto' to jump to another subroutine, then as long as you return, there won't be any damage.  As a general rule of thumb, you have to match each 'sub(' with a 'Return'.

Can somebody else confirm?
I can.
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 willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Axe Q&A
« Reply #140 on: March 08, 2011, 10:36:58 pm »
I prefer to never use goto, only sub. I like to program in loops anyways. It keeps you safe from that issue (which is prevalent in many languages) as well.

Anyone ever consider the idea of axe libraries? Not axioms, which are more asm, but basically having a collection of programs that use sub() or similar to use the same easy, optimized code in all your progs. I like the idea myself, and it works in current Axe, you just tend to run out of symbols fairly often :P

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #141 on: March 08, 2011, 10:41:55 pm »
Such as an menu rutine. I have a pretty sexy one right now. (you won't see it until i release demo of my secret project >:D )
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 willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Axe Q&A
« Reply #142 on: March 08, 2011, 10:43:09 pm »
ooh!

Is it customizable?

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #143 on: March 08, 2011, 10:50:48 pm »
ooh!

Is it customizable?
Naturally. ;)
Hint: It is a utility to help a person program in axe ;)
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 willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Axe Q&A
« Reply #144 on: March 08, 2011, 11:20:01 pm »
aah. I was referring more to something akin to stdio.h in C, a lib, not a program.

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 Q&A
« Reply #145 on: March 11, 2011, 10:56:09 am »
How do I use interrupts?
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 Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Q&A
« Reply #146 on: March 11, 2011, 10:57:19 am »
Put your interrupt code in a label, then start it up with fnInt(LBL,SPEED) where SPEED is the frequency you want the interrupt to run at. It's all in the commands.html file :)

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Q&A
« Reply #147 on: March 12, 2011, 10:05:01 am »
:w00t: nice!!!! I didnt know that. would be useful!!!

How to do animated tiles? Its for my mario game
« Last Edit: March 12, 2011, 10:05:51 am by aeTIos »
I'm not a nerd but I pretend:

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Q&A
« Reply #148 on: March 12, 2011, 10:11:11 am »
Treat the tiles as independent moving objects like with bullets and enemies (put them in an array) and redraw them every frame.




Offline Camdenmil

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 121
  • Rating: +4/-0
    • View Profile
Re: Axe Q&A
« Reply #149 on: March 13, 2011, 01:00:27 am »
I'm trying to make an axiom and tried assembling memkit to make sure I had everything set up right. When I try to use it, axe just says bad axiom, how to I get axe to accept it?
It is bad luck to be superstitious.