4 ms·
I once wrote a Boot loader for a minicomputer that had a card reader. One card holds 80 chars and a physical buttons on the machine would load those bytes into
by todd8 4y ago
I once wrote a Boot loader for a minicomputer that had a card reader. One card holds 80 chars and a physical buttons on the machine would load those bytes into low memory and set the program counter to the address of the first byte. I could just squeeze in enough binary machine instructions that loaded 6 more cards of machine code that made up the rest of the boot loader. That way, a user could put these 7 cards on the front of any program they wanted to run and put it all into the card reader.
Things were actually a bit more complex, a FORTRAN program would require the compiler to be next in the stack followed by the user’s FORTRAN code and then the data that would be data read by the program.
The goal of this reading one card that would read more cards was to minimize the amount of switches that had to be set on the front panel to kick off the whole sequence. One card couldn’t even hold the final branch for the machine language loop that read cards 2 through 7. That branch instruction was at the front of card 2 that has been read into into memory by the body of the loop.
TLDR: lots of bit twiddling was needed to create an ergonomic loader.
- colejohnson66 4y agoReminds me of the IBM 1401 where the boot card needs to not only load the next card, but place "word marks" on the read "characters". Only after a few cards would you have bootstrapped enough to go further. Ken Shirriff did a post about it a few years ago: http://www.righto.com/2021/02/an-ibm-1401-mainframe-computer-at.html http://www.righto.com/2021/02/an-ibm-1401-mainframe-computer...