Assembler: Fix a number of bugs, add debug logging and generally clean up the code.

Fixes zero-argument instructions (this time properly).

Debugging cannot be disabled, yet.