From 5bace2cae40fc61ccfd2edfd375c8753f2e326f0 Mon Sep 17 00:00:00 2001 From: WlodekM Date: Wed, 2 Apr 2025 18:09:00 +0300 Subject: BIT --- instructions/BIT.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 instructions/BIT.ts (limited to 'instructions') 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 -- cgit 1.4.1-2-gfad0