Yeah was thinking the exact same thing about jumps and DCO. Labels will be perfect.
Stuff usually does come down to laziness he he he. Bill Gates:
"I choose a lazy person to do a hard job, because a lazy person will find an easy way to do it" xD
It may be a few days before I can properly implement labels, it requires that I rewrite a lot of the assembler to support labels that appear after the jump:
DCO "@DISPLAY THIS STRING"
JMP label
DCO "@SKIP THIS STRING"
label:
DCO "DISPLAY THIS STRING"
The way I convert the instructions now it is near-impossible to know that the label exists if it isn't declared before the jump statment that uses it.
I really just want to work on this but my college classes say otherwise :P
Labels are a bit tricky in assembler because not only do they refer to just JMPing around; they are also used to represent locations in the code itself. So the assembler would replace your label with a memory address, and instead of saying JMP yerLoop it would say in machine code JMP 0x1F or wherever your loop begins. Labels are also used for storing memory, like strings and such, like in FASM, you would say myString: db "Hello world". In conventional ASM, the DB opcode only takes your data because the point in memory where your data will be stored is implied from the label.
In theory, you could live without labels and explicitly define addresses to JMP to, but when you add new stuff in between, things get a bit more complicated as addresses become invalid and get shifted over.
This... Makes no sense at all for me.
I really wanna mae a program for this computer, but these instructions dont make much sense to me. Usually I code (not in powder toy) in Python, Javascript, C++, C#, and HTML. But uh... This doesnt make much sense. A simpler version would be nice. a 'Making programs for dummies' kind of thing, maybe.