import { ButtonMachine } from '../src/buttons.js'; let code = [ ['PUSH', -10], ['PUSH', 1], ['ADD'], ['POKE', 1], ['JNZ', 1], ['STOR', 'IX'], ['POP'], ['PEEK', 1], ['JNZ', 6], ]; let machine = new ButtonMachine(); machine.load(code); const ops = ButtonMachine.operations(); const registers = machine.register_names(); machine.run(); console.log("STACK TOP", machine.stack_top); console.log("REGISTERS", registers); console.log("STACK", machine.stack); console.log("RAM", machine.ram);