Tagged Object Code

From Ninerpedia
Revision as of 14:53, 1 October 2014 by Stephen Shaw (talk | contribs) (Change capitalsto match article on internal link to ExBas)
Jump to navigation Jump to search

Tagged object code is the output of the TI-99/4A assembler program. It can be loaded by the linking loader included in the Editor/Assembler cartridge or in the Extended BASIC cartridge.

Files containing tagged object code are stored in DIS/FIX 80 format.

Tag Tag content Tag Tag content ... EOL tag
Tag Tag content Tag Tag content ... EOL tag
EOF tag

In tagged object code the tag content is almost always 2 bytes long (like addresses or memory contents). There are two formats for tagged object code:

  • readable code: Contents are encoded as hexadecimal bytes, so the file contents can be edited with a common text editor.
  • compressed code: Contents are stored between the tags by their byte values. This results in a considerably smaller output file (half as long) which can be loaded faster.

The Extended Basic loader only supports the readable code format.

Both loaders (Editor/Assembler and Extended Basic) only support a subset of the tags that can be produced by the TI Assembler. The tags not supported by the linking loaders are indicated in the following table by a red background.

(Thanks to Thierry Nouspikel for the remaining codes!)

Tag Argument Argument Argument Meaning
0x01 int16 byte[8] Identifier, compressed object code
'0' int16 byte[8] Identifier, readable object code
'1' int16 Program entry ("END XXX"), absolute address
'2' int16 Program entry, relocatable address
'3' int16 byte[6] REF (relocatable address, symbol)
'4' int16 byte[6] REF (absolute address, symbol)
'5' int16 byte[6] DEF (relocatable address, symbol)
'6' int16 byte[6] DEF (absolute address, symbol)
'7' int16 Checksum (value)
'8' int16 Checksum (value, ignored)
'9' int16 Absolute location (location counter, from AORG)
'A' int16 Program-relocatable location (location counter, RORG, default)
'B' int16 Absolute contents
'C' int16 Content, PSEG offset to be added
'D' int16 Load bias (address where to start loading)
'E' int16 int16 REF offset
'F' end of record
'G' int16 byte[6] Symbol table dump, PSEG
'H' int16 byte[6] Symbol table dump, AORG
'I' byte[8] Program ID (for symbol table)
'J' int16 byte[6] int16 Symbol table dump, CSEG, DSEG
'K' int16 byte[6] External macro reference
'M' int16 byte[6] int16 Segment declaration (length in bytes, $DATA for DSEG and $<name> for CSEG '<name>', id), id=0000 for DSEG, 0001 for CSEG<blank>, 0xxx for other CSEG
'N' int16 int16 Common-relocatable content, CSEG offset to be added (value, id)
'P' int16 int16 Common-relocatable location (value, cseg_id)
'Q' int16 int16 COBOL segment reference
'R' int16 int16 Repeat count
'S' int16 Data-relocatable location (value)
'T' int16 Data-relocatable content, DSEG offset to be added
'U' int16 byte[6] Load symbol
'V' int16 byte[6] Secondary reference, PSEG
'W' int16 byte[6] int16 DEF in DSEG or CSEG (location, name, segment_id)
'X' int16 byte[6] int16 REF in DSEG or CSEG (location, name, segment_id)
'Y' int16 SREF absolute
'Z' int16 int16 SREF data-relocatable, common-relocatable
':' [string] End of file (with optional comment)