UNPKG

nes-emu

Version:

A NES emulator

35 lines (34 loc) 693 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _constants = require("../constants"); const instructions = () => [ /** * Force Interrupt * * Forces the generation of an interrupt request. * The program counter and flags (with B2 set) are pushed on the stack, then the IRQ * interrupt vector at $FFFE/F is loaded into the PC. */ { id: "BRK", execute: _ref => { let { cpu } = _ref; cpu.pc.value++; cpu.interrupt(_constants.interrupts.BRK, true); } }, /** * No Operation * * Causes no changes at all. */ { id: "NOP", execute: context => {} }]; var _default = exports.default = instructions();