8BIT wrote:
I found the place where the local labels get defined and checked for duplication. I tried your source on the old 1.2.6 source and it works correctly. So, I compared the source for both versions and it appears Michal added a process level local variable.
I could not find any documentation on this but it appears from the source that a label using .. as a prefix might apply to this process level. Where any global label delimits the local label, it appears that a global label named 'proc' is used the delimit this new level. However, without testing it, I would assume that using 'proc' more than once would result in a duplicate label error.
I have added a condition test to the source where the error was occurring and it appears that local labels are working now.
Attached is the binary for new version 1.2.14.
I will post the source files shortly.
Daryl
V1.2.14 appears to work correctly. It assembled the local labels test program without error. I also used it to assemble POC V1.1's firmware, which is full of local labels in both the main source and in macros. It all assembles without error.
Something that would be worth doing when time permits would be to reduce the amount of whitespace emitted in each line in the listing file. For example, four blanks separate the line number from the assembly address—that could be reduced to two blanks with no loss of readability. Similarly, three blanks could be removed from the whitespace that follows the bytes that have been generated for an instruction.
For example, here's how a line in the listing file looks right now:
Code:
04013 E303 BD 50 D9 .0000010 lda postmemc,x ;current memory count
It could be changed to:
Code:
04013 E303 BD 50 D9 .0000010 lda postmemc,x ;current memory count
The result is a longish comment wouldn't be wrapped to the next line, improving the readability of the listing. Dunno how much of a deal it would be to fix this.
Anyhow, thanks for tracking down and fixing the local labels error.