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

export default {
    function(this: PC) {
        const ret = this.returnStack.pop();
        if (ret == undefined) throw 'whar'
        this.programPointer = ret
    },
    args: 0
}