Fixed MACRO-10 literal processing (literals need to be evaluated as early as possible, but not allocated until the end is reached)

This commit is contained in:
Jeff 2017-03-24 00:09:30 -07:00 committed by Jeff Parsons
commit 471a93353e
14 changed files with 447 additions and 299 deletions

View file

@ -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/TEST.MAC
a 30724 /apps/pdp10/diags/klad/dakaa/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.

View file

@ -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/TEST.MAC
a 30724 /apps/pdp10/diags/klad/dakad/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

View file

@ -0,0 +1,16 @@
; From the MACRO-10 ASSEMBLER PROGRAMMER'S REFERENCE MANUAL (April 1978), p. 2-8:
P=0
T1=1
T2=2
GETCHR: ILDB T2,T1 ;Get a character
CAIN T2,0 ;Is it a null?
JRST [MOVE T1,TXTPTR# ;Yes, retrieve pointer
ILDB T2,T1 ;Get a new character
CAIN T2,"?" ;Is it a question mark?
JRST [MOVE T1,TXTPT1# ;Yes, get alternate pointer
ILDB T2,T1 ;Get the message character
JRST GETHLP#] ;Go to help routine
POPJ P,] ;Not question mark, return
POPJ P, ;Not a null, return

View file

@ -7,7 +7,7 @@ machines:
type: pdp10
config: /devices/pdp10/machine/ka10/test/debugger/machine.xml
debugger: true
commands: a 100 /apps/pdp10/tests/macro10/TEXT.MAC
commands: a 100 /apps/pdp10/tests/macro10/LITNEST.MAC
---
PDPjs MACRO-10 Mini-Assembler Tests

View file

@ -1,4 +1,4 @@
; From the MACR0-10 ASSEMBLER PROGRAMMER'S REFERENCE MANUAL (June 1972):
; From the MACRO-10 ASSEMBLER PROGRAMMER'S REFERENCE MANUAL (June 1972), p. 7-9:
;
; Example 4 (Figure 7-4) shows nested macros which use IRPC. The desired operation
; is to take an ASCII text string and store the characters four per word, left-justified,