From a5a90a675b1167b8a0e79015db3517deec596c98 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 21 Mar 2017 12:59:44 -0700 Subject: [PATCH 1/2] New blog post regarding MACRO-10 support --- _posts/2017-03-21-the-macro-10-assembler-50-years-later.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/2017-03-21-the-macro-10-assembler-50-years-later.md b/_posts/2017-03-21-the-macro-10-assembler-50-years-later.md index 02b9b5e8e..f84c7ec7b 100644 --- a/_posts/2017-03-21-the-macro-10-assembler-50-years-later.md +++ b/_posts/2017-03-21-the-macro-10-assembler-50-years-later.md @@ -22,7 +22,7 @@ falls into these categories: Floating-point is the biggest chunk of work, which I'm going to save for last, with the hope that most PDP-10 software didn't use floating-point. However, if all PDP-10 systems included floating-point hardware (which I haven't been able to confirm yet), I may have no choice. Floating-point emulation in JavaScript isn't hard -- PCjs already includes an -[8087 Coprocessor Emulator](/modules/pcx86/lib/x86fpu.js) -- but getting all the details right is time-consuming. +[8087 Coprocessor Emulation](/modules/pcx86/lib/x86fpu.js) -- but getting all the details right is time-consuming. The PDP-10 has a lot of instructions, and I quickly had far more instructions than I was willing or able to write tests for. Besides, any tests I wrote would be based on the same potentially-flawed understandings that I had gleaned from DEC's @@ -66,7 +66,7 @@ since they share the same expression parser. Here are some examples, using the 23. 0o000027 Both the Debugger and MACRO-10 start out by assuming a default base (radix) of 8, so the value "27" is evaluated as an octal -number, and for convenience, the "print" command displays the result in both decimal and octal. You can change the default base +number, and for convenience, the "print" command displays the result in both octal and decimal. You can change the default base in the Debugger with the `s base` command (eg, `s base 10`), where the new base is always interpreted as a decimal number. This command differs from MACRO-10, which uses the `RADIX` pseudo-op to change the default base. From 4d24a0ce6d7ca9e16b18d3c18d91370d7d33cf0a Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 21 Mar 2017 14:25:09 -0700 Subject: [PATCH 2/2] Updated MACRO-10 blog post --- _posts/2017-03-21-the-macro-10-assembler-50-years-later.md | 4 ++-- modules/pdp10/lib/macro10.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_posts/2017-03-21-the-macro-10-assembler-50-years-later.md b/_posts/2017-03-21-the-macro-10-assembler-50-years-later.md index f84c7ec7b..5708998d2 100644 --- a/_posts/2017-03-21-the-macro-10-assembler-50-years-later.md +++ b/_posts/2017-03-21-the-macro-10-assembler-50-years-later.md @@ -43,8 +43,8 @@ best. ### Introducing the MACRO-10 "Mini-Assembler" I decided that the shortest turn-around from *assembly* phase to *run* phase (aka *crash-and-burn* phase) would be to -assemble the files in PDPjs itself. So the PDPjs MACRO-10 "Mini-Assembler" was born. Any machine that includes the PDPjs -Debugger (like the machine below) now includes MACRO-10 support as well. +assemble the files in PDPjs itself. So the PDPjs [MACRO-10 "Mini-Assembler"](/modules/pdp10/lib/macro10.js) was born. +Any machine that includes the PDPjs Debugger (like the machine below) now includes MACRO-10 support as well. {% include machine.html id="testka10" %} diff --git a/modules/pdp10/lib/macro10.js b/modules/pdp10/lib/macro10.js index d839fa190..074d32f80 100644 --- a/modules/pdp10/lib/macro10.js +++ b/modules/pdp10/lib/macro10.js @@ -548,7 +548,7 @@ class Macro10 { this.parseText(macro.sText, macro.aParms, macro.aValues, macro.aDefaults); /* * WARNING: Our simplistic approach to macro expansion and processing means that recursive macros - * (such as the SHIFT macro contained in /apps/pdp10/tests/MACTEST1.MAC) could blow the stack. Nothing + * (such as the SHIFT macro contained in /apps/pdp10/tests/macro10/TEXT.MAC) could blow the stack. Nothing * bad should happen (other than a JavaScript stack limit exception aborting the assembly), but it begs * the question: did MACRO-10 perform any tail recursion optimizations or other tricks to prevent macros * from running amok?