.lf 1 ./man/man5/srec_formatted_binary.5
'\" t
.\" srecord - manipulate eprom load files
.\" Copyright (C) 2003, 2006-2009, 2011 Peter Miller
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program. If not, see
.\" .
.\"
.ds n) srec_formatted_binary
.TH \*(n) 5 SRecord "Reference Manual"
.SH NAME
srec_formatted_binary \- Formatted Binary file format
.if require_index \{
.XX "srec_formatted_binary(5)" "Formatted Binary file format"
.\}
.SH DESCRIPTION
.\" ftp://ftp.dataio.com/main/Manuals/UniFam/Translation%20Formats.pdf
This is the PDP\[hy]11 paper tape format, described in the
DEC\[hy]11\[hy]GGPC\[hy]D PDP\[hy]11 "Paper Tape Software Programming
Handbook" 1972.
.PP
The file starts with a character sequence which appears as an arrow when
punched on 8\[hy]hole paper tape.
.RS
0x08, 0x1C, 0x2A, 0x49, 0x08, 0x00
.RE
.PP
Then follows a byte count, encoded big\[hy]endian in the low 4 bits of the
next 4 bytes. The high bits should be zero.
.PP
Then follows a 0xFF byte.
.PP
The data follows, as many bytes as specified in the header.
.PP
The trailer consists of the following bytes:
.RS
0x00, 0x00,
.RE
and then a 2\[hy]byte checksum (big\[hy]endian).
.PP
The alternate header sequence
.RS
0x08, 0x1C, 0x3E, 0x6B, 0x08, 0x00
.RE
is followed by an 8\[hy]nibble big\[hy]endian byte count.
.SS Size Multiplier
In general, binary data will expand in sized very little
when represented with this format.
.\" ------------------------------------------------------------------------
.br
.ne 2i
.SH EXAMPLE
Here is a hex dump of a formatted binary file containing the
data "Hello, World!".
.RS
.nf
.ft CW
0000: 08 1C 2A 49 08 00 00 00 ..*I....
0008: 00 0E FF 48 65 6C 6C 6F ...Hello
0010: 2C 20 57 6F 72 6C 64 21 , World!
0018: 0A 00 00 04 73 ....s
.ft P
.fi
.RE
.\" ------------------------------------------------------------------------
.ds n) srec_cat
.lf 1 ./man/man1/z_copyright.so
.\"
.\" srecord - manipulate eprom load files
.\" Copyright (C) 1998, 2006-2009 Peter Miller
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program. If not, see
.\" .
.\"
.br
.ne 1i
.SH COPYRIGHT
.lf 1 ./etc/version.so
.ds V) 1.58.D001
.ds v) 1.58
.ds Y) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
.lf 23 ./man/man1/z_copyright.so
.I \*(n)
version \*(v)
.br
Copyright
.if n (C)
.if t \(co
\*(Y) Peter Miller
.br
.PP
The
.I \*(n)
program comes with ABSOLUTELY NO WARRANTY;
for details use the '\fI\*(n) \-VERSion License\fP' command.
This is free software
and you are welcome to redistribute it under certain conditions;
for details use the '\fI\*(n) \-VERSion License\fP' command.
.br
.ne 1i
.SH AUTHOR
.TS
tab(;);
l r l.
Peter Miller;E\[hy]Mail:;pmiller@opensource.org.au
/\e/\e*;WWW:;http://miller.emu.id.au/pmiller/
.TE
.lf 78 ./man/man5/srec_formatted_binary.5