diff options
Diffstat (limited to 'instructions')
-rw-r--r-- | instructions/BIT.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/instructions/BIT.ts b/instructions/BIT.ts new file mode 100644 index 0000000..2367ba7 --- /dev/null +++ b/instructions/BIT.ts @@ -0,0 +1,14 @@ +import type The65c02 from "../65c02.ts"; + +export default function (this: The65c02, mode: string) { + const location = this.getAddr(mode, [ + 'zero-page', + 'absolute' + ]); + this.io.address.set(location); + this.read(); + this.overflow = this.io.data.bit(6) + this.negative = this.io.data.bit(7) + const thing = this.regA.num() & this.io.data.num(); + this.zero = thing == 0; +} \ No newline at end of file |