Assembler Enhancements
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnusim8085 |
New
|
Wishlist
|
Unassigned |
Bug Description
There are some minor things that could be improved on in the current assembler implementation.R Error messages are currently not very useful, in fact their line numbers are often apparently offset by +1.
Also, using wrong operands will often wrongly report an invalid mnemonic.
In this sense, assuming that it would be difficult to improve such things in the short run, it might make sense to provide a separate, more detailed, log that contains more information about the assembly process. So that each step of the assembler is interactively shown:
1: found comment, skipping to next line
2: found supported mnemonic "mvi", (expecting reg,immediate): found reg,reg
3: found unknown token "foo"
Something like this would at least have the potential to allow users to see clearly where the assembler stopped succeeding with assembling the file.
Also, other 8085 assemblers often support direct ways to provide numbers using a different notation:
mvi a,14h
mvi a,14d
mvi a,01110011b
Also, the "db" directive usually also supports providing the corresponding bytes as quoted strings of characters:
data: db 'hello world',0A,0D,'$'
dat2: db "foo"
In its current form the assembler also isn't able to compute offsets for labels defined after the position of the current instruction:
mvi a,5
start: nop
cmp 5
jz exit ;ERROR: exit not known because no multipass support in assembler
exit:
Logged In: NO
realtime source assembling might be another option to make the editor more informative and helpful: if for each keypress in the editor, the scanner and tokenizer are triggered to reparse the source code, interactive editing support would become possible, for example typing "mvi" could directly display a message in the statusbar "mov immediate value: expecting operand value (8 bit)".
Whenever a complete and valid instruction is entered, the global state could be set to "valid" which could be visualized using an "ok" symbol in the statubar, if the source code isn't complete or valid, the symbol could be grayed out to illustrate that the source seems invalid.