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

@ -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,