summary refs log tree commit diff
path: root/pc-thing/instructions/cmp.ts
blob: 1b2db94b62bda6673773e5af2cc1cbaf9c70176d (plain)
1
2
3
4
5
6
7
8
9
import { PC } from "../pc.ts";

export default {
    function(this: PC, [reg, val]: number[]) {
        const r = this.lib.parseReg(reg)
        this.returnFlag = +(this.registers[r] == +val)
    },
    args: 2
}