<commit_before>var Cpu = require('../../src/Cpu'),
    SimpleMemory = require('../../src/SimpleMemory'),
    hex = require('../../src/hex'),
    binary = require('../../src/binary'),
    _ = require('lodash'),
    util = require('util');

function Runner(code, base) {
    if (typeof(base) === 'undefined') base = 0xE000;

    this._memory = new SimpleMemory();
    this._cpu = new Cpu(this._memory);
    this._code = code;
    this._cycles = 0;
    this._base = base;
    this._originalState = null;

    var codeLength = code.length;
    for (var i = 0; i < codeLength; i++)
        this._memory.poke(base + i, code[i]);

    this._memory.poke(0xFFFD, base >> 8);
    this._memory.poke(0xFFFE, base & 0xFF);<commit_msg>Fix CPU test sandbox bug.<commit_after>var Cpu = require('../../src/Cpu'),
    SimpleMemory = require('../../src/SimpleMemory'),
    hex = require('../../src/hex'),
    binary = require('../../src/binary'),
    _ = require('lodash'),
    util = require('util');

function Runner(code, base) {
    if (typeof(base) === 'undefined') base = 0xE000;

    this._memory = new SimpleMemory();
    this._cpu = new Cpu(this._memory);
    this._code = code;
    this._cycles = 0;
    this._base = base;
    this._originalState = null;

    var codeLength = code.length;
    for (var i = 0; i < codeLength; i++)
        this._memory.poke(base + i, code[i]);

    this._memory.poke(0xFFFC, base & 0xFF);
    this._memory.poke(0xFFFD, base >> 8);
{'fraction_non_alphanumeric': 0.19325997248968363, 'fraction_numerical': 0.013755158184319119, 'mean_word_length': 2.730769230769231, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5406674', 'n_tokens_mistral': 502, 'n_tokens_neox': 477, 'n_words': 109}