Author Topic: Running Basic Programs in Axe  (Read 8813 times)

0 Members and 1 Guest are viewing this topic.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Running Basic Programs in Axe
« on: March 09, 2016, 05:22:52 pm »
So... I figured out how to, like the title suggests, RUN BASIC PROGRAMS FROM AXE!
Without more of an intro, here is the code.

.NAME
GetCalc("prgmBASIC",Y1 //gets the pointer to the basic program
[0523]->Str1           //stores the memory location of the home screen
GetCalc(Str1,{Y1-2}r) -> A
Copy(Y1,A,{Y1-2}r      //copy the program to the home screen
Asm(21F8893E02AE77)    //enables loops, if blocks, ect... on the home screen
Str1:Asm(E7EF9B4A)     //runs the program
Asm(21F8893E02AE77)    //returns to normal home screen

And that is all! Once this is compiled and run, it will execute prgmBASIC!
(Your previous entry will be the program that you just run...)
I imagine something bad will happen if the basic program throws and error, I probably should have included some kind of error handler (like the Runprgm Axiom)
I got the home screen swap hex code from here: http://tibasicdev.wikidot.com/hexcodes
Thanks Runner for the program execution hex code!

This works on my ti-84, is there any improvements I should make?
I'm still around... kind of.

Offline Dudeman313

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 106
  • Rating: +2/-0
  • I am the embodiment of honorificabilitudinity.
    • View Profile
Re: Running Basic Programs in Axe
« Reply #1 on: March 09, 2016, 08:11:15 pm »
That looks interesting! I wonder what happens if you try to run a non-existent program, tho....
I would tell you what you could improve on, but I still don't know Axe(but I'm starting in BASIC).
But nice!  :thumbsup:
Does this qualify as a signature?
The answer is "Sure."

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Running Basic Programs in Axe
« Reply #2 on: March 09, 2016, 08:42:34 pm »
If you try to run a non existent program the screen just flashes for a second and then clears and displays done on the top right corner.
Nothing bad seems to happen. If the Basic program throws an error (Like if the user hit the ON key) the program quits the same way as usual. Overall it acts like you ran the program normally from the home screen. (with the exception of a nonexistent program)
(Learning Basic is the best place to start - that is where I began!)
I'm still around... kind of.

Offline Dudeman313

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 106
  • Rating: +2/-0
  • I am the embodiment of honorificabilitudinity.
    • View Profile
Re: Running Basic Programs in Axe
« Reply #3 on: March 09, 2016, 09:39:52 pm »
So, because you are running basic thru Axe, is it as fast as Axe, or as slow as basic? For example, would DJ Omnimaga's original Reuben Quest 2 run as fast as Sorunome's Axe app? Or would there be no change in running speed?
Does this qualify as a signature?
The answer is "Sure."

Offline Ivoah

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +3/-0
    • View Profile
    • Codinghobbit
Re: Running Basic Programs in Axe
« Reply #4 on: March 09, 2016, 09:40:47 pm »
So, because you are running basic thru Axe, is it as fast as Axe, or as slow as basic? For example, would DJ Omnimaga's original Reuben Quest 2 run as fast as Sorunome's Axe app? Or would there be no change in running speed?
There's no change in speed, since TI's BASIC interpreter is still actually running it. The Axe program just tells it what to run.
http://codinghobbit.no-ip.org
My Calcs:
TI-86 (now broken) $2
TI SR-56 - $0
TI-Nspire CX CAS - $152
TI-84+ Silver Edition - $56
TI-84+ Silver Edition - $0
TI-85 - $0
TI-73 Explorer VS - $10
ViewScreen - $3

Offline Dudeman313

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 106
  • Rating: +2/-0
  • I am the embodiment of honorificabilitudinity.
    • View Profile
Re: Running Basic Programs in Axe
« Reply #5 on: March 09, 2016, 09:54:07 pm »
Oh okay. But with this, you could have a TI-BASIC puzzle game inside an Axe RPG?
mumble mumble Reuben mumble Quest mumble mumble 3 mumble....
Does this qualify as a signature?
The answer is "Sure."

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Running Basic Programs in Axe
« Reply #6 on: March 10, 2016, 03:30:52 am »
First, I want to say I am impressed at how you pieced that together (reminds me of my early days of hex coding).

This may be more efficient and smaller.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Running Basic Programs in Axe
« Reply #7 on: March 10, 2016, 03:44:32 pm »
Thanks!
I mainly started it because Runner said that he didn't know of a way to run basic programs from Axe.
I'm not sure if he meant in pure Axe or with hex codes.
(now that I think about it, of course you can run basic programs with hex, it can be done in asm)

While I was posting I just realized that I am not sure on the correct pronunciation of Axe.
I just pronounce it like the tool ax, is that correct?
I'm still around... kind of.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Running Basic Programs in Axe
« Reply #8 on: March 10, 2016, 06:01:59 pm »
It's pronounced like 'Ask'   :devil:

Spoiler For Spoiler:
Runer112 says I can't intentionally spread misinformation :( Yes, it is pronounced like "ax" :P

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Running Basic Programs in Axe
« Reply #9 on: March 10, 2016, 06:23:06 pm »
Axe and Ax are the same thing, thus they are pronounced the same. I'm more familiar with the spelling that uses the "e" on the end. I don't think I've seen the tool spelled ax before.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Running Basic Programs in Axe
« Reply #10 on: March 13, 2016, 01:42:32 pm »
I am working on a hybrid asm-basic program with this discovery and I am wondering, how do you disable the APD in basic while waiting for input?
I'm still around... kind of.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Running Basic Programs in Axe
« Reply #11 on: March 15, 2016, 04:54:31 pm »
You cannot disable APD in BASIC, however, APD only happens with the functions Input, Pause, and Menu( (I may have missed something). In Axe, I think this should do the trick:
Code: [Select]
Asm(FDCB0896)

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Running Basic Programs in Axe
« Reply #12 on: March 20, 2016, 12:28:58 pm »
Thanks!
I haven't tried the code but it has an odd number of characters.
Don't all hex codes need to have an even number?
I'm still around... kind of.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Running Basic Programs in Axe
« Reply #13 on: March 22, 2016, 06:59:44 pm »
Oops, sorry. Somehow I forgot the '8' :S
(I edited the post with the code).