Garth has some good illustrations of that on his website. I don’t indent things such as loop bodies in my source, but if I did, I would be using a model such as his.
This is a good example, I advise you to try to assemble e.g. this MACRO using Kowalski Simulator.
DISPLAY_IMM: MACRO STR
JSR DISP_QUOTE
BYTE dim2#-dim1# ; Lay down the string length byte,
dim1#: BYTE STR ; followed by the string. (Counted string, not nul-terminated.)
dim2#: ; (Must not put ENDM on same line with the label.)
ENDM
;------------------
...and it's not just about adding "." to MACRO and ENDM
It's not just a question of removing leading spaces; with the requirement that labels start in column one, if it starts in column one, it's a label. Otherwise either you have to first check that it's not a mnemonic or a pseudo-op and only then assume it's a label, or you have to insist on, and test for, a terminating colon.
True enough. But for any text that starts after column one, the assembler still has to make a series of tests to distinguish between a mnemonic or a pseudo op (or a macro which is perhaps 'hiding' a pseudo op). All a requirement that a label starts in column one does is eliminate an amount of work that in IMHO doesn't amount to much extra effort at all. It's only one extra test that mimics the same tests an assembler has to do anyway.
Why not let the user use whatever style of laying out code that they prefer? If there's nothing requiring a label to start in column one, there's also nothing prohibiting it. Users accustomed to laying out code the way assemblers have historically required can certainly continue doing so.
In my opinion, such unnecessary complications cause frustration for beginners and can effectively discourage them from exploring the Kowalski Simulator. It's a shame, because it's actually a good program.
In my opinion, such unnecessary complications cause frustration for beginners and can effectively discourage them from exploring the Kowalski Simulator. It's a shame, because it's actually a good program.