Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site zeus.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!qantel!hplabs!tektronix!teklds!zeus!bobr From: bobr@zeus.UUCP (Robert Reed) Newsgroups: net.bizarre Subject: Re: Bizarre Code Message-ID: <96@zeus.UUCP> Date: Tue, 17-Sep-85 16:20:28 EDT Article-I.D.: zeus.96 Posted: Tue Sep 17 16:20:28 1985 Date-Received: Sat, 21-Sep-85 05:40:57 EDT References: <462@moncol.UUCP> <29712@lanl.ARPA> <1582@peora.UUCP> <6814@ucla-cs.ARPA> Organization: Tektronix, Beaverton OR Lines: 29 If we're into bizarre boot code, consider the boot loader for the IBM 1130. (Antique machine, but from the era where hacking was a basic survival skill). The 1130 provided two Initial Program Load (IPL) devices to boot the OS off the internal disk drive: a card reader or a paper tape reader. However, the hard-wired load procedure for the card reader was to put one 12 bit card column image in each sixteen bit word. Four bits would go to the top of each word and the other eight to the bottom, and there was a maximum of 80 consecutive words that could be loaded. The standard cold start program required at least one instruction which needed bits set in the unset four, and used many instructions which conveniently needed those bits set to zero. At least two bits of that field were index register bits for address decoding. So the cold-start program would use the first 12 instructions or so to modify the code to be used for doing the disk IO, and this code would then be executed. But the really bizarre thing came with the paper tape IPL. It would read four bits of each eight bit frame and stick it in the next four bit nibble, and continue to do so until it saw a bit in the fifth position of a column. The effect was that four frames would be read for each word in memory, loading every bit prior to IPL execution. Care to guess what the standard IPL program for paper tape looked like? If you guessed that the second frame of each foursome was empty, you're RIGHT! The same code was used. The same synthesis of instructions, in this case totally unnecessary was carried out. Bizarre, huh? -- Robert Reed, CAE Systems Division, tektronix!teklds!bobr Brought to you by Super Global Mega Corp .com