Commit f7e6e79b authored by Brandon Warner's avatar Brandon Warner
Browse files

Added subtract instructions.

parent c86a0956
Pipeline #435 failed with stage
in 13 seconds
......@@ -151,4 +151,21 @@ adc a, e
adc a, h
adc a, l
adc a, (hl)
adc a, a
\ No newline at end of file
adc a, a
sub b
sub c
sub d
sub e
sub h
sub l
sub (hl)
sub a
sbc a, b
sbc a, c
sbc a, d
sbc a, e
sbc a, h
sbc a, l
sbc a, (hl)
sbc a, a
\ No newline at end of file
......@@ -167,6 +167,23 @@ INSTS = [
{"inst":"adc","size":1,"arg_re":re.compile("a, *l"), "bytecode": 0x8D, "out":struct.Struct('<B')}, # adc a, l
{"inst":"adc","size":1,"arg_re":re.compile("a, *\\(hl\\)"), "bytecode": 0x8E, "out":struct.Struct('<B')}, # adc a, (hl)
{"inst":"adc","size":1,"arg_re":re.compile("a, *a"), "bytecode": 0x8F, "out":struct.Struct('<B')}, # adc a, a
{"inst":"sub","size":1,"arg_re":re.compile("b"), "bytecode": 0x90, "out":struct.Struct('<B')}, # sub b
{"inst":"sub","size":1,"arg_re":re.compile("c"), "bytecode": 0x91, "out":struct.Struct('<B')}, # sub c
{"inst":"sub","size":1,"arg_re":re.compile("d"), "bytecode": 0x92, "out":struct.Struct('<B')}, # sub d
{"inst":"sub","size":1,"arg_re":re.compile("e"), "bytecode": 0x93, "out":struct.Struct('<B')}, # sub e
{"inst":"sub","size":1,"arg_re":re.compile("h"), "bytecode": 0x94, "out":struct.Struct('<B')}, # sub h
{"inst":"sub","size":1,"arg_re":re.compile("l"), "bytecode": 0x95, "out":struct.Struct('<B')}, # sub l
{"inst":"sub","size":1,"arg_re":re.compile("\\(hl\\)"), "bytecode": 0x96, "out":struct.Struct('<B')}, # sub (hl)
{"inst":"sub","size":1,"arg_re":re.compile("a, *a"), "bytecode": 0x97, "out":struct.Struct('<B')}, # sub a
{"inst":"sbc","size":1,"arg_re":re.compile("b, *a"), "bytecode": 0x98, "out":struct.Struct('<B')}, # sbc a, b
{"inst":"sbc","size":1,"arg_re":re.compile("a, *c"), "bytecode": 0x99, "out":struct.Struct('<B')}, # sbc a, c
{"inst":"sbc","size":1,"arg_re":re.compile("a, *d"), "bytecode": 0x9A, "out":struct.Struct('<B')}, # sbc a, d
{"inst":"sbc","size":1,"arg_re":re.compile("a, *e"), "bytecode": 0x9B, "out":struct.Struct('<B')}, # sbc a, e
{"inst":"sbc","size":1,"arg_re":re.compile("a, *h"), "bytecode": 0x9C, "out":struct.Struct('<B')}, # sbc a, h
{"inst":"sbc","size":1,"arg_re":re.compile("a, *l"), "bytecode": 0x9D, "out":struct.Struct('<B')}, # sbc a, l
{"inst":"sbc","size":1,"arg_re":re.compile("a, *\\(hl\\)"), "bytecode": 0x9E, "out":struct.Struct('<B')}, # sbc a, (hl)
{"inst":"sbc","size":1,"arg_re":re.compile("a, *a"), "bytecode": 0x9F, "out":struct.Struct('<B')}, # sbc a, a
HEX_RE = re.compile("0x[A-Fa-f0-9]+")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment