On 25.01.2012 17:39, Paul K. McKneely wrote:
> I don't know if there is a better place to suggest improvements
> for the wasm assembler.
That would be the contributors' newsgroup. X-post and F'up2 set.
> I am using a calling convention that does not place underscores
> in label names. As a consequence, I can't have variables and other
> label names that are the same as registers and other conflicting
> names etc.
Hmmm... sounds to me like you've just demonstrated that that calling
convention needs re-thinking.
> However, only memory addresses with label names
> should ever use a pointer qualifier such as "PTR WORD" preceding
> a memory label. If wasm was modified so that it would force the
> following label name to be interprested as a memory label, then its
> use could remove the restriction from using register names as memory
> identifiers.
I'm afraid you have that backwards. Just because in _one_ particular
use case register names can be disallowed safely, that doesn't mean you
can mix up register names with asm symbol names in _all_other_ use
cases. And only in the latter case would it be useful to allow this.
Unfortunately, wasm doesn't do this. If I write a statement
> such as...
>
> add ax,ptr word ax
>
> ...it just generates code for...
>
> add ax,ax
That's arguably a good thing. That whole WORD PTR nonsense is one of
the silliest pieces of assembly language syntax ever "invented", anyway.