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

File diff suppressed because it is too large Load diff

View file

@ -13,12 +13,30 @@ PDP-10 KA10 BASIC INSTRUCTION DIAGNOSTIC
----------------------------------------
The *PDP-10 KA10 BASIC INSTRUCTION DIAGNOSTIC* (MAINDEC-10-DAKAD-B-D) test code has been extracted from [DAKAD.MAC](DAKAD.MAC)
[[original file](http://pdp-10.trailing-edge.com/klad_sources/01/klad.sources/dakaam.mac.html)] and is shown below,
along with a [PDP-10 Test Machine with Debugger](/devices/pdp10/machine/ka10/test/debugger/).
[[original file](http://pdp-10.trailing-edge.com/klad_sources/01/klad.sources/dakadm.mac.html)] for use with the
[PDP-10 Test Machine with Debugger](/devices/pdp10/machine/ka10/test/debugger/) below.
The Debugger command `a 100 /apps/pdp10/tapes/diags/klad/dakad/TEST.MAC`
can be used to test the new [Mini MACRO-10](http://archive.pcjs.org/pubs/dec/pdp10/tops10/02_1973AsmRef_macro.pdf)
assembler being added to the PDP-10 Emulator.
Resources for this test include:
- [DAKAD.TXT](#dakadtxt)
- [DAKAD.MAC](#dakadmac)
- [DAKAD.SEQ](#dakadseq)
The Debugger's assemble ("a") command can be used to test the new built-in
[MACRO-10 mini-assembler](/modules/pdp10/lib/macro10.js), which supports a subset
of the [MACRO-10](http://archive.pcjs.org/pubs/dec/pdp10/tops10/02_1973AsmRef_macro.pdf) assembly language. This command:
a 100 /apps/pdp10/tapes/diags/klad/dakad/TEST.MAC
will automatically read the [TEST.MAC](TEST.MAC) source file (a slightly modified copy of [DAKAD.MAC](DAKAD.MAC)), assemble it,
and then load the binary output at the specified address. Use the command `db 100` to dump the first block of binary data:
000100: 254000 000114 502112 026542 +...&PDP-1
000102: 301011 340542 301010 240646 0 KA10 BAS
000104: 446064 044634 516512 252606 IC INSTRUC
000106: 522231 747100 422230 143634 TION DIAGN
000110: 476472 444606 201206 424500 OSTIC (4)
000112: 556110 145602 422721 505000 [DAKAD]...
{% include machine.html id="testka10" %}
@ -2279,3 +2297,9 @@ C22700: SETZM 2 ;INITIALIZE AC
JRST BEGEND
```
DAKAD.SEQ
---------
To view the contents of **DAKAD.SEQ** (a combination of [DAKAD.TXT](#dakadtxt), a MACRO-10 assembly listing, and run data),
click [here](DAKAD.SEQ.txt).

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;
}

File diff suppressed because one or more lines are too long