However, at that time, the world had not yet settled on octets.
I beg to differ. If you look through brochures and manuals of next to all manufacturers, they tried hard to be IBM compatible at least for data exchange. Being IBM compatible was effectively mandatory for the whole industry and with the /360 introduction in 1964 the size of a byte (for interchange) was settled at holding 8 bits.
Given a pair of PDP-10s trying to send native binary data to each other over the ARPANET, how did they go about formatting it for transmission?
The PDP-10 was quite capable to handle 8 bit data streams as well as peripherals. Its standard punchtape, the PC04, was 8 bit, and quite capable of loading binary data.
While I do not remember the PDP-11 binary tape format, I would assume it was not much different from the way a PDP-8 or 12 handled a binary paper tape on a PC05 (also 8 bits wide). Her a PAL/MACRO-8 binary tape stored 6 bits per character, with using the the high bits as markers. A loadertape looked like this:
- 10.000.000 marking the start
- 10.xxx.xxx denoted the upper half of a loading address followed by
- 00.xxx.xxx with the lower half of the loading address
All following pairs of bytes with zero in the top two bits were decoded as words, until either another address was set (starting with 10), or a final mark (10.000.000) was read. If a final mark was detected. In this case the_last_ word read isn't data, but a 12 bit checksum of the 6 bit (!) values (including the loading address) read.
AFAIR if both bits are set, it addressed the field (memory block) the data had to be stored in. It had to come prior to any loader address and had the lower bits always set to zero to avoid generating a rubout - which was used to eliminate data.
htonl()
works on a UNIVAC 1100: stackoverflow.com/a/38675086/966071