[Simh] macro11
Don North
ak6dn at mindspring.com
Fri Mar 6 20:30:15 EST 2020
On 2020-03-06 04:59 PM, Johnny Billquist wrote:
> 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
>
Correct. I provided an answer to a slightly different question, I believe after
rereading my response.
The .ASECT says put this code/data starting at the given absolute address, but
it says nothing about how
addresses are computed in instructions. They can still be done using relative 67
mode or absolute (37) mode.
The tick on the address in the listing does indicate that this address is being
computed using a relative mode.
The octal word shown is (always) the target address, not the inline values after
the instruction word.
As I noted above the way to force all instruction address computations to be
absolute vs relative is to add
the .ENABL AMA (ISTR that means Address Mode Absolute or some such) pseudo-op
at the beginning.
Don
More information about the Simh
mailing list