diff options
author | WlodekM <[email protected]> | 2025-04-02 18:09:00 +0300 |
---|---|---|
committer | WlodekM <[email protected]> | 2025-04-02 18:09:00 +0300 |
commit | 5bace2cae40fc61ccfd2edfd375c8753f2e326f0 (patch) | |
tree | 552c96f1d6b582d48cefa366fd3cf629da6d999d /instructions/BIT.ts | |
parent | f245d085cf1ce04009dcbc9f8dc04dcfabf1c745 (diff) |
BIT
Diffstat (limited to 'instructions/BIT.ts')
-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 |