The syntax of the div and divu instructions are not properly checked. Valid syntax is accepted, but so is some garbage syntax. Specifically, syntax of the following form is accepted:
div(u) $op0, $op1 <garbage>
Where garbage is an arbitrary string of characters (including spaces) until either a newline, a number sign, a period, a comma, an opening parenthesis, or an equals sign.
Upon execution of the instruction, the garbage is just ignored, and the HI and LO registers are set as to be expected with two operands.
I looked into this more...turns out it's actually a flaw in the parser that allows arbitrary garbage to be inserted where registers are expected, and would basically require the argument parser to be rewritten. It's not really serious (i.e., it won't crash the app), so I'm lowering the priority of this bug.
The following syntax is expected when working with a register (describe as pseudo-regular expression):
\s*\$[:register_name:]\s*
But the following is accepted (more or less):
[\w\s]*\$[:register_name:]\s*[\w\s]*
This bug also affects the parsing of base-register format (That is, index($register) format) in that garbage can be prepended.