summary refs log tree commit diff
path: root/instructions/CMP.ts
blob: 456cf1aa836ca47cc9b5259fb37cd2cdbe4a74fc (plain)
1
2
3
4
5
6
7
8
9
import type The65c02 from "../65c02.ts";

export default function (this: The65c02, mode: string) {
    const location = this.getAddr(mode);
    this.io.address.set(location);
    this.read();
    const thing = this.regA.num() - this.io.data.num();
    this.flagZCN(thing);
}