-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathsplit16bit.1
55 lines (55 loc) · 1.06 KB
/
split16bit.1
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
.Dd August 7, 2019
.Dt split16bit 1
.Os kk_ihex
.Sh NAME
.Nm split16bit
.Nd Splits a 16-bit ROM image into two 8-bit halves.
.Sh SYNOPSIS
.Nm
.Op Fl i Ar input16bit.bin
.Op Fl h Ar high8bit.bin
.Op Fl l Ar low8bit.bin
.Sh DESCRIPTION
.Nm
reads a raw 16-bit binary file from standard input and writes two
its two 8-bit halves into separate output files. The low half
will contain the first byte of input, since it has the lowest address,
i.e., the input is treated as little-endian.
.Sh OPTIONS
.Bl -tag -width -indent
.It Fl h Ar highfile
Output to
.Ar highfile
the high half of each 16-bit word
.It Fl l Ar lowfile
Output to
.Ar lowfile
the low half of each 16-bit word
.It Fl i Ar file
Read the binary input from
.Ar file
instead of standard input
.El
.Sh EXAMPLES
Read binary data from
.Ar input.bin
and write low and high halves of each input word to
.Ar low.bin
and
.Ar high.bin
respectively:
.Pp
.Bd -ragged -offset indent
.Nm
.Fl i
.Ar input.bin
.Fl l
.Ar low.bin
.Fl h
.Ar high.bin
.Ed
.Pp
.Sh SEE ALSO
.Xr merge16bit 1
.Sh AUTHOR
.An "Kimmo Kulovesi" Aq https://arkku.com