6 ms·
To be fair - the processor only has binary opcodes & operands :) My example wasn't clear enough - I wasn't proposing full expression compiling. If you think (s
by drpixie 3y ago
To be fair - the processor only has binary opcodes & operands :)
My example wasn't clear enough - I wasn't proposing full expression compiling. If you think (simplistically) of assembler as a macro processor that maps text mnemonics onto opcodes, I was proposing matching basic expression terms to opcodes (but only simple terms, like "x + y", that map to individual instructions).
Historically, there have been assemblers that do full expression compiling - where an expression compiles to multiple opcodes. But that's going back a way, when people still routinely used assembly. For modern purposes, where good compilers are easily available, something like that just confuses assembly with compilation.