Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Xeda112358 on March 03, 2011, 05:36:24 am

Title: Axe: How to Execute BASIC Programs
Post by: Xeda112358 on March 03, 2011, 05:36:24 am
Okay, so earlier I was asked by aeTIos for a hex code to run BASIC programs in Axe and I have heard that this was requested by others, so here goes my rendition... I am sorry in advance if my Axeing is horrible, this is only my second routine:
Code: [Select]
"prgmHELLO"→Str1                     ;Name of the var
Str1                                 ;To get the pointer to the string in HL (Ans)
Asm(E7FDCB08CEEF9B4AFDCB088E         ;

As a word of warning, do not use "Stop" in your BASIC programs... This seems to cause a crash :(
You can use "Return" and all the other commands, though, to my knowledge.

I hope this helps!
Title: Re: Axe: How to Execute BASIC Programs
Post by: Fast Crash on March 03, 2011, 06:13:45 am
Thank you very much ! And yeah "Stop" also causes crashes with NoShell.
Title: Re: Axe: How to Execute BASIC Programs
Post by: aeTIos on March 03, 2011, 06:34:26 am
Thanks this will help me very much!
Title: Re: Axe: How to Execute BASIC Programs
Post by: Broseph Radson on March 03, 2011, 08:36:11 am
Thank you!!! yey!
Edit: Already have a mini command line working  :w00t:
Title: Re: Axe: How to Execute BASIC Programs
Post by: Munchor on March 03, 2011, 11:14:33 am
Okay, so earlier I was asked by aeTIos for a hex code to run BASIC programs in Axe and I have heard that this was requested by others, so here goes my rendition... I am sorry in advance if my Axeing is horrible, this is only my second routine:
Code: [Select]
"prgmHELLO"→Str1                     ;Name of the var
Str1                                 ;To get the pointer to the string in HL (Ans)
Asm(E7FDCB08CEEF9B4AFDCB088E         ;

As a word of warning, do not use "Stop" in your BASIC programs... This seems to cause a crash :(
You can use "Return" and all the other commands, though, to my knowledge.

I hope this helps!

Code: [Select]
rst 20h
set 1,(iy+8)
B_CALL (_ParseInp)
res 1,(iy+8)

I see what you did there :P
Title: Re: Axe: How to Execute BASIC Programs
Post by: Xeda112358 on March 03, 2011, 01:03:38 pm
Ah, do you know why the set and res are there ? ^-^
Title: Re: Axe: How to Execute BASIC Programs
Post by: DJ Omnimaga on March 03, 2011, 03:47:45 pm
Nice Xeda, a lot of people have been looking for this for ages now. Good job :D
Title: Re: Axe: How to Execute BASIC Programs
Post by: ralphdspam on March 03, 2011, 10:45:49 pm
Thanks! This will be very helpful! :D
Title: Re: Axe: How to Execute BASIC Programs
Post by: thepenguin77 on March 03, 2011, 11:02:06 pm
Ah, do you know why the set and res are there ? ^-^

I do. Those allow getKey to return with On also. They occur around the bcall(_getKey) that waits for a key after does the ram cleared screen.
Title: Re: Axe: How to Execute BASIC Programs
Post by: Xeda112358 on March 04, 2011, 02:17:03 am
hehe, not quite >_>
I'll give a hint...
http://tibasicdev.wikidot.com/hexcodes#toc0
Title: Re: Axe: How to Execute BASIC Programs
Post by: DJ Omnimaga on March 04, 2011, 02:18:53 am
Wait this let us use program commands on the home screen? O.O
Title: Re: Axe: How to Execute BASIC Programs
Post by: Xeda112358 on March 04, 2011, 02:21:53 am
Not quite... What happens is that when you run the program, only the stuff you could use on the homescreen (or in a y= var) can be used. As soon as I figured this out, I just added the code to set BASIC mode and after the program is done, it returns to EQU mode.
Title: Re: Axe: How to Execute BASIC Programs
Post by: DJ Omnimaga on March 04, 2011, 02:22:50 am
Oh ok. So that's why Unarchive/Archive would work, then?
Title: Re: Axe: How to Execute BASIC Programs
Post by: Xeda112358 on March 04, 2011, 02:26:53 am
Unarchive/archive would not work in the BASIC program for program vars (unless you run the code I linked to)... that is kind of confusing, sorry.
Title: Re: Axe: How to Execute BASIC Programs
Post by: DJ Omnimaga on March 04, 2011, 02:30:52 am
Ok, I am confused too now. X.x I was wondering since the TIBD link specified something about Archive/Unarchive.
Title: Re: Axe: How to Execute BASIC Programs
Post by: Xeda112358 on March 04, 2011, 02:36:42 am
Yeah, in the regular mode, you can use Archive/Unarchive on a program, but regular BASIC code cannot be used. In BASIC mode, you cannot use Archive/Unarchive on a program, but you can still use regular BASIC code.

The default when an asm program is run is the regular mode, so I need to turn it off to BASIC mode in order to run BASIC commands like Pause. Then when it is finished, I turn it back to regular mode.
Title: Re: Axe: How to Execute BASIC Programs
Post by: DJ Omnimaga on March 04, 2011, 02:59:54 am
Yeah, in the regular mode, you can use Archive/Unarchive on a program, but regular BASIC code cannot be used. In BASIC mode, you cannot use Archive/Unarchive on a program, but you can still use regular BASIC code.

The default when an asm program is run is the regular mode, so I need to turn it off to BASIC mode in order to run BASIC commands like Pause. Then when it is finished, I turn it back to regular mode.
But your previous post states otherwise ???

Unarchive/archive would not work in the BASIC program for program vars (unless you run the code I linked to)... that is kind of confusing, sorry.

Title: Re: Axe: How to Execute BASIC Programs
Post by: Builderboy on March 04, 2011, 03:03:42 am
I think what she means is that if she doesn't set a certain flag, the OS thinks everything is being excecuted by typing it into the homescreen, and so you won't be able to use If, While, Goto, or any of those, and you will be able to archive and unarchive programs. 
Title: Re: Axe: How to Execute BASIC Programs
Post by: TIfanx1999 on March 04, 2011, 09:22:30 am
@DJ: The program in the first post allows BASIC programs to be executed from AXE. The first piece of hex listed <a href="http://tibasicdev.wikidot.com/hexcodes#toc0"> here</a> allows you to do the archive/unarchive on program vars from within a program. It also allows If and For to be used on the homescreen until you call the code again and disable it. I think that's it. :)

@Builderboy: Don't you mean <b>she</b>? :P
Title: Re: Axe: How to Execute BASIC Programs
Post by: Broseph Radson on March 04, 2011, 09:26:09 am
@Builderboy: Don't you mean <b>she</b>? :P

Lul
Title: Re: Axe: How to Execute BASIC Programs
Post by: Xeda112358 on March 04, 2011, 12:20:07 pm
I think what he means is that if he doesn't set a certain flag, the OS thinks everything is being excecuted by typing it into the homescreen, and so you won't be able to use If, While, Goto, or any of those, and you will be able to archive and unarchive programs. 
That is exactly it :D
I got the idea to set this mode from that code.