Under BSD/OS 4.0.1 (maybe other versions too) you can dump an object file in 16 bit mode using the objdump command:
The trick is to get your data into some format that objdump can read. The easiest way to do this is to prepend an a.out header. Assuming you have a file with pure 8086 instructions (like bootany.sys), you can use the following program to prepend an a.out header:
main(int ac, char **av)
{
char buf[1024*1024];
static long x[8];
int fd;
if ((fd = open(av[1], 0)) < 0)
err(1, "%s", av[1]);
x[0] = 0407;
x[1] = read(fd, buf, sizeof(buf));
write(1, x, sizeof(x));
write(1, buf, x[1]);
}
The header the the file are both output to standard out.
So, the steps are: