Formato hexadecimal

Solo disponible en BuenasTareas
  • Páginas : 11 (2642 palabras )
  • Descarga(s) : 0
  • Publicado : 27 de noviembre de 2011
Leer documento completo
Vista previa del texto
rIntel Hexadecimal Object File Format Specification Revision A, 1/6/88

DISCLAIMER Intel makes no representation or warranties with respect to the contents hereof and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose. Further, Intel reserves the right to revise this publication from time to time in the content hereof without obligation ofIntel to notify any person of such revision or changes. The publication of this specification should not be construed as a commitment on Intel's part to implement any product.

- 2 -

1. Introduction This document describes the hexadecimal object file format for the Intel 8-bit, 16-bit, and 32-bit microprocessors. The hexadecimal format is suitable as input to PROM programmers or hardwareemulators. Hexadecimal object file format is a way of representing an absolute binary object file in ASCII. Because the file is in ASCII instead of binary, it is possible to store the file is non-binary medium such as paper-tape, punch cards, etc.; and the file can also be displayed on CRT terminals, line printers, etc.. The 8-bit hexadecimal object file format allows for the placement of code and datawithin the 16-bit linear address space of the Intel 8-bit processors. The 16-bit hexadecimal format allows for the 20-bit segmented address space of the Intel 16-bit processors. And the 32-bit format allows for the 32-bit linear address space of the Intel 32-bit processors. The hexadecimal representation of binary is coded in ASCII alphanumeric characters. For example, the 8-bit binary value0011-1111 is 3F in hexadecimal. To code this in ASCII, one 8-bit byte containing the ASCII code for the character '3' (0011-0011 or 033H) and one 8-bit byte containing the ASCII code for the character 'F' (0100-0110 or 046H) are required. For each byte value, the high-order hexadecimal digit is always the first digit of the pair of hexadecimal digits. This representation (ASCII hexadecimal) requirestwice as many bytes as the binary representation. A hexadecimal object file is blocked into records, each of which contains the record type, length, memory load address and checksum in addition to the data. There are currently six (6) different types of records that are defined, not all combinations of these records are meaningful, however. The record are:

· · · · · ·

Data Record (8-, 16-, or32-bit formats) End of File Record (8-, 16-, or 32-bit formats) Extended Segment Address Record (16- or 32-bit formats) Start Segment Address Record (16- or 32-bit formats) Extended Linear Address Record (32-bit format only) Start Linear Address Record (32-bit format only)

- 3 -

2.

General Record Format+------------------+---------------+-------------+----------------+---------------+-------------------+ | RECORD | LOAD | | | INFO | | | MARK | RECLEN | OFFSET | RECTYP | or | CHKSUM | | ':' | | | | DATA | | +------------------+---------------+-------------+----------------+---------------+-------------------+ 1-byte 1-byte 2-bytes 1-byte n-bytes 1-byte

Each record begins with a RECORD MARK field containing 03AH, the ASCII code for the colon (':') character. Each record has aRECLEN field which specifies the number of bytes of information or data which follows the RECTYP field of the record. Note that one data byte is represented by two ASCII characters. The maximum value of the RECLEN field is hexadecimal 'FF' or 255. Each record has a LOAD OFFSET field which specifies the 16-bit starting load offset of the data bytes, therefore this field is only used for DataRecords. In other records where this field is not used, it should be coded as four ASCII zero characters ('0000' or 030303030H). Each record has a RECTYP field which specifies the record type of this record. The RECTYP field is used to interpret the remaining information within the record. The encoding for all the current record types are: '00' '0l' '02' '03' '04' '05' Data Record End of File Record...
tracking img