diff --git a/src/assembler.js b/src/assembler.js index 82d4b42..f86db2c 100644 --- a/src/assembler.js +++ b/src/assembler.js @@ -165,7 +165,7 @@ function handleConstantDefinitions(op, arg, IP, constants) { * it will be assembled to the default intial value of the IP, * as specified in `machine.config.js`. * @param {string} source - Assembly source to decode - * @return {{ debugInfo: Object, machineCode: Uint8Array }}; + * @return {{ sourceInfo: Object, machineCode: Array }}; **/ function decodeInstructions(source) { dbg.nit('Pre-parsing...'); @@ -194,7 +194,7 @@ function decodeInstructions(source) { /** @type {Array} - Assembled source code, as an array of bytes **/ let machineCode = new Array(IP).fill(0); - let debugInfo = {}; + let sourceInfo = {}; // Initialize memory-mapped IO -- TODO this should probably be in the CPU, not here machineCode[CFG.pointerToDisplay] = CFG.displayAddr; @@ -335,7 +335,7 @@ function decodeInstructions(source) { machineCode[IP] = decodedOp; machineCode[IP + 1] = decodedArg; - debugInfo[IP] = { + sourceInfo[IP] = { lineNumber: line.number, source: line.source, address: IP, @@ -374,7 +374,7 @@ function decodeInstructions(source) { } } - return { 'debugInfo': debugInfo, 'machineCode': new Uint8Array(machineCode) }; + return { 'machineCode': machineCode, 'sourceInfo': sourceInfo }; }