@neauoire

Spent a while last night and today (maybe 5 hours total?) debugging my understanding of hello world, took me way too long to realize that ;text denoted a pointer to the data in @text rather than pushing the values in @text to the stack.

It's what I get for skimming text while up late and sick. Managed to write 24 lines of "This is where I'm at" before realizing what I'd done wrong due to deep diving it well enough to write a well formed question😅

Looking at it now, it's hard to see how I could've gotten it wrong, I think what you've got there does explain it effectively.

@neauoire

I've got a few ideas on how this could be made more idiot proofed:

1. Would it be possible to move the @text definition above the ;text call? This way it's obvious to someone who doesn't understand how the assembler works to see the order that operations occur in. Some poking at it myself makes it seem like this doesn't work, though I don't see any reason in https://wiki.xxiivv.com/site/uxntal_labels.html .

2. A short summary of the program directly above it would help orient newcomers for all of the nitty-gritty that comes later: "This program stores the phrase "Hello World!" in memory when assembled. On execution, a pointer to the location in memory is pushed onto the stack. We then loop through, reading from and incrementing this pointer until we reach the end of the phrase. At that point, we empty the stack and break." (feel free to use this phrasing if you like. Don't know if it's accurate or good enough, but it does already exist)

uxntal labels

By Devine Lu Linvega

XXIIVV

@Treant

1. It wouldn't, the PC would walk right into the string and try to interpret the letters of the string as opcodes.

@neauoire @Treant that said you could create a main label farther down, put the string data above it, then jump to main from |100
@Treant Implemented #2 and #3, good ideas!! 🙌