(hex: string)
| 29 | private stopped = false; |
| 30 | |
| 31 | constructor(hex: string) { |
| 32 | loadHex(hex, new Uint8Array(this.program.buffer)); |
| 33 | this.cpu = new CPU(this.program); |
| 34 | this.timer = new AVRTimer(this.cpu, timer0Config); |
| 35 | this.portB = new AVRIOPort(this.cpu, portBConfig); |
| 36 | this.portC = new AVRIOPort(this.cpu, portCConfig); |
| 37 | this.portD = new AVRIOPort(this.cpu, portDConfig); |
| 38 | this.usart = new AVRUSART(this.cpu, usart0Config, this.MHZ); |
| 39 | } |
| 40 | |
| 41 | async execute(callback: (cpu: CPU) => void) { |
| 42 | this.stopped = false; |