Updated client.txt -> client.md in README.md.
[pdp11-bin2pdp] / README.md
CommitLineData
dc7591ac
AT
1# Overview #
2
3The programs contained in this directoy allow bootstrapping of a completely
4blank PDP-11 from an external host. It is not required that the PDP-11 have any
5pre-existing code in the form of drives or ROMs.
6
7# Status #
8
9The client has been tested with a PDP-11/23+ (KDF11-B on SLU2) and a PDP-11/73
10(KDJ11-B with DLV11-J). It should work with most PDP-11 CPUs and SLUs which are
11compatible with the DLV11-J register layout.
12
13The server has been tested with a PC running FreeBSD.
14
15# Instructions #
16
17These instructions assume your PDP-11 has a serial connection to a UNIX host,
18the `bootstrap_server.c` program has been compiled on the UNIX host, and the
19UNIX host has a binary image ready for transfer to the PDP-11.
20
d9756b2b 21Begin by loading the program contained in `client.md` into the PDP-11 via the
dc7591ac
AT
22frontpanel switches or ODT. Set the PDP-11's CPU registers as follows.
23
24 - **R0:** The starting memory address at which the binary image should be stored.
25
26 - **R1:** The number of bytes in the binary image. This information will be displayed
27 by `server.c` immediately prior to transfer.
28
29 - **R2:** The base (`RCSR`) register address of the SLU connected to the UNIX host.
30
31 - **R3:** The address to which control should be transferred after the binary image
32 is transferred to the PDP-11.
33
34Begin execution on the PDP-11. If the bootstrap program was loaded at the
d9756b2b 35memory addresses listed in `client.md`, begin execution at address `70000`.
dc7591ac
AT
36
37Initiate the transfer from the UNIX host with the command
38
39 pdp11-serial-loader -i <binary> -o <port>
40
41where `<port>` is the path to the device file for the serial port connected to
42the PDP-11 and `<binary>` is the path to the binary image file. For example, if
43using the first serial port under FreeBSD and a binary image named `pdp11.bin`,
44execute this command.
45
46 pdp11-serial-loader -i pdp11.bin -o /dev/cuau0
47
48In FreeBSD, add your user to the `dialer` group for permission to access the
49serial port.
50
51 pw groupmod dialer -m ataylor
52 exec su -l ataylor
53
54Once the binary image has transferred to the PDP-11, it will begin execution at
55the address contained in `R3` which should be your code.
56
57# Binary Image Format #
58
59Since the bootstrap program must be manually toggled into the PDP-11, brevity
60is paramount. Thus, the binary image matches the little-endian byte ordering of
61the PDP-11 word.
62
63Consider the following example program.
64
65 CLR R0
66 MOV R0 R1
67
68This would correspond to a binary image with consecutive bytes of:
69
70| Byte | Value |
71| ---- | -------- |
72| 0 | 00000000 |
73| 1 | 00001010 |
74| 2 | 00000001 |
75| 3 | 00010000 |
76
77If loaded into memory starting at location `2000`, the PDP-11's memory would
78look like this:
79
80| Address | Value |
81| ------- | ---------------- |
82| 2000 | 0000101000000000 |
83| 2002 | 0001000000000001 |
84