WITCH emulator manual

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 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.



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 10110 +12345678 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
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.

Subtracting
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
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.

Dividing
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.