[Simh] macro11

Johnny Billquist bqt at softjar.se
Fri Mar 6 19:59:03 EST 2020


On 2020-03-07 01:52, Don North wrote:
> On 2020-03-06 02:53 PM, Robert Armstrong wrote:
>>    Another macro11 question - do the apostrophes in the listing indicate
>> relocatable references, as they do in the DEC version?
>>
>>    If so, then I don't think it's assembling this code correctly -
>>
>>
>>         1                                        .TITLE  TEST RELOCATABLE
>> REFERENCES
>>         2 000000                                 .ASECT
>>         3        001000                          .=1000
>>         4
>>         5        001234                  X == 1234
>>         6
>>         7 001000 005067  001234'                 CLR     X
>>         8
>>
>>    X should be an absolute address, not relocatable.
>>
>> Bob
>>
>> _______________________________________________
>> Simh mailing list
>> Simh at trailing-edge.com
>> http://mailman.trailing-edge.com/mailman/listinfo/simh
> 
> The apostrophe trailing on the octal word indicates that it is a 
> computed target
> address. It is not what you would actually see in the .obj or .bin files.
> 
> If you want to force all references to be absolute instead of 
> relocatable you
> can add an ' .ENABL AMA'  pseudo-op before the .ASECT pseudo-op. This will
> force all relative mode instruction references to become absolute mode. Or
> of course you could just do ' CLR @#X' for that instruction.

In the end, that is a different thing. Absolute addressing is not what 
Bob was thinking about here...

Here is what MACRO-11 does:

       1 000000                                  .ASECT
       2         001000                          .=1000
       3         001234                  X=1234
       4
       5 001000  005067  000230                  CLR     X
       6

Note that the addressing is still relative. But the actual offset 
required can be computed by MACRO-11 at compile time.

   Johnny

-- 
Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt at softjar.se             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


More information about the Simh mailing list