From - Sun Nov 18 16:02:59 2001
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Message-ID: <3BF7CD8F.845C79FC@iname.com>
Date: Sun, 18 Nov 2001 16:02:39 +0100
From: Thomas Rast <t.rast@iname.com>
Reply-To: t.rast@freesurf.ch
X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i586)
X-Accept-Language: de-CH, de, en
MIME-Version: 1.0
Newsgroups: comp.sys.hp48
Subject: [49] MASD: The !DBGINF directive
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Cyrille has provided me with this information, so I'd like to share it.
I will post this message to hpcalc.org, too.

If you put the !DBGINF directive into a MASD source, the assembler does
not only generate your compiled object, but it also returns a string (on
level 1) full of debug information. The structure of this string is as
follows:

5  DOCSTR
5  Length

5  Number of links (source files)
n*[
   2  Number of characters
   .. Name of link file
]

5  Number of symbols (labels and constants)
n*[
   2  Number of characters
   .. Name of symbol
   1  Type: 9=Label 2=Constant
   for labels:    5  Address of label
   for constants: 16 Value of constant
]

5  Number of source->code associations
n*[
   5  Offset in code (this list is sorted by offset)
   2  Number of link this instruction comes from
   5  Character offset in link where this instruction starts
]

Notes:
- If the source string is unnamed, i.e. in TEMPOB, the number of links
is 00001 and the number of characters is 00, immediately followed by the
symbol table.
- The label symbol table is, according to Cyrille, supposed to be an
*offset* table. However it seems that the current (1.19-6) MASD has got
a bug which makes it put *addresses* into this table. The "associations"
table correctly contains offsets.

Any mistakes here are mine, not Cyrille's.

Thomas

-- 
Thomas Rast             "If you cannot convince them,
t.rast@iname.com         confuse them."
ICQ# 103670088               -- Harry S. Truman
