From 66bd9f91a76e595e91775ea20df5d01a5fb80fd9 Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 16 Mar 2017 17:04:51 -0700 Subject: [PATCH] Updated the DAKAD diagnostic test page to reflect changes to the test machine --- apps/pdp10/tapes/diags/klad/dakad/README.md | 25 +++++++++++++-------- modules/pdp10/lib/macro10.js | 15 +++++-------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/apps/pdp10/tapes/diags/klad/dakad/README.md b/apps/pdp10/tapes/diags/klad/dakad/README.md index 2bcdbe12f..55a17480d 100644 --- a/apps/pdp10/tapes/diags/klad/dakad/README.md +++ b/apps/pdp10/tapes/diags/klad/dakad/README.md @@ -24,19 +24,26 @@ Resources for this test include: 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: +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 + a 30724 /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: +and then load the binary output at the specified address. Use the command `db 30725` to dump the first few words 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]... + 030724: 254000 030741 053 000 000 061 160 +..1p + 030725: 064252 042240 015 012 120 104 120 ..PDP + 030726: 265426 020226 055 061 060 040 113 -10 K + 030727: 405426 020204 101 061 060 040 102 A10 B + 030730: 406471 141500 101 123 111 103 040 ASIC + 030731: 446352 352244 111 116 123 124 122 INSTR + 030732: 526072 444636 125 103 124 111 117 UCTIO + 030733: 471010 444602 116 040 104 111 101 N DIA + 030734: 436351 751650 107 116 117 123 124 GNOST + 030735: 446064 024150 111 103 040 050 064 IC (4 + 030736: 245013 342202 051 040 133 104 101 ) [DA + 030737: 456030 456432 113 101 104 135 015 KAD]. {% include machine.html id="testka10" %} diff --git a/modules/pdp10/lib/macro10.js b/modules/pdp10/lib/macro10.js index 2f7a5570f..eb35ba14a 100644 --- a/modules/pdp10/lib/macro10.js +++ b/modules/pdp10/lib/macro10.js @@ -246,6 +246,8 @@ class Macro10 { /** * getBin() * + * Service for the Debugger to obtain the data after a (hopefully) successful assembly process. + * * @this {Macro10} * @return {Array.} */ @@ -616,9 +618,9 @@ class Macro10 { if (!match) { if (nLocation === undefined) nLocation = this.nLocation; /* - * Check for the "period" syntax that MACRO-10 uses to represent the value of the current - * location. The Debugger's parseInstruction() method understands that syntax, but its - * parseExpression() method does not. + * Check for the "period" syntax that MACRO-10 uses to represent the value of the current location. + * The Debugger's parseInstruction() method understands that syntax, but its parseExpression() method + * does not. * * Note that the Debugger's parseInstruction() replaces any period not PRECEDED by a decimal * digit with the current address, because our Debuggers' only other interpretation of a period @@ -630,18 +632,13 @@ class Macro10 { if (result === undefined) { this.error("error parsing expression: " + sOperand); } - // else if (this.dbg.sUndefined != null) { - // /* - // * If a valid result was returned but sUndefined is also set, then this must be a pass1 evaluation. - // */ - // } } else { var wLeft = match[1]? this.parseExpression(match[1]) : 0; if (wLeft !== undefined) { var wRight = match[2]? this.parseExpression(match[2]) : 0; if (wRight !== undefined) { /* - * NOTE: These must be combined as UNSIGNED values, so that's what we tell truncate(). + * NOTE: These must be combined as UNSIGNED values, so that's what we tell truncate() to produce. */ result = this.dbg.truncate(wLeft, 18, true) * Math.pow(2, 18) + this.dbg.truncate(wRight, 18, true); }