Motorola M68CPU32BUG Manuel d'utilisateur Page 85

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 98
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 84
S-RECORD INFORMATION
M68CPU32BUG REV 1 A-4
The next 16 character pairs of the first S1 record are the ASCII bytes of the actual program
code/data. In this assembly language example, the hexadecimal opcodes of the program are
written in sequence in the code/data fields of the S1 records:
OPCODE INSTRUCTION
285F MOVE.L (A7)+,A4
245F MOVE.L (A7)+,A2
2212 MOVE.L (A2),D1
226A0004 MOVE.L 4(A2),A1
24290008 MOVE.L FUNCTION(A1),D2
237C MOVE.L #FORCEFUNC,FUNCTION(A1)
(The balance of this code is continued in the code/data fields of the remaining S1
records and stored in memory.)
2A The checksum of the first S1 record.
The second and third S1 records also each contain $13 (19) character pairs and are ended with
checksums 13 and 52 respectively. The fourth S1 record contains 07 character pairs and has a
checksum of 92.
The S9 record is explained as follows:
S9 S-record type S9, indicating that it is a termination record.
03 Hexadecimal 03, indicating that three character pairs (3 bytes) follow.
00
00 The address field, zeros.
FC The checksum of the S9 record.
Each printable character in an S-record is encoded in a hexadecimal (ASCII in this example)
representation of the binary bits which are actually transmitted. For example, the first S1 record
above is sent as:
0101 0011 0011 0001 0011 0001
TYPE
0011 0011 0011 0000 0011 0000 0011 0000 0011 0000 0011 0010 0011 1000 0011 0101 0100 0110 ••• 0011 0010 0100 0001
533131 330303030323835463241
S1130000285F2A
LENGTH ADDRESS CODE/DATA CHECKSUM
3
S-RECORD INFORMATION
M68CPU32BUG REV 1 A-1
APPENDIX A
S-RECORD INFORMATION
A.1 INTRODUCTION
The S-record format for output modules was devised for the purpose of encoding programs or
data files in a printable format for transportation between computer systems. The transportation
process can thus be visually monitored and the S-records can be more easily edited.
A.2 S-RECORD CONTENT
When viewed by the user, S-records are essentially character strings made of several fields which
identify the record type, record length, memory address, code/data and checksum. Each byte of
binary data is encoded as a 2-character hexadecimal number; the first character representing the
high-order 4 bits, and the second the low-order 4 bits of the byte.
The five fields which comprise an S-record are shown below:
TYPE RECORD LENGTH
ADDRESS
CODE/DATA
CHECKSUM
Where the fields are composed as follows:
Field
Printable
Characters Contents
type 2 S-records type -- S0, S1, etc.
record length 2 The count of the character pairs in the record, excluding type and record
length.
address 4, 6, or 8 The 2-, 3-, or 4-byte address at which the data field is to be loaded into
memory.
code/data 0-n From 0 to n bytes of executable code, memory-loadable data, or
descriptive information. For compatibility with teletypewriters, some
programs may limit the number of bytes to as few as 28 (56 printable
characters in the S-record).
checksum 2 The least significant byte of the one’s complement of the sum of the
values represented by the pairs of characters making up the records
length, address, and the code/data fields.
Fr
eescale S
emiconduct
or
, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...
Vue de la page 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 97 98

Commentaires sur ces manuels

Pas de commentaire