Added various MACRO-10 expression improvements

This commit is contained in:
Jeff 2017-03-18 17:12:54 -07:00 committed by Jeff Parsons
commit 1c3c9c9856
16 changed files with 561 additions and 488 deletions

View file

@ -0,0 +1,27 @@
TITLE STORE TEXT CHARACTER BY CHARACTER
SUBTTL %1 5-APR-72
DEFINE TEXT (C)<
N==0 ;;INITIAL CONDITION
IRPC C,<N==N+1> ;;COUNT CHARACTERS
CODE (N,C) ;;CALL MACRO TO STORE TEXT
> ;END OF TEXT MACRO
DEFINE CODE (N,C)<
ZZ==N ;;INITIAL CONDITION
IRPC C,<
IFN ZZ&777B8,<
EXP ZZ ;;WORD FULL
ZZ==0> ;;START AGAIN WITH 0
ZZ=ZZ+9+"C"> ;;END OF IRPC
IFN ZZ,<DEFINE SHIFT ;;REMAINDER LEFT
IFE ZZ&777B8,> ;;IF NOT LEFT JUSTIFIED
ZZ=ZZ+9 ;;MOVE LEFT 9 BITS
SHIFT> ;;RECURSE
> ;;END OF DEFINE
SHIFT ;;START MOVING LEFT
EXP ZZ> ;;END OF IFN ZZ
> ;END OF CODE MACRO
TEXT (ABCDEFGHIJKL)
END

View file

@ -14,14 +14,14 @@ DEC PDP-10 Opcode Tests
The PDP-10 machine below loads the following test:
- [PDP-10 Half-Word Opcode Test](optest-v01.json)
- [PDP-10 Half-Word Opcode Test](OPTEST01.json)
Details on how to run and modify the test, and perform similar tests in [SIMH](https://github.com/simh/simh),
are provided below.
{% include machine.html id="testka10" %}
The [PDP-10 Half-Word Opcode Test](optest-v01.json) file specifies that the following words:
The [PDP-10 Half-Word Opcode Test](OPTEST01.json) file specifies that the following words:
0o505040111111, // HRLI 1,111111
0o541040444444, // HRRI 1,444444
@ -34,7 +34,7 @@ comments display the instructions that correspond to each word.
If you want to alter or add new instructions, the PDP-10 Debugger now includes a rudimentary assembler. Using the `a` command,
along with an optional start address, you can enter "assembler mode". For example, here's how the first four instructions from
the [PDP-10 Half-Word Opcode Test](optest-v01.json) could be entered by hand:
the [PDP-10 Half-Word Opcode Test](OPTEST01.json) could be entered by hand:
>> a 100
begin assemble at 000100