@opcode(<EOL><NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <EOL><NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <EOL><NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <EOL>)<EOL><INDENT>def instruction_SUB(self, opcode, m, register):<DEDENT>
r = register.value<EOL>r_new = r - m<EOL>register.set(r_new)<EOL><INDENT>log.debug("<STR_LIT>" % (<EOL>self.program_counter, register.name,<EOL>r, m, r_new,<EOL>r, m, r_new,<EOL>))<EOL><DEDENT>self.clear_NZVC()<EOL>if register.WIDTH == <NUM_LIT:8>:<EOL><INDENT>self.update_NZVC_8(r, m, r_new)<EOL><DEDENT>else:<EOL><INDENT>assert register.WIDTH == <NUM_LIT:16><EOL>self.update_NZVC_16(r, m, r_new)<EOL><DEDENT>
Subtracts the value in memory location M from the contents of a
register. The C (carry) bit represents a borrow and is set to the
inverse of the resulting binary carry.

source code forms: SUBA P; SUBB P; SUBD P

CC bits "HNZVC": uaaaa