lse;
          }
        }, 100);
      }

      stop() {
        clearInterval(this.thread);
      }

      write(chars, x, y) {
        x = x % this.WIDTH;
        y = y % this.HEIGHT;
        for(let i = 0; i<chars.length; i++) {
          let pos = ((y * this.WIDTH) + x + i) % this.SIZE;
          this.screen[pos] = chars[i];
        }
        this.shouldRefresh = true;
      }

      cycle() {
        const self = this;
        function push() { self.stack[self.sp] = self.pc; self.sp = (self.sp-1)%0x10