import { UnaryReadOperation } from "./instruction" ; import { CPU } from "../cpu" ; import { MemoryView } from "../memory-view" ; export class Interrupt extends UnaryReadOperation { private number : MemoryView ; execute ( cpu ) { cpu . onInterrupt . emit ( this . number . getValue ( ) ) ; return cpu . getNextInstruction ( ) ; } loadParameters ( number ) { this . number = number ; } }