More updates to the PDP-10 DAKAD diagnostic page

This commit is contained in:
Jeff 2017-03-14 19:21:36 -07:00 committed by Jeff Parsons
commit c4a3d72674
5 changed files with 43046 additions and 13 deletions

View file

@ -2557,6 +2557,15 @@ class DebuggerPDP10 extends Debugger {
* NOTE: As the previous example implies, you can even assemble new instructions into ROM address space;
* as our setByte() function explains, the ROM write-notification handlers only refuse writes from the CPU.
*
* When filename(s) or URL(s) are provided in lieu of an opcode, we pass those on to the Macro10 component
* for assembling, along with any option letters that were included with the "a" command; for example, if "ap"
* was specified, then "p" will be passed to Macro10 as an option.
*
* Macro10 options include:
*
* p: preprocess the specified resource(s) without assembling them
* l: generate listing information
*
* @this {DebuggerPDP10}
* @param {Array.<string>} asArgs is the complete argument array, beginning with the "a" command in asArgs[0]
*/
@ -2574,6 +2583,7 @@ class DebuggerPDP10 extends Debugger {
return;
}
var sOptions = asArgs[0].substr(1);
var match = sOpcode.match(/^(['"]?)((\/|http:).*)\1$/);
if (match) {
var dbg = this;
@ -2582,7 +2592,6 @@ class DebuggerPDP10 extends Debugger {
}
else {
var addrLoad = dbgAddr.addr;
var sOptions = ""; // add "p" for preprocessing only
this.macro10 = new Macro10(match[2], addrLoad, sOptions, dbg, function doneMacro10(nErrorCode, sURL) {
if (!nErrorCode) {
dbg.loadBin(dbg.macro10.getBin(), addrLoad);

View file

@ -107,7 +107,7 @@ class Macro10 {
* @this {Macro10}
* @param {string} sURL (the URL(s) of the resource to be assembled)
* @param {number|null} nAddr (the absolute address to assemble the code at, if any)
* @param {string} sOptions (zero or more letter codes to control the assembly process)
* @param {string|null} sOptions (zero or more letter codes to control the assembly process)
* @param {DebuggerPDP10} dbg (used to provide helper services to the Macro10 class)
* @param {function(...)} done
*/
@ -115,12 +115,12 @@ class Macro10 {
{
this.sURL = sURL;
this.nAddr = nAddr || 0;
this.sOptions = sOptions;
this.sOptions = sOptions || "";
this.dbg = dbg;
this.done = done;
/*
* Set up all the services we need to use.
* Set up shortcuts to frequently used helper services that the caller must provide.
*/
this.println = dbg.println;
@ -270,7 +270,7 @@ class Macro10 {
* If the "preprocess" option is set, then just return the plain text we retrieved.
*/
if (this.sOptions.indexOf('p') >= 0) {
this.dbg.println(this.sText);
this.println(this.sText);
return 0;
}