zx-generation
Version:
A high-fidelity ZX Spectrum emulator in JavaScript — fully generated by a large language model (LLM) to explore the boundaries of AI in systems programming.
26 lines (22 loc) • 428 B
JavaScript
/**
* I/O Interface
* Provides abstraction layer for I/O port access
*/
class IOInterface {
constructor(ula) {
this.ula = ula;
}
/**
* Read from I/O port
*/
readPort(port) {
return this.ula.readPort(port & 0xffff);
}
/**
* Write to I/O port
*/
writePort(port, value) {
this.ula.writePort(port & 0xffff, value & 0xff);
}
}
export { IOInterface };