Back in the day - instruction fun - data center manager: WTF



  • When I was a student, I worked on the HP-3000 Series II minicomputer. (This was a day when student shenanigans were largely ignored as long as the machine didn't actually break.)

    The HP-3000 had a row of lights on the front to display the instruction in the Current Instruction Register; the actual machine register that held the next instruction to be executed. One day, I hit upon the idea of programming that so that I could display patterns. (The picture below is actually of a Series III, but they looked almost identical.)

    To do this was actually pretty straightforward: you just execute one instruction...a lot. For example, I might take a stack operation word (which actually contained two stack operation instructions) and build a block of a hundred "NOP, DDEL". This had the nice 16-bit instruction pattern 0x0002. If you then executed that in a quick loop, the instructions for the loop would hardly be visible at all, since there might be three or four of them with a more-or-less random bit pattern for every hundred NOP,DDEL words executed, they were hardly visible.

    Of course, you had to do other things in the loop sometimes; for a hundred DDEL instructions, I had to add 200 words to the stack before executing it. (Otherwise the stack got empty or something.)

    Anyway, this was my list, rescued from the dregs of history:

    • 0x0001 NOP,DELB - Use ADDS to add 1000 words to the stack, then DELB in in the block
    • 0x0002 NOP,DDEL - Use ADDS to add 2000 words to the stack, then DDEL in in the block
    • 0x0004 NOP,INCX - Repeat a 100 instruction block with overflow trap off
    • 0x0008 NOP,DCMP - Use ADDS to add 2002 words to the stack, then DCMP in in the block + 1 DDEL
    • 0x0010 NOP,ADD - Use ADDS to add 1001 words to the stack then ADD in in the block + 1 DEL; overflow trap off
    • 0x0020 NOP,DEL - Use ADDS to add 1000 words to the stack, then DEL in in the block
    • 0x0040 DELB,NOP - see 0x0001
    • 0x0080 DDEL,NOP - see 0x0002
    • 0x0100 INCX,NOP - see 0x0004
    • 0x0200 DCMP,NOP - see 0x0008
    • 0x0400 ADD,NOP - see 0x0010
    • 0x0800 DEL,NOP - see 0x0020
    • 0x1000 ASL 0 - Add a word to TOS; run the block with overflow trap off, clean up stack afterward
    • 0x2000 MOVE - Block of MOVE PB,0 after setting up the stack for the MOVE; clean up after.
    • 0x4000 LOAD - Load 1000 words in the block; use DELS to clean up stack
    • 0x8000 SUBM - Add a dummy word to the stack, SUBM location DB+0, no index, no indirect in in the block

    Of course, this had to be tuned for time since MOVE instructions take much longer than ADD,NOP instructions, but that was just a little detail work.

    Then you could have your patterns. Let's say, for example, that you wanted a Cylon, (note: I hated Battle Star Galactica, but the eyes were cool) only with two eyes sweeping back and forth. I had my instruction block subroutines defined to be 1/100th second per call, so if you alternated calls for, say 0x8000 and 0x0080, it would look like two steady eyes. So here's the recipe for a Cylon:

    Start with:

    • 15 loops of alternating 8000 and 0080 (0.3 second)
    • 15 loops of alternating 4000 and 0040
    • 15 loops of alternating 2000 and 0020
    • 15 loops of alternating 1000 and 0010
    • 15 loops of alternating 0800 and 0008
    • 15 loops of alternating 0400 and 0004
    • 15 loops of alternating 0200 and 0002
    • 15 loops of alternating 0100 and 0001

    Then reverse with:

    • 15 loops of alternating 0200 and 0002
    • 15 loops of alternating 0400 and 0004
    • 15 loops of alternating 0800 and 0008
    • 15 loops of alternating 1000 and 0010
    • 15 loops of alternating 2000 and 0020
    • 2515 loops of alternating 4000 and 0040

    Presto: A pair of red eyes, sweeping continuously left/right/left/right, about 4.2 seconds per cycle. As long as you didn't try to light too many lights at once (3 was about the limit) you could get any pattern you wanted.

    Finish up by running this program continuously in bottom-feeder priority, and you're all set. When people do real work, the pattern disappears in the cluster of other instructions for a moment, but as soon as they let up...back to sweeping the world.

    Where's the WTF you say? Well, that happened the first time the data center manager saw it running and went: :wtf:❓❓❓❗❗❗

    (He wanted to know if I rewired the computer.)


  • Discourse touched me in a no-no place

    That sounds like a complete WOPR.


  • FoxDev

    sounds more like an early example of an AMOR to me



  • The same type of technique was quite common on the PDP-8 and (on the few models with a front panel) the PDP-11.......Fun days...



  • Did you also add it to a mission-critical application? If not, not a WTF.
    But still, very fun, I salute you. 👍



  • @Medinoc said:

    Did you also add it to a mission-critical application? If not, not a WTF.But still, very fun, I salute you.

    That was back when even an amateur hacker (I didn't even know that word) and student like myself wanted to do useful things on the computer. That's why it had to run in bottom-feeder priority--that way it didn't disrupt real work. Putting it in something mission critical never even occurred to me.

    Nowadays, though...if there were still a CIR, a company would make this part of the app and make you pay to turn it off. ("Oh, you need better performance?...")



  • @CoyneTheDup said:

    turn it off

    That's just stupid.

    First payment buys them removing one of the loops...


  • Discourse touched me in a no-no place

    @CoyneTheDup said:

    Nowadays, though...if there were still a CIR, a company would make this part of the app and make you pay to turn it off. ("Oh, you need better performance?...")

    That's also the modern phone app free to play model.


Log in to reply