24

I recently tried the simh emulator pdp11.

The disk image I used can be found on the internet, and instructions for booting it are here.

Presumably it belonged to Dennis Ritchie, as the username is "dmr".

In the /usr/games folder are about 20 games and amusements for wasting expensive computing resources.

One 'game' is called 'bcd'.

If I run it by typing ./bcd, nothing happens. But then the next command I execute gets printed out as ascii art:

 ________________________________________________
/WC -L *                                         |
| ]                                              |
|   ]] ]                                         |
|]                                               |
|111111111111111111111111111111111111111111111111|
|222222222222222222222222222222222222222222222222|
|3]33]3333333333333333333333333333333333333333333|
|444444]44444444444444444444444444444444444444444|
|555555555555555555555555555555555555555555555555|
|]66666666666666666666666666666666666666666666666|
|777777777777777777777777777777777777777777777777|
|888888]88888888888888888888888888888888888888888|
|999999999999999999999999999999999999999999999999|
|________________________________________________|



 ________________________________________________
/LS                                              |
|                                                |
|]                                               |
| ]                                              |
|111111111111111111111111111111111111111111111111|
|2]2222222222222222222222222222222222222222222222|
|]33333333333333333333333333333333333333333333333|
|444444444444444444444444444444444444444444444444|
|555555555555555555555555555555555555555555555555|
|666666666666666666666666666666666666666666666666|
|777777777777777777777777777777777777777777777777|
|888888888888888888888888888888888888888888888888|
|999999999999999999999999999999999999999999999999|
|________________________________________________|

Does anyone know what these represent?

1 Answer 1

28

The bcd command formats the output as a punch card, like this one:

enter image description here

From the BSD games man page:

bcd ppt morse - reformat input as punch cards, paper tape or morse code

The ] stands for where the holes would be.

At first glance, it seems to do nothing because it's waiting for input from stdin. Try piping something into it (i.e. command | bcd) to see.

5
  • 2
    Since this appears to be a serious work tool I wonder why it was put in the games folder? Dec 17, 2012 at 13:54
  • 1
    I don't really think this is a serious work tool; (I think that) in 1979 punch cards weren't used that much.
    – Renan
    Dec 17, 2012 at 14:34
  • 1
    @DanNeely To make real punch cards, you need a card punch. printing them is just pretty.
    – hildred
    Dec 2, 2013 at 2:41
  • I wonder which coding it uses... Jul 4, 2014 at 15:23
  • 1
    @sendmoreinfo: Probably BCD coding.
    – Dolda2000
    Jul 11, 2015 at 6:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .