• Axe Q&A 5 5
Currently:  

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

0 Members and 5 Guests are viewing this topic.

Offline c4ooo

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Axe Q&A
« Reply #1935 on: January 27, 2016, 05:24:14 pm »
Do I need to make space for it, or can I just copy a program directly to it?
Copying it directly doesn't work.

Never mind, I messed up the copy statement.

Edit: the program runs fine but crashes when exited (the program in e9D93 not the one who ran it)
Well, the 'program that ran it' sould be an app...
The currently running asm program is always excecuted from 9D93.
-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 #1936 on: January 27, 2016, 05:28:22 pm »
Thanks! My program wasn't an app and it over wrote its self.

Is there any way to prevent
Rect(300,,10,
from showing up on the screen? (I know the screen laps after 256)
It appears in the lower right part of the screen and I don't want it to show up a all.
I am working on a scrolling game where the world is larger than 256 pixels long and some objects lap.  :(
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 #1937 on: March 07, 2016, 06:00:28 pm »
I have another random question to ask!  ;D
I have seen programs that can transfer the ASCII characters to tokens that can be accessed in the program manager.
How does this work? I looked through the token table for some of the characters (mainly for the cursor) and couldn't find them.
Is there an Axe way to get these characters? (I know some programs can add them for you)
Any help would be awesome!
(Do I come over as rude? I sort of feel like I am but can't find a better way to word it.)
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 #1938 on: March 07, 2016, 11:17:26 pm »
I'm not quite sure I understand what you're aiming to do with these tokens. But you can definitely reference any token in Axe, as tokens are just one- or two-byte values, and you can display them with the ▶Tok variant of the text display commands.

Most characters do exist as a token, although the cursor and all of its variants are among those that do not.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Axe Q&A
« Reply #1939 on: March 08, 2016, 04:51:07 am »
@E37 I don't think you come off as rude. Perhaps you were thinking of demanding? I don't think you come off as demanding either though. You've been completely fine. :D This help topic is here for questions to be asked after all. ;)

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 #1940 on: March 08, 2016, 04:43:13 pm »
Thanks! It feels good (in a weird way) to find out that my search was impossible and I wasn't just missing something.

Is there any useful uses of it?
I am assuming that the OS has a flag for whether the enter key is pressed on the home screen.
It there a way I can "activate the flag" and execute anything it has.
I am looking for a way to implement floating point math (It doesn't have to be fast) into my editor as a feature.
Basically I am tired of quitting my program to do a math operation on the home screen. (and I don't want to do long math in my head)
Thanks!
(the whole home screen is a program thing BLEW MY MIND)

However you'd end up doing such a thing, you'd need some things beyond the capabilities of pure Axe. My inclination would be to let the user select a line, or some more specific selection, and then press a button to request that it be replaced with its evaluation. I've never done anything like this before, but it might work something like this (DISCLAIMER: COMPLETELY UNTESTED):
  • (Optional) Save the value of Ans. This gets rather tricky for lists and matrices.
  • Create a temporary equation with the same size as the selection. The clean way to do this in assembly would be to use B_CALL(_CreateTempEqu). But a pure Axe solution would be to use a fixed temporary equation name, like [03FFFF00], and create it with GetCalc(<name>,size).
  • Copy the selection into the temporary equation.
  • Install an error handler around the next step in case an error occurs while parsing the equation. DrDnar's axiom meant for running assembly programs seems to provide this functionality.
  • Execute the temporary equation by putting its name in OP1 and using B_CALL(_ParseInp) (in Axe: <name>Asm(E7EF9B4A)).
  • If an error occurred, handle it as you wish. Perhaps append "=ERROR" to the selection.
  • If no error occurred, convert the result to a string representation. Thankfully, Mateo recently demonstrated how this could be done. In Axe (returns a pointer to the variable's size word): Asm(210000EF2443D5EF6949EF524BEFAB49EF6C49E1).
  • If no error occurred, delete the selection and insert the result's string representation into the program at that location.
  • (Not sure if necessary) Clean up temporary variables with B_CALL(_CleanAll) (in Axe: Asm(EF5041)).
  • (Optional) Restore the original value of Ans.
I am just looking back (after going off and working on random things) on my attempt on an small font editor.
In attempting to fix some problems (with a complete rewrite) I realized that while I was able to execute an equasion, I could only display it as an int. I tried again but after an hour of trying I am still unable to convert the number to a string. How am I able to do this?  ???
(an example would be nice)
What do you mean by "pointer to the variable's size word"?
Thanks!  ;D
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 #1941 on: May 10, 2016, 08:35:16 pm »
Is there any way to run an app from a program?
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 #1942 on: May 10, 2016, 08:55:49 pm »
B_CALL(_ExecuteApp). It won't return to your program, though; if you wanted behavior like that, you'd have to rig something up with hooks.

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 #1943 on: May 18, 2016, 05:47:11 pm »
Are axioms compiled or uncompiled?
(does Axe compile it or do you?)
I'm still around... kind of.

Offline TheMachine02

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 452
  • Rating: +105/-0
  • me = EF99+F41A
    • View Profile
Re: Axe Q&A
« Reply #1944 on: May 20, 2016, 02:02:20 pm »
Axiom are compiled asm code. They aren't axe code compilated (altough that would be cool).

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 #1945 on: May 20, 2016, 03:23:27 pm »
I was curious if the axiom needed to be compiled before it became usable.
I guess what I was asking was is an axiom such as memkit source code (as the 8xv) or already compiled into executable code.
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 #1946 on: May 21, 2016, 04:17:50 pm »
Speaking of axioms, for some reason this code won't work. (I'm using mimas)
dw $C0DE
dw ax1end
db axmAll
db $BB,$1B
db axmInline
db axm0args
rorg 0
ld hl,5

dw 0
dw $03E0
db 5
db "Trial"
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 #1947 on: May 21, 2016, 04:19:16 pm »
Please be more specific ;)
To quote kerm:
"What are you trying to do?
What did you expect to happen? (What errors did you get?)
What actually happened?"
-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 #1948 on: May 21, 2016, 04:20:48 pm »
Trying to make an axiom that actually compiles.
Mimas will compile it but the token won't change and Axe gives an Err:invalid axiom
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 #1949 on: May 21, 2016, 04:28:30 pm »
Perhaps this just got lost in the manual copying process, but is ax1end defined properly?

If so, nothing seems obviously wrong to me. If you posted the assembeld axiom, I could probably figure out what's wrong, though.