WITCH emulator manual

From eLinux.org
Jump to: navigation, search

Important! !Read the whole manual before trying to understand a test program!

The Interface/Basics

The Control Section

The first thing you need to know about this emulator is its interface. Here is a diagram of the parts in the section I like to call “The Control Section.” Here’s the diagram.

The Diagram

The diagram explains it mostly, but there are a few key differences I want to highlight/point out. First, every command is spaced with a single newline. Second, adding to stores requires a newline before the sign of the data to input. I’ll explain in the next chapter. The last thing to note for this section is that all changing of input fields (loop control and tape readers) is disabled because the engineers of the real WITCH weren’t able to program the tapes while they were running.

The Memory Area

The second diagram is of the stores, or as I like to call it, “The Memory Area.” Here it is.

The Diagram

You may have learned about how modern-day memory saves its contents on the computer restart, but as you will notice, on the page refresh, everything will be cleared. This is the equivalent of the engineers wadding up and throwing the tape(s) away, while other engineers restart the machine. To note, each regular store is 9 digits wide, including a sign. Also notice that my two filled stores have a zero for the start. This is important because the machine had the first dekatron in each store as the sign dekatron. 0 means + and 9 means -, but only for the first digit. Next, let me talk about stores in more detail.


Clearing Stores

To start, let me show you the first thing you need to do for any of the operations, clearing. To clear a store, you need a 2 or 4 + the store number + 00. For example, 21000 would clear store 10, setting it to 000000000, or +00000000. Just to let you know, the store number is the row number + the column number. So row 90 + column 1 would be store 91. This is required because before clearing, the WITCH doesn’t know what that store is, and clearing makes it a defined, known number. This will also work on the accumulator (store #09). After this, you can start adding to stores.

Adding to Stores

Adding to stores, as I explained in the last chapter (section 1-1), requires a newline before the data to put into the store. An example would be


The blue text is the command, while the red text is the data. As you can maybe see, the command is seperated into 3 numbers. The first one is 1 which is the command number. Then the second has to be 0 plus the current tape reader. If I was at tape reader 6… Oh wait, tape reader 6 got lost. If I was at tape reader 3, the first part of the command would be 103. The last part of the command itself is the store to add the data to. The data is an 8 digit long integer with a specified + or - sign. This has to be specified or the emulator will give you an error and stop. I forgot to mention that 3 also works instead of the 1 at the front, but only for adding to stores, not adding from stores. Next, it’s time for adding and subtracting from stores.

Adding and Subtracting


To begin this fantastical journey through Addland and Minus City, we need to start with addding. To add the command is 1 + store 1 + store 2. Both of these have to be defined stores. This command will add store 1 to store 2 and put the result in store 2. If you choose to use 2 + store 1 + store 2, you will notice that the first store is cleared and the second store has the result.


To subtract the command is 3 + store 1 + store 2. This is different because it is store 2 - store 1 instead of the other way. This also works with the command 4, and it is the same thing as doing 2 with the subtraction rules in play.

Multiplying and Dividing


First you will need to have two filled stores handy. Then do 5 + store 1 + store 2. It is store 1 times store 2 for the result. The result will go into the box labeled Accumulator. The Accumulator, or acc, will be a store that is 15 digits long plus sign. You can get the numbers out of it by using the store number 08 for the first 8 digits and 09 for the remaining ones.


Also, division requires that the accumulator be filled. To fill the accumulator, use 1 + the current tape reader + 08 to fill the first 8 digits. For the last 7 digits, the command is 1 + the current tape reader + 09. The 09 store cuts off the last digit of the data you put in, so if the accumulator was cleared (using 20900) and you put in -123456678 as the data, the acc would be -000000001234567 or 9000000001234567.

Setting Course for Another Tape Reader

Finding a Block Marker

To advance a block marker, type 03 + the block marker to look for + the number of the tape reader to look on. An example is 03202 where 2 is block marker 2 and 02 is tape reader 2. This will advance tape 02 and look for block marker 2 and it will not execute commands. To note, if you have a looped tape reader and the block marker is not found, you will have to stop the WITCH Emulator manually, using the stop button. If you have a straight tape and the block marker is not found, that tape will run to its end and give you an error. There is another command to do this but I will explain it later.

Switching Tapes

To switch tapes, type 02 + 1 + the tape number to switch to. For example 02102 will switch to tape 2 and start executing commands from it. 022** will be explained later.



To start formatting a store to be printed, type 07 + the format + 00. The formats are:

  • 0: 5 carriage returns
  • 1: Perforate 8 digits (not implemented yet)
  • 2: Perforate 5 digits with asterisk
  • 3: Print 8 digits without carriage return
  • 4: Print 8 digits with carriage return
  • 5: Print 8 digits with 2 carriage returns
  • 6: Print 6 digits for 1/6 of the printing area with no carriage returns
  • 7: Print 6 digits for 1/5 of the printing area with no carriage returns
  • 8: Print 6 digits with carriage return
  • 9: Print 6 digits with 2 carriage returns

Actually Printing

To print you need to type 1-2 + the store to be printed + 01, after you specify the format with the above command.


Is the Store Positive, or is it Negative?

To store if a store is positive, use 011 + the store number. To store if a store is negative, use 012 + the store number. You can use this in two ways. One is use the 05 command which does exactly what the 03 command did but only if the stored value is true. 022 does what 021 did but does it only if the stored value is true.


To stop the program type 00100.