summaryrefslogtreecommitdiff
path: root/system/dos33fsprogs/man/make_b.pod
blob: 58970f847c1a876a18ab87b14225317fd7fc3a74 (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
73
74
75
76
77
78
79
80
=pod

=head1 NAME

B<make_b> - add an Apple II BLOAD header to a binary file

=head1 SYNOPSIS

B<make_b> <in_file> <out_file> <offset>

=head1 DESCRIPTION

B<make_b> prepends an Apple II BLOAD header to in_file and writes
the result to out_file.

The header is 4 bytes in size, and consists of the 16-bit offset (AKA
the load address) followed by the 16-bit file length (of the rest of
the file, not including the header). Both values are little-endian,
which is standard on the 6502.

=head1 ARGUMENTS

All arguments are required. If any are missing or invalid, a built-in
help message is displayed.

=over

=item in_file

The input file. Must be small enough to fit in the Apple II's memory. The
absolute maximum size is 65535 bytes, but a file that large can't be
loaded into an Apple II because there are less than 48Kbytes of RAM
available.

=item out_file

The output file. DO NOT use the same filename as in_file (see B<BUGS>). After out_file
is created, it can be written to an Apple disk image with B<dos33(1)>.

The output file will be exactly 4 bytes larger than the input file.

=item offset

The offset into the Apple's memory where the file will be loaded by the
DOS 3.3 / Applesoft BLOAD command. Other names for this are the load
address or start address. This is also the run address for files loaded
with the BRUN command.

B<offset> can be either decimal (no prefix) or hex (with 0x
prefix). Beware that no error checking is done: in particular, don't
forget the 0x prefix for hex addresses.

=back

=head1 BUGS

Attempting to use the same file for input and ouput causes make_b to
enter an infinite loop, writing garbage to the file until it fill up
the partition.

=head1 SEE ALSO

=over

=item dos33fsprogs(1)

=item a2tools(1)

=back

=head1 WEBSITE

http://www.deater.net/weave/vmwprod/apple/

=head1 AUTHORS

B<dos33fstools> written by Vince Weaver <vince _at_ deater.net>.

This manual page written by B. Watson for the SlackBuilds.org project,
but it may be used by anyone.