Closed wjl closed 2 years ago
aren't there already labels?
There are labels
label:
print "frog"
printflush message1
jump label always
they get converted to line numbers when importing
Wow, I didn't realize you could already do this. That is excellent. I must have either missed this in the documentation, or possibly it's not documented.
Is this documented on the wiki? Maybe that's all that's missing. 😀
This suggestion is now stale, and will be automatically closed.
Describe the content or mechanics you are proposing.
Logic processors are awesome, and I've been using them a lot, writing fairly complex programs. I really enjoy programming them, and their assembly-like textual representation is great. One major issue I have is that there are no labels, which means that when inserting statements, all jumps have to be adjusted because they are direct address jumps. I realize there are ways to simulate this using extra instructions involving the PC (@counter) but this eats into code efficiency and is something assembly programmers don't generally have to deal with, even with old 8051 code. =)
One of these two features would really help solve this problem without taking away the character of being an fairly low-level "assembly language" for the game:
Describe how you think this content will improve the game. If you're proposing new content, mention how it may add more gameplay options or how it will fill a new niche.
Programming logic processors is a ton of fun. It's supposed to be kind of hard and low-level! But even the earliest, most basic, and lowest-level assemblers for real computer languages have had features like labels and/or PC-relative jumps which make the task of editing a line of code a fairly local endeavor that won't generally break all other existing code by screwing up addresses.
I think adding labels (my preference) or at the very least PC-relative jumps would make it more feasible to write complex programs without frustration that stems from just updating jumps all over the place. Of course the logic programming itself can stay frustrating enough to keep it fun. =)
Also, while this COULD be presumably be done by a mod or an external assembler tool, I think this is basic and worthwhile enough functionality that it would be very appropriate to add to the base game.
Before making this issue, check the boxes below to confirm that you have acknowledged them.