Emily's Z80 assembler for the Gameboy.
Revision | 0e411fae50004c3586b6c2615d4e293be45fdaa3 (tree) |
---|---|
Zeit | 2021-03-02 17:12:09 |
Autor | AlaskanEmily <emily@alas...> |
Commiter | AlaskanEmily |
Fix the bit instructions.
Unfortunately, to encode the literal values with our current parser
we are kind of limited. I switched it to just use names like bit5,
set0, res7, etc. This works, but kinda sucks. Oh well.
@@ -491,14 +491,12 @@ for op in CB_OPS: | ||
491 | 491 | |
492 | 492 | BIT_OPS = ("bit", "res", "set") |
493 | 493 | for op in BIT_OPS: |
494 | - ops = {} | |
495 | 494 | for n in range(0, 8): |
496 | 495 | bit_ops = {} |
497 | 496 | for reg, _ in LD_ARGS: |
498 | 497 | bit_ops[reg] = 0xCB00 + i |
499 | 498 | i += 1 |
500 | - ops[str(n)] = bit_ops | |
501 | - SOME_ARGS[op] = ops | |
499 | + SOME_ARGS[op + str(n)] = bit_ops | |
502 | 500 | |
503 | 501 | # A few oddballs that would conflict with full overwriting above. |
504 | 502 | SOME_ARGS["ld"]["a"]["(a16)"] = 0xFA |