8

I want to create my own boot disk (an image file to use with simh) from my own PDP-11 code but I don't know how the code needs to be written to the disk/file so that it boots. I can load my code using absolute loader but I want to use a disk.

What is the format of PDP-11 disks that the computer will load code from at boot?

4
  • Welcome to Retrocomputing Stack Exchange. Please read the tour. I'll have a go at editing your question - feel free to edit it again (or revert the edit) if I have removed something that is important to the question, or edit to add more information.
    – wizzwizz4
    Commented Nov 8, 2017 at 17:37
  • 1
    Under which PDP-11 OS? Unix, RT-11, something else? AFAIK the simh boot command just reads a block (probably the first) and then executes it, so you can write your own bootloader if that is what you want, but I'd have to look up details and/or read source code.
    – dirkt
    Commented Nov 9, 2017 at 8:07
  • 1
    I'm wanting to write my own boot loader. I've now looked at the simh source for RL11 disks and done some testing and it seems that the first 4 sectors (of 256 bytes each) are read into memory starting at 0 and then code execution begins from address 0. The boot code itself is loaded into memory starting at octal 2000. I've now managed to get Hello World to display when booting from my DL11 disk image file.
    – retropdp
    Commented Nov 9, 2017 at 12:33
  • Can you indulge my curiosity and tell me, how can I get my hands onto something that feels like a PDP-11 at least on the software side? An emulator would suffice, although I'd be curious for real modern hardware too. Commented Dec 27, 2017 at 18:38

1 Answer 1

6

There is no specific 'format' required.

On a real PDP-11, what happens at bootup depends on what kind of boot PROM you have installed. In general, for disk-type devices the convention is to load the first block then jump to the code in that block. If you don't have a boot PROM for the device you want to boot from, you may have to toggle in a bootloader yourself (if your PDP-11 doesn't have console switches you can usually "toggle in" code using the console terminal instead).

Here is a web page containing sample bootloader code for various devices (including some non-disk devices): http://www.psych.usyd.edu.au/pdp-11/bootstraps.html

So effectively the only requirement to be able to boot is, you must work within whatever limits your boot PROM imposes. Typically this means you're limited to 256 words (512 bytes), and sometimes the first word must have a specific value for the boot block to be considered valid.

Beyond the first block (the "boot block"), there are usually no requirements on disk format. Normally the format of the disk will be determined by the operating system you are booting.

If you want to, you can simply have your program occupy the blocks that follow consecutively after the boot block, and put a small program into the boot block that just loads those additional blocks, then jumps to the first one.

2
  • Yes, mostly, but I recall the boot block content required depended on the disk drive and controller model. Writing the boot sector was done with the RT-11 COPY/BOOT command. The most restrictive code size limit was for the 8 in floppy RX01/RX11, because the sector size was only 128 bytes. Code to read in the boot sector could be even smaller, 36 bytes. See pcjs.org/configs/pdp11/rx11 Commented Jun 14, 2020 at 22:27
  • To put it another way, the boot block content depended on what you wanted the boot block to do. Normally this would be to load an OS from the same disk, but theoretically you could do anything else, including loading from an entirely different device. I suppose you might do this if you didn't have the correct boot PROM for the drive you want to boot from, but you did have another bootable device to load a boot block from. For example, if your system can only boot from tape.but it has a disk attached, you could load a boot program from tape that loads the OS from disk.
    – Ken Gober
    Commented Jun 15, 2020 at 15:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .