summaryrefslogtreecommitdiff
path: root/tools/hex2bin-2.0/doc/formats.txt
blob: 25e5e37f7ebe9ead1b3e917d4697bbed3bf92faf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Hex formats

Intel
=====

Hexadecimal values are always in uppercase. Each line is a record.
The sum of all the bytes in each record should be 00 (modulo 256).

Record types:

00: data records
01: end-of-file record
02: extended address record

Data record
-----------

	:0D011C0000000000C3E0FF0000000000C30F

: 0D 011C 00 00000000C3E0FF0000000000C3 0F
|  |   |   | -------------+------------  |
|  |   |   |              |              +--- Checksum
|  |   |   |              +------------------ Data bytes
|  |   |   +--------------------------------- Record type
|  |   +------------------------------------- Address
|  +----------------------------------------- Number of data bytes
+-------------------------------------------- Start of record


End of file record
------------------

	:00000001FE

: 00 0000 01 FE
|  |   |   |  |
|  |   |   |  +--- Checksum
|  |   |   +------ Record type
|  |   +---------- Address
|  +-------------- Number of data bytes
+----------------- Start of record



Extended address record
-----------------------

	:02010002E0001B

: 02 0100 02 E000 1B
|  |   |   |  |    |
|  |   |   |  |    +--- Checksum
|  |   |   |  +-------- Segment address
|  |   |   +----------- Record type
|  |   +--------------- Address
|  +------------------- Number of data bytes
+---------------------- Start of record

Following data records will start at E000:0100 or E0100