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

export default {
    function(this: PC) {
        const returnAddr = this.returnStack.pop();
        if (!returnAddr) throw 'return stack empty';
        this.programPointer = returnAddr;
    },
    args: 1
}