[Simh] macro11

Paul Koning paulkoning at comcast.net
Fri Mar 6 16:35:28 EST 2020



> On Mar 6, 2020, at 4:16 PM, Rhialto <rhialto at falu.nl> wrote:
> 
> On Fri 06 Mar 2020 at 08:18:07 -0800, Robert Armstrong wrote:
>>  macro11 will assemble this once (or try to, without much success)
>>  anyway, despite the ?0?.  Is there a reason for this, or is this
>>  just a bug?
> 
> I guess it's a bug. The code in rept_irpc.c line 44 seems to decrement
> and check the count only at the end of producing the body of the REPT
> block. That is easily fixed. Several of the regression tests pick up a
> change now and I think it looks correct.
> 
> I am listing the repeat count as a computed value. I'm not sure if the
> original MACRO11 did this but it seems practical.

It does:

.MAIN.	MACRO V05.05  Monday 07-Mar-88 09:40  Page 1


      1		000042 			a=42
      2		000001 				.rept	a-41
      3						.word	44
      4						.endr
	000000	000044 				.word	44
      5		000000 				.rept	0
      6						.word	frob
      7						.endr
      8		000001 				.end

  paul



More information about the Simh mailing list