MACRO-11 help

From: Jerome H. Fine <jhfinepw4z_at_compsys.to>
Date: Tue Sep 17 08:54:00 2002

>Pete Turnbull wrote:

> > On Sep 16, 22:15, Jerome H. Fine wrote:
> > I understand your answer. Under normal situations (when MACRO-11
> > source is translated and the actual code is placed into an OBJ file which
> > is then LINKed), both ways are acceptable. BUT, Patrick was setting up
> > the program via ODT (see line four). If Patrick did not realize what the '
>
> > character in the string 177566' meant, perhaps he just put 177566 instead
> > so that the three word instruction became:
> > 001000 Mov #110,XBUF 012767 000110 177566
> > which, of course, is NOT what Patrick intended. However
> > 001000 MovB #110,_at_#XBUF 112737 000110 177566
> > is correct and does the job.
> > So it is not that the first method is incorrect, but for some it might be
> > confusing.
> Hmm. I'd argue that it *is* incorrect, or at the very least, bad practice.

Jerome Fine replies:

YES!!! Bad practice, in my opinion, is code which can easily lead to
mistakes being made. PLUS, I regard code as an artistic result as
well. Using MovB #<'H>,_at_#XBUF is, again in my opinion, a
preferred method of writing the instruction since it also explains
what is being done with as little comment as possible.

> Relative addresses are meant for situations where the target is a label,
> indicating something which must move if the code does, like the target of a
> JSR, or a block of data attached to the code; if you mean to indicate
> something like a memory-mapped register, which has an absolute and
> invariant address, you should use absolute addressing.

PLUS, if the instruction is JSR,R0 LOCATION, then PIC (Position
Independent Code) results as well. I also agree that absolute addressing
is BEST (_at_#XBUF) when a memory-mapped register which has an
invariant absolute address is being referenced.

> Given that Pat said he was going to enter the code using ODT, I imagine he
> expected the MACRO output to be the correct numbers to enter. But he used
> the wrong addressing mode to do that :-)

Only insofar as the listed output was concerned. So again, bad practice.

> > My personal opinion is that the MACRO-11 program should make the
> > situation plain, but unfortunately I suspect that MACRO-11 will never
> > be modified by the present owners.
> I suspect you're right :-) Besides, the output is meant for the linker,
> not ODT, and I'm not sure how you could make it really plain that the
> numerical value in the output is not what the linker will turn it into,
> without a lot of (usually) unneccessary clutter.

Since I have modified MACRO-11 in V5.04G of RT-11 to
use dates with 4 digit years up to 2099, I don't think it is
impossible to make the modification for the ' character.
My first preference would be to at least identify which PSect
is being referenced - maybe with a capital letter - which would
allow up to 26.

Then, it would be helpful to have the actual value being sent to the
OBJ file. Remember that if the code and the location are in the
SAME PSect, MACRO-11 uses the actual value sent to the OBJ
file and NO ' character is placed in the listing. But then the location
within the PSect is not explicitly disclosed. Either way, valuable
information is missing.

As one of the bugs to be added to the list in:
http://www.classiccmp.org/PDP-11/RT-11/
in the file rt11bugs.txt, what would you suggest should be the format
to be used for the listing in MACRO-11 to allow the additional
information to be displayed - perhaps as an option?

Sincerely yours,

Jerome Fine
--
If you attempted to send a reply and the original e-mail
address has been discontinued due a high volume of junk
e-mail, then the semi-permanent e-mail address can be
obtained by replacing the four characters preceding the
'at' with the four digits of the current year.
Received on Tue Sep 17 2002 - 08:54:00 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:35:39 BST