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

0 Members and 2 Guests are viewing this topic.

Offline Axe Programmer

  • LV2 Member (Next: 40)
  • **
  • Posts: 32
  • Rating: +0/-0
    • View Profile
Re: Axe Q&A
« Reply #1845 on: April 13, 2015, 01:56:42 pm »
Hey guys is there a way to edit axe programs on a computer? My program is over 15000 bytes and its a pain to scroll to the bottom every time. I already have an emulator on my computer to run the program, i just need to know how to edit the whole thing in a large document in order for me to program it faster.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1846 on: April 13, 2015, 02:48:11 pm »
I recently made a mega-post of every good Axe coding tool I know about. Here's an excerpt that should interest you:

IDE
  • SourceCoder : Browser-based TI-BASIC editor and image converter. Directly links with jsTIfied.
  • TokenIDE ★ Windows-based TI-BASIC editor with an Axe token set and sprite/image editor. Works on Linux with Mono.
  • IES : Browser-based TI-BASIC editor with an Axe token set and simple picture editor.

Offline Axe Programmer

  • LV2 Member (Next: 40)
  • **
  • Posts: 32
  • Rating: +0/-0
    • View Profile
Re: Axe Q&A
« Reply #1847 on: April 20, 2015, 03:51:56 pm »
Thank you! And since this is a Q&A I will be asking a ton of questions lol. Is there a hex code or command in Axe to receive the amount of ram left currently on your calculator and store it to a variable? Thanks in advance.

Offline Digital

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 107
  • Rating: +0/-0
  • 10101
    • View Profile
    • Digital's Hp
Re: Axe Q&A
« Reply #1848 on: April 20, 2015, 04:37:08 pm »
feel free to ask ;) if you have bigger problems or questions make a new thread in the axe subforum.
with asm() you can insert these hexcodes (called asm opcodes) into your programm. I think the asm code you need is
Code: [Select]
asm(EFE542EF9247EF5641EFBF4AC9)store the value to a variable and display it as a decimal:
Code: [Select]
->A
Disp A›Dec

I wrote this from my mind and I'm don't know whether this is correct. (but I think so)

also here is a list of some asm codes, but watch out the tutorial isn't about axe:http://tibasicdev.wikidot.com/hexcodes#toc52
I'm sorry if i might make some mistakes, I'm German so English isn't my first language. Please correct me :)

Offline Axe Programmer

  • LV2 Member (Next: 40)
  • **
  • Posts: 32
  • Rating: +0/-0
    • View Profile
Re: Axe Q&A
« Reply #1849 on: April 20, 2015, 04:48:56 pm »
thanks! this helped a lot!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1850 on: April 20, 2015, 04:53:18 pm »
That looks like a snippet intended for use by a BASIC program. In Axe, the snippet becomes much simpler, as it's just the system call with no wrapper logic needed: Asm(EFE542).

Offline Digital

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 107
  • Rating: +0/-0
  • 10101
    • View Profile
    • Digital's Hp
Re: Axe Q&A
« Reply #1851 on: April 20, 2015, 05:13:31 pm »
for the axe use of asm codes look here: https://www.omnimaga.org/ti-basic-language/zeda%27s-hex-codes/60/
(i remembered that thread but I didn't remebered the link)
I'm sorry if i might make some mistakes, I'm German so English isn't my first language. Please correct me :)

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Axe Q&A
« Reply #1852 on: April 30, 2015, 07:18:05 am »
I have some questions about random numbers in axe:
1) how do I seed the random numbers generator?
2) once seeded will the rng always return the same stream of numbers?
-German Kuznetsov
The impossible chemical compound.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Axe Q&A
« Reply #1853 on: April 30, 2015, 08:02:16 am »
You, as in the programmer, doesn't seed the random number generator, that happens automatically.

If two seeds were to be identical then, yes, the number stream would be the same
EDIT: Trust Runer on this, i just used basic comp sci knowledge to answer, to which that timer would theoretically count towards the seed
EDIT2: Just listen to Runer
« Last Edit: April 30, 2015, 09:23:21 am by Sorunome »

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1854 on: April 30, 2015, 08:55:09 am »
1) how do I seed the random numbers generator?

You could theoretically set the seed, as the seed value does exist at a fixed location in memory. But this is relatively pointless, because...

2) once seeded will the rng always return the same stream of numbers?

No. Axe's PRNG is not deterministic, as it uses both a time source and a pseudorandom memory read as sources of entropy for every number generated.

This has always bothered me, really... would people be interested in it being replaced with a deterministic PRNG?

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Axe Q&A
« Reply #1855 on: April 30, 2015, 03:46:56 pm »
-snip-
This has always bothered me, really... would people be interested in it being replaced with a deterministic PRNG?
Well I might need it for a sandbox game prototype ime working on. You now, seeds.
But yea thanks  :thumbsup:
-German Kuznetsov
The impossible chemical compound.

Offline animaaron

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
    • View Profile
Re: Axe Q&A
« Reply #1856 on: April 30, 2015, 05:41:21 pm »
I don't understand what the r1 pointers (found under the vars>polar menu) are used for

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1857 on: April 30, 2015, 06:15:05 pm »
I don't understand what the r1 pointers (found under the vars>polar menu) are used for

Those are the variables that function arguments are stored in. For instance, Func(A,B,C) is effectively syntactic sugar for A→r₁:B→r₂:C→r₃:Func().

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Axe Q&A
« Reply #1858 on: May 07, 2015, 11:16:13 am »
Two questions
1) how many cpu  Cycles does it take to read a byte from a file like {y1}
And doing exp》{y1}  automaticallysagves it to the appvar that very instance right?
-German Kuznetsov
The impossible chemical compound.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1859 on: May 07, 2015, 11:29:57 am »
1) how many cpu  Cycles does it take to read a byte from a file like {y1}

About 200 cycles. For reference, it only takes 14 cycles to read a byte from RAM. So if you're going to read this data often and are worried about speed, you should consider migrating this data to RAM.

And doing exp》{y1}  automaticallysagves it to the appvar that very instance right?

Is supposed to be , the store operator? In that case, I hope Axe would throw an error if you tried to compile that, as you cannot (for most intents and purposes) write data directly to archive.

Combining your two questions together, it sounds like you're planning on doing many read/write operations to an appvar. In that case, you should probably UnArchive it to work on it and Archive it when done.