Skip to main content


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 πŸ˜€

Unknown parent

hometown - Link to source
Devine Lu Linvega

@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 πŸ˜€

Unknown parent

hometown - Link to source
Devine Lu Linvega
@tebicat .person/name will give you a byte literal of the enum field, do you really need the raw byte for this?
Unknown parent

hometown - Link to source
Devine Lu Linvega
@tebicat could you show me how you'd like to use this?
Unknown parent

hometown - Link to source
Devine Lu Linvega

@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.

Unknown parent

hometown - Link to source
Devine Lu Linvega

@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

Unknown parent

hometown - Link to source
Devine Lu Linvega

@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, `_`?

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.

Lo, thar be cookies on this site to keep track of your login. By clicking 'okay', you are CONSENTING to this.

⇧