diff --git a/apps/pdp10/diags/klad/dakaa/README.md b/apps/pdp10/diags/klad/dakaa/README.md index 83a2842b4..4e88c0dfe 100644 --- a/apps/pdp10/diags/klad/dakaa/README.md +++ b/apps/pdp10/diags/klad/dakaa/README.md @@ -7,7 +7,7 @@ machines: type: pdp10 config: /devices/pdp10/machine/ka10/test/debugger/machine.xml debugger: true - commands: a 30724 /apps/pdp10/diags/klad/dakaa/MYDAKAA.MAC + commands: a 30724 MYDAKAA.MAC --- PDP-10 KA10 Basic Instruction Diagnostic #1 @@ -32,7 +32,7 @@ The Debugger's assemble ("a") command can be used to test the new built-in of the [MACRO-10](http://archive.pcjs.org/pubs/dec/pdp10/tops10/02_1973AsmRef_macro.pdf) assembly language. This command: - a 30724 /apps/pdp10/diags/klad/dakaa/MYDAKAA.MAC + a 30724 MYDAKAA.MAC will automatically read the [MYDAKAA.MAC](MYDAKAA.MAC.txt) source file (a slightly modified copy of [DAKAA.MAC](DAKAA.MAC.txt)), assemble it, and then load the binary output at the specified address. diff --git a/apps/pdp10/diags/klad/dakad/README.md b/apps/pdp10/diags/klad/dakad/README.md index e7e13caa6..425f1cd9d 100644 --- a/apps/pdp10/diags/klad/dakad/README.md +++ b/apps/pdp10/diags/klad/dakad/README.md @@ -7,7 +7,7 @@ machines: type: pdp10 config: /devices/pdp10/machine/ka10/test/debugger/machine.xml debugger: true - commands: a 30724 /apps/pdp10/diags/klad/dakad/MYDAKAD.MAC + commands: a 30724 MYDAKAD.MAC --- PDP-10 KA10 Basic Instruction Diagnostic #4 @@ -32,7 +32,7 @@ The Debugger's assemble ("a") command can be used to test the new built-in of the [MACRO-10](http://archive.pcjs.org/pubs/dec/pdp10/tops10/02_1973AsmRef_macro.pdf) assembly language. This command: - a 30724 /apps/pdp10/diags/klad/dakad/MYDAKAD.MAC + a 30724 MYDAKAD.MAC will automatically read the [MYDAKAD.MAC](MYDAKAD.MAC.txt) source file (a slightly modified copy of [DAKAD.MAC](DAKAD.MAC.txt)), assemble it, and then load the binary output at the specified address. Use the command `db 30724` to dump the first few words diff --git a/apps/pdp10/tests/macro10/LITNEST.MAC.txt b/apps/pdp10/tests/macro10/NESTLIT.MAC.txt similarity index 100% rename from apps/pdp10/tests/macro10/LITNEST.MAC.txt rename to apps/pdp10/tests/macro10/NESTLIT.MAC.txt diff --git a/apps/pdp10/tests/macro10/README.md b/apps/pdp10/tests/macro10/README.md index cd9e65d9e..0ec2df6cc 100644 --- a/apps/pdp10/tests/macro10/README.md +++ b/apps/pdp10/tests/macro10/README.md @@ -13,6 +13,8 @@ machines: PDPjs MACRO-10 Mini-Assembler Tests ----------------------------------- +### Nested Macro Test + The PDP-10 machine below automatically loads and assembles [TEXT.MAC](TEXT.MAC.txt), one of the first tests of the built-in PDPjs MACRO-10 Mini-Assembler. @@ -23,11 +25,11 @@ and pseudo-ops **IRPC**, **IFE**, **IFN**, and **EXP**. It generates 4 words of {% include machine.html id="testka10" %} -After the machine executes the following command: +Assemble TEXT.MAC: - a 100 /apps/pdp10/tests/macro10/TEXT.MAC + a 100 TEXT.MAC -the following results should appear: +Verify the following results: starting PCjs MACRO-10 Mini-Assembler... loading TEXT.MAC @@ -39,9 +41,27 @@ the following results should appear: PC=000100 RA=00000000 EA=000000 C0=0 C1=0 OV=0 ND=0 PD=0 000100: 014101 102103 UUO 2,102103(1) -and if you dump the first 4 words with the command `db 100 l4`: +Dump the 4 assembled words with the command `db 100 l4`: 000100: 014101 102103 003 004 011 004 041 ....! 000101: 104105 106107 021 004 051 014 043 ..).# 000102: 110111 112113 022 004 111 024 045 ..I.% 000103: 114000 000000 023 000 000 000 000 ..... + +Source code from TEXT.MAC: + +{% highlight text %} +{% include_relative TEXT.MAC.txt %} +{% endhighlight %} + +### Nested Literal Test + +Assemble NESTLIT.MAC: + + a 100 NESTLIT.MAC + +Source code from NESTLIT.MAC: + +{% highlight text %} +{% include_relative NESTLIT.MAC.txt %} +{% endhighlight %} diff --git a/modules/pdp10/lib/debugger.js b/modules/pdp10/lib/debugger.js index 9fe9155d6..57b1a7c67 100644 --- a/modules/pdp10/lib/debugger.js +++ b/modules/pdp10/lib/debugger.js @@ -2606,7 +2606,7 @@ class DebuggerPDP10 extends Debugger { } var sOptions = asArgs[0].substr(1); - var match = sOpcode.match(/^(['"]?)((\/|http:).*)\1$/); + var match = sOpcode.match(/^(['"]?)(.*\.mac)\1$/i); if (match) { var dbg = this; if (this.macro10) { diff --git a/modules/pdp10/lib/macro10.js b/modules/pdp10/lib/macro10.js index 1a1008001..e5796bb7c 100644 --- a/modules/pdp10/lib/macro10.js +++ b/modules/pdp10/lib/macro10.js @@ -288,7 +288,7 @@ class Macro10 { /* * We know that local resources ending with ".MAC" are actually stored with a ".txt" extension. */ - if (sURL[0] == '/' && sURL.slice(-4) == ".MAC") sURL += ".txt"; + if (sURL.slice(-4).toUpperCase() == ".MAC") sURL += ".txt"; Web.getResource(sURL, null, true, function processMacro10(sFile, sResource, nErrorCode) { if (nErrorCode) {