A question that keeps coming back is how to apply a struct to a database in #uxntal.
Here's the little example I will be using in the upcoming docs π
A question that keeps coming back is how to apply a struct to a database in #uxntal.
Here's the little example I will be using in the upcoming docs π
Devine Lu Linvega
Unknown parent • • •@blu3r4d0n You know how |00 rolls back the program address to $0000, this works the same for an enum.
You basically define labels with offsets, for example `person/age` is equal to $0002, naming that offset allows to access specific members of a data structure π
john
in reply to Devine Lu Linvega • • •Devine Lu Linvega
Unknown parent • • •Devine Lu Linvega
Unknown parent • • •Devine Lu Linvega
Unknown parent • • •@tebicat Oh wow really, well, I could add a rune for this, the way I'm thinking about this is that you could always fork the drifblim assembler, and include it in your project to build the project, you don't need to target uxnasm.
If one of my project is esoteric enough, it'll have it's own compiler to suit the project's microlanguage.
Devine Lu Linvega
Unknown parent • • •@tebicat Aight, so this kept me up last night proper..
What would you say about this:
=label/sub for raw shorts
-label/sub for raw byte
Devine Lu Linvega
Unknown parent • • •@tebicat I like the idea of adding raw rel ref, (although, I never managed to write a return stack loop that worked properly)
Those are all good ideas, I've tried the compile-time arithmetic before but it complexified everything too much for the simple uxntal assembler, I don't think I could implement that one myself.
Adding the two new raw byte runes would be a good first step tho, I wonder what would be a good raw rel rune, `_`?
Devine Lu Linvega
in reply to Devine Lu Linvega • • •@tebicat So I've updated uxnasm to support the -rune, and =rune, without replacing the :rune, they'll both work for now.
But you can try it out at least, the -rune is pretty neat, it'll let you create zp byte references!
Enjoy.
like this
π‘ la ninpre π and seven like this.