function createSwitchRom(romArrayBuffer) {
  return function switchRom() {
    console.log('> Switch ROM');
    cpu.reset();
    display.clear();
    clearMemory(memory);
    start(romArrayBuffer);
  }
}
/**
 * Creates a callback function that resets the current CPU, memory and display status and
 * loads another ROM
 * @param {Uint8Array} romArrayBuffer 
 */
Creates a callback function that resets the current CPU, memory and display status and
loads another ROM
@param {Uint8Array} romArrayBuffer
Creates a callback function that resets the current CPU memory and display status and loads another ROM @param { Uint8Array } romArrayBuffer
function createSwitchRom(romArrayBuffer) {
  return function switchRom() {
    console.log('> Switch ROM');
    cpu.reset();
    display.clear();
    clearMemory(memory);
    start(romArrayBuffer);
  }
}
function createSwitchRom ( romArrayBuffer ) { return function switchRom ( ) { console . log ( '> Switch ROM' ) ; cpu . reset ( ) ; display . clear ( ) ; clearMemory ( memory ) ; start ( romArrayBuffer ) ; } }
Creates a callback function that resets the current CPU, memory and display status and
 loads another ROM
 @param {Uint8Array} romArrayBuffer
Creates a callback function that resets the current CPU memory and display status and loads another ROM @param { Uint8Array } romArrayBuffer