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

0 Members and 2 Guests are viewing this topic.

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 #1890 on: October 31, 2015, 04:24:50 am »
That text crashing was due to how arabic text width may get smaller with more chars, so not a possibility here ;)

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

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Axe Q&A
« Reply #1891 on: October 31, 2015, 04:45:57 pm »
That text crashing was due to how arabic text width may get smaller with more chars, so not a possibility here ;)
That is what I meant- when the string was truncated to fit on the screen, it got bigger and went even farther of the screen ;) Unless I misunderstood something :P
-German Kuznetsov
The impossible chemical compound.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Axe Q&A
« Reply #1892 on: November 03, 2015, 07:07:35 pm »
Does anyone know if writing to archive is bad for the memory?
I have heard that repeatedly writing to archive will eventually damage it.

On a different subject, how do programs like Doors find the names of all the programs (and how can I do that in Axe)?
I'm still around... kind of.

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Axe Q&A
« Reply #1893 on: November 03, 2015, 07:26:13 pm »
Does anyone know if writing to archive is bad for the memory?
I have heard that repeatedly writing to archive will eventually damage it.

On a different subject, how do programs like Doors find the names of all the programs (and how can I do that in Axe)?
The flash memory wears down after about 100000 writes to it. Reading does not damage it though.

Doors and other programs (like the axe *compiler itself :P ) get a list of programs by reading from the vat, which is basicly a large list of files, their types, as well as their location in ram/flash. You can either read from it directly, or use the memkit axiom, provided in the download file. Memkit is easy to use with commands like Load() and Next().
-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 #1894 on: November 03, 2015, 07:29:42 pm »
Does anyone know if writing to archive is bad for the memory?
I have heard that repeatedly writing to archive will eventually damage it.

Over a long period of time, yes. Flash memory will eventually start failing to hold data after a lot of writes have been performed. For a calculator, I'm going to make a very rough guess of 10,000 garbage collects, although it could easily be off by a factor of 10 in either direction.

On a different subject, how do programs like Doors find the names of all the programs (and how can I do that in Axe)?

This is done by scanning the Variable Allocation Table (VAT). This can be done in pure Axe, as demonstrated in this brief tutorial. However, it's easier to use an Axiom for this, of which there are two. One is bundled in the Axe download under Tools\MemKit, and another can be grabbed here. The latter is nicer in that it produces results alphabetically, although it does so with the same OS calls used to do things like populate the program menu so it could potentially be rather slow with a lot of variables.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Axe Q&A
« Reply #1895 on: November 05, 2015, 04:10:11 pm »
Is it possible for a pointer to move itself as in A +10 -> A?
I am using A as the pointer to a program.
I am trying to be able to read programs longer than 2^16 bytes.
I'm still around... kind of.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1896 on: November 05, 2015, 04:26:03 pm »
Is it possible for a pointer to move itself as in A +10 -> A?
I am using A as the pointer to a program.

I don't understand what you mean by a pointer "moving itself," but A+10→A is certainly valid and increases the value of the A variable by 10. And if you were using the value of A as a pointer, then you've "moved" the pointer (more accurately, you've changed the location pointed to).

I am trying to be able to read programs longer than 2^16 bytes.

Variables on the calculator cannot be larger than 2^16 bytes = 64KB, and there's only up to about 24KB of free RAM. So I'm not sure what you're getting at here. If you did want to be able to edit large programs, you'd have to store it in smaller pieces.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Axe Q&A
« Reply #1897 on: November 05, 2015, 04:30:47 pm »
I was afraid that pointers couldn't exceed 2^16 from the start of data.
Thanks!

Edit: i thought for some reason that 2 to the 16th was about 6300 instead of 63000.
« Last Edit: November 06, 2015, 11:30:41 am by E37 »
I'm still around... kind of.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Axe Q&A
« Reply #1898 on: November 17, 2015, 05:51:50 pm »
I have been hunting around and I can't seem to fine a good tutorial on how to use the VAT.
Can anyone give me a good tutorial? (I got lost at reading backward)

Also, does anyone have a list of all the OS memory location? (like the VAT is E9830 and E982E and the text pen is E86D7 and E86D8)
Thanks!  ;D
I'm still around... kind of.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1899 on: November 17, 2015, 07:44:13 pm »
I have been hunting around and I can't seem to fine a good tutorial on how to use the VAT.
Can anyone give me a good tutorial? (I got lost at reading backward)

I mentioned this tutorial in a response to an earlier post of yours, which gives a rough overview of the structure of the VAT and how you might scan through it with Axe. And I think I mentioned it before and you didn't seem too interested, but either the official MemKit axiom found in the Axe download or the alphabetical MemKit axiom can provide this functionality for you.

Also, does anyone have a list of all the OS memory location? (like the VAT is E9830 and E982E and the text pen is E86D7 and E86D8)
Thanks!  ;D

The most complete list is found in the equates file used by assembly programs; search for "RAM equates" for the relevant section. It doesn't document what they all mean, and there isn't really such a documentation. WikiTI documents a few, but I've never found this particularly useful. Information about how RAM areas are used is generally found paired with documentation of system calls that interact with them.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Axe Q&A
« Reply #1900 on: November 18, 2015, 03:09:05 pm »
I'm sorry if I came over as rude, I have had a rough week.
For some reason I completely missed the VAT tutorial link the first time - it is really useful.
And... if my comments seem a bit random that is because I am just collecting information - I like to be ready for any project I think up!
I'm still around... kind of.

Offline nabako

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
    • View Profile
Re: Axe Q&A
« Reply #1901 on: November 20, 2015, 12:50:33 pm »
What is the proper way to send data from one calculator to another?
The Command List says "Send(" can send a byte, which is a number 0-(2^8)-1, but when I try to send a Variable and get the Variable with "Get->A"
A doesn't have the value that was sended.

I did loop Get, until A≠-1 but A wont change...
Still a learning Axe coder, but lots of experience with BASIC :)

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1902 on: November 20, 2015, 01:06:54 pm »
What is the proper way to send data from one calculator to another?
The Command List says "Send(" can send a byte, which is a number 0-(2^8)-1, but when I try to send a Variable and get the Variable with "Get->A"
A doesn't have the value that was sended.

I did loop Get, until A≠-1 but A wont change...

First question: what kind of link cable are you using? Because Axe can only send data over the serial port, not the mini USB port.

If you are using a serial link cable, though, sending data should certainly be possible. In this case, could you post the relevant code? Sending data between calculators can be a bit finnicky in terms of synchronization, which is usually why link code doesn't work.

Offline nabako

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
    • View Profile
Re: Axe Q&A
« Reply #1903 on: November 20, 2015, 02:21:11 pm »
I did use the mini USB port.
And I have to use the mini USB because the guys wnating to play the game(thats what im trying to create)
only have the mini USB link cable.

Is there really no way to send any data with that cable?
Still a learning Axe coder, but lots of experience with BASIC :)

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1904 on: November 20, 2015, 02:57:21 pm »
I did use the mini USB port.
And I have to use the mini USB because the guys wnating to play the game(thats what im trying to create)
only have the mini USB link cable.

Is there really no way to send any data with that cable?

It's certainly physically possible to send data with that cable, as the OS does it. But as far as I'm aware, the OS doesn't expose its code for this. At least, not in a useful manner. And USB is more complicated than a simple serial transfer, and nobody has implemented their own code for calc-to-calc USB transfers.