Author Topic: Axiom Requests  (Read 110246 times)

0 Members and 1 Guest are viewing this topic.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axiom Requests
« Reply #180 on: December 22, 2012, 03:07:02 pm »
Axe automatically adds ending NULs to the end of strings.
Not always. It adds a zero when the string is followed by a → and when it is inside a Text command, but if you do this:
"String1"
"String2"

none of them will be null-terminated, you need to do that:
"String1"[00]
"String2"[00]

This can be useful when for example you need to put a @ in the middle your text data, you just have to write this: "mymail"[48]"gmail.com, where 48 is the hex for @ (note that the true hex is not 48, I put that number at random).
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

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: Axiom Requests
« Reply #181 on: December 23, 2012, 01:24:04 am »
The runprgm Axiom lets you convert an assembly/Axe program into an appvar, and execute it. The only difference between a program and an appvar is the type byte, so it was easy functionality to implement. Of course, the program is still copied to RAM and run from RAM. Executing an appvar in flash without coping it to RAM is just too much of a headache, due to both the need to change the execution permissions (requires unlocking flash), and the fact that the location would be variable and might cross page boundries. If you really want execution from flash, use an application.
The problem is that with that axiom I can't call functions that are not part of the appvar/the prog.

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

Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: Axiom Requests
« Reply #182 on: December 23, 2012, 02:46:31 am »
The runprgm Axiom lets you convert an assembly/Axe program into an appvar, and execute it. The only difference between a program and an appvar is the type byte, so it was easy functionality to implement. Of course, the program is still copied to RAM and run from RAM. Executing an appvar in flash without coping it to RAM is just too much of a headache, due to both the need to change the execution permissions (requires unlocking flash), and the fact that the location would be variable and might cross page boundries. If you really want execution from flash, use an application.
The problem is that with that axiom I can't call functions that are not part of the appvar/the prog.
What do you want to do? If your main program is an application, the program you called can call functions in the application if you swap it back into memory. There's already an Axiom for that.
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: Axiom Requests
« Reply #183 on: March 06, 2013, 11:41:06 am »
By request of Hayleia and nikitouzz.

#Axiom(MEMKIT2)
Load()Key: Xmin
Next()Key: Xmax
dim()
dim()r
dim()rr
Print(BUF)Key: Xscl
New(PTR,OFS,SIZ)Key: Ymin
Delete(PTR,OFS,SIZ)Key: Ymax

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axiom Requests
« Reply #184 on: March 06, 2013, 11:54:33 am »
For those who wonder what this version of MEMKIT adds to the memkit bundled in Axe's zip, well nothing :P
But it uses a set of tokens that is compatible with Jacobly's TEXT Axiom :)

And Jacobly made (yet) another version of MEMKIT that sorts by alphabetical order, here :)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axiom Requests
« Reply #185 on: July 12, 2013, 12:12:05 pm »
I would like an Axiom (or an hex code if it is less bothering to write) that would basically be the DispGraphrr command, but with no checkerboard pattern. I mean that it would make the whole buffer flicker instead of making two cherckerboards flicker alternatively (not sure if I am clear).
Would it be possible ?
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axiom Requests
« Reply #186 on: July 12, 2013, 12:27:03 pm »
What would be the purpose of such a command? It's possible that I'm misunderstanding your request, but to me it sounds like you're asking for a command that doesn't attempt to create grayscale by combining the main and back buffer contents each frame, but instead only provides the grayscale "weighting" for each pixel by displaying the full main buffer twice for every time the full back buffer is displayed once. If this is what you're looking for, couldn't the affect be achieved in native Axe, like this?

Code: [Select]
DGInit()
...
DG()
...
Lbl DG
If C-1→C
DispGraph
Return
End
DispGraph(L₃)
Lbl DGInit
3→C
Return

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axiom Requests
« Reply #187 on: July 12, 2013, 12:42:11 pm »
Lol, indeed that's what I wanted.
Thanks.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline bored_student

  • LV3 Member (Next: 100)
  • ***
  • Posts: 44
  • Rating: +3/-0
    • View Profile
Re: Axiom Requests
« Reply #188 on: October 13, 2013, 10:37:15 am »
I want to introduce my new Axiom.
It's for creating and managing arrays at random memory locations.
When you created a array you can easily add or delete elements.
There's also a routine to go through all elements with a callback function and delete elements by the return value of the callback function.
It's very useful for making games where you have to handle many objects (as bullets or enemies).

I attached the source and the compiled Axiom but sadly I haven't written a readme file yet.
(tokens are in the 'ZOOM' menu)
It's my first assembly project and I would be glad if someone helps me optimizing it  :D
« Last Edit: October 13, 2013, 10:47:46 am by bored_student »
Sorry for my bad English, I'm German.

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: Axiom Requests
« Reply #189 on: October 13, 2013, 10:41:25 am »
sounds awesome! :D

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

Offline bored_student

  • LV3 Member (Next: 100)
  • ***
  • Posts: 44
  • Rating: +3/-0
    • View Profile
Re: Axiom Requests
« Reply #190 on: October 13, 2013, 11:52:17 am »
So here is a first readme with an explanation of all the commands.

I plan to make a Length command and a Reset command that clears the list (array).
Sorry for my bad English, I'm German.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Axiom Requests
« Reply #191 on: October 13, 2013, 12:38:26 pm »
Oh epic, an array handling Axiom ! ;D You got my +1 !
« Last Edit: October 13, 2013, 12:38:56 pm by Streetwalker »

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Axiom Requests
« Reply #192 on: October 13, 2013, 12:40:49 pm »
I see two things that I think are not right :

  • MaxLength and the actual length of the array both take 1 byte. That's not enough in most situations. For example, in IkarugaX my bullet engine handles 192 bullets, and each bullet is an 11-bytes entry. 192 * 11 = 2112, which won't fit in 1 byte.
  • I can't see any function to retrieve individual elements from an array ...

Also, IMO in LScanD you should just stop the scan instead of deleting the current element if HL ≠ 0.
« Last Edit: October 13, 2013, 12:41:35 pm by Matrefeytontias »

Offline bored_student

  • LV3 Member (Next: 100)
  • ***
  • Posts: 44
  • Rating: +3/-0
    • View Profile
Re: Axiom Requests
« Reply #193 on: October 13, 2013, 12:59:27 pm »
I see two things that I think are not right :

  • MaxLength and the actual length of the array both take 1 byte. That's not enough in most situations. For example, in IkarugaX my bullet engine handles 192 bullets, and each bullet is an 11-bytes entry. 192 * 11 = 2112, which won't fit in 1 byte.
The MaxLength counts the elements in the list, not the bytes. You can therefore store up to 255 bullets in the list. Each bullet data itself has the size of ElementSize which is up to 255 again. A list of 255*255 bytes + 5 bytes for info would barely fit into RAM.

Quote
  • I can't see any function to retrieve individual elements from an array ...
Yeah I forgot that one D: . I will add it soon

Quote
Also, IMO in LScanD you should just stop the scan instead of deleting the current element if HL ≠ 0.
Why ?
This function should help you to display all objects (for example bullets) and delete those that are maybe out of the screen.
« Last Edit: October 13, 2013, 01:16:07 pm by bored_student »
Sorry for my bad English, I'm German.

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: Axiom Requests
« Reply #194 on: October 14, 2013, 02:49:59 am »
Idea : add a map function to apply to the whole list a function, with a lambda for instance.
For instance if the Map fnctions returns the adress to r1. Struct : x, y, type
Code: [Select]
MAP(LIST, log(Pxl-On({r1}, {r1+2}, {r1+3}*8+Pic1))