Running Environment

The simulator configuration is controlled by the "rc" file "~/.wang700.rc". This file is normally configured through the "Edit"/"Preferences" menu items, but may also be editted manually if necessary (beware of mispelling paramters). The following parameters on the "Preferences" window control certain aspects of the calculator. The corresponding parameter names in the rc file are listed in square brackets.

Enable PanaPlex '1'
[wang700_special1] Enables use of the center segments of the PanaPlex 9-segment display when representing the digit one, if the PanaPlex 9-segment display is selected (non-standard). Default: on.
Display style
[wang700_displayfont] Selects the font to use for the display. Original hardware matches the default "Nixie Tunes" (NixieZM1336.ttf). Optional is "PanaPlex 9-Segment" (Panaplex9seg.ttf). If not set, some system-default font is used.
[wang700_home] Path to wang700 files. Default: ~/Wang700Files.
Teletype Host
[wang700_707_host] The host/IP used to connect to Model 706/707. Default: localhost
Enable Function Key Labels
[wang_function_labels] This property holds the currently loaded function key label file, however the Edit Preferences screen only allows enable/disable. Disabling will delete the property, while enabling (if not already enabled) will create an empty property (no label file selected). Once enabled, loading of label file may be done by right-clicking on the label bar. Changing this setting requires restarting the calculator to take affect.
Other parameters (maintained by the calculator, not typically user-controlled), that are not exposed in the "Preferences" dialog, are:
Last Tape image
[wang700_tape_image] The tape image file that was in the tape drive when the calculator was last used. Default: none.
Last Disk image
[wang700_disk_image] The expansion Model 730 disk image file that was installed when the calculator was last used. Default: none.
Model 703 Paper Tape image
[wang700_703_image] The Paper Tape image file that was mounted when the calculator was last used.
Micro Face devices
[wang700_705_xx] (Where 'xx' is 0 to 15) The "Micro Face" device (native command) that was last setup for the given device number. These properties may be edited in the "Devices" -> "705 Micro Face" menu.
Model 707 Paper Tape image
[wang700_707_rdr_image] The Paper Tape image file that was mounted when the Model 706/707 was last used.
Last Output device
[wang700_cn24_device] The Output device that was installed when the calculator was last used. Uses values such as "701" or "712". Default: none.
Tape file suffix
[wang700_tape_file_suffix] Default: "w7t".
Disk (Model 730) file suffix
[wang700_disk_file_suffix] Default: "w7d".

The simulator is normally started with the following command:

The model number may be specified on the command. Models 700A, 700B, 700C, 720A, 720B, and 720C are implemented. Default is to use model 720C. Note that the model may be set in the properties file, in which case the default will be what is set there.

An alternative is to run the simulator with debugging enabled.

Or the option "-I" (capital "I") causes the program to stop in the debug console before the calculator is initialized. Type the command "go" to start the calulator (other commands allow tracing, setting break points, etc).

Typing Ctrl-D in the calculator window will pause the simulation and print a command prompt. The command "help" will display available debug commands.

In order to use the debugging console, the simulator must have been started from a "terminal window" that is still active (all debug interaction will take place there, i.e. using stdin/out). Note, desktop icons often do not retain a terminal window after starting the program.

Wang 700 Simulator

Currently, the simulator microcode image is incomplete. Some functions may not work, or may not work correctly.

Wang 700 Simulator Differences

The simulator attempts to mimic operations of the original Wang 700 hardware as much as possible. Some obvious differences are the peripherals (tape, printers, etc.), since no physical devices exist.

Because the simulator runs real microcode from an actual Wang 700, it should behave identically to the original. However, some practicalities as well as possible oversights in hardware simulation may result in subtle differences. See the section on "Simulator Internals", below, for more information.

One notable difference in in "keyboard locking". There were situations (mainly I/O commands) where the calculator keyboard (with the exception of PRIME and debug keys) were disabled. This is not currently implemented, which means it is possible to interfere with certain operations (again, typically I/O) by pressing calculator keys during those operations.

Also, operation of the peripherals is based on incomplete documentation (not all peripheral schematics are available, little-to-no example software remains, and very few operators manuals have been found). The best effort has been made to emulate these peripherals accurately. Anyone with knowledge (or resources) related to Wang peripherals is encouraged to contact me.

Keyboard Operation

The virtual keyboard may be entirely operated by the mouse. For convenience, some real keyboard shortcuts are allowed.

The following keyboard shortcuts are supported:

When switching the default register, the current default register will be highlighted gray. Initially, the default register is Y and no key will not be highlighted. (whenever Y is selected, no key will not be highlighted.)


By default, the display uses a "Nixie Tubes" font, named "NixieZM1336.ttf", designed from the ZM1336 Nixie tubes used in the Wang 700 Series. An alternate font, "Panaplex9seg.ttf", s also present which is a facsimily of the Panaplex 9-segment display used in (most) of the Wang 600 Series.

These fonts provide the characters '0' - '9' and 'A' - 'F' which authentically replicate the standard decoding of the 7445 (Panaplex) or 7442 (Nixie) TTL I.C. They also provide '+', '–', '.', and ' ' (space) which replicate specific features of the displays used by Wang.

The Panaplex font also provides a character at '\005' which represents the digit '1' using the 8th and 9th segment of the display, which is authentic to the Wang 600 hardware which overrides the 7445 decoder in that case.

Both fonts also provide a "zero width" right-hand decimal point at '\007' that is used only on the Wang 700. Unlike later calculators, the 700 did not consume a digit position for the decimal point. It is a way to turn on the decimal point of a digit without requiring a separate column position in the display. This decimal point is for the previous digit, i.e. it is placed to the left of, and outside the character cell of, the next digit. This is actually the expected behavior, for example if the the string "1.4" has the '.' replaced with '\007' then it would still display the number "1.4" but with the decimal point immediately to the right of, and inside the character cell of, the '1' digit and this string would consume only 2 columns on the display.

These fonts also provide an "optimized" decimal point at character location '\006', centered in the character cell above the baseline, which is not authentic but provides a better looking display on calculators where an entire column is consumed for the decimal point.

In additon, the fonts provide a half-space character at '\004', which is used to represent a half-width gap between display elements on devices that mounted the display with, for example, a gap between mantissa and exponent on the Wang 700's.


Files are organized by suffix. Currently, all program image files have the .w7t suffix (for Wang 700 Tape images). All .w7t files are raw binary program codes and registers, with a program record ending in two END PROG codes (0x5c 0x5c). Model 730 Disk images have the suffix .w7d.

Tape Operation

The tape drive uses files on the local system. These files have raw binary program codes only. The files may have multiple program images, each terminated by an END PROG code, but the preferred method of operation is to put only one program image in a file.

In order to LOAD PROG or RECORD PROG, the tape unit must be "Ready", by depressing the "Tape Ready" button. If these operations are attempted when the Tape Ready button is not depressed, the display will blank. Pressing PRIME will restore normal operations.

The "Release" (tape eject) button will pop-up a file-selection dialog to allow choosing a file to use as a tape image.

The "Forward" and "Rewind" buttons will move the current location inside a file to the next, or previous, program image. Since most files will have only one program image, these are not normally used.

701 OutputWriter

This peripheral was based on a modified IBM Selectric typewriter. It is capable of text output only, with standard spacing. The device is "connected" through the "Devices"/"Output Device..." sub-menu. Printing to this device causes the "output window" to become visible. Selecting the device (when already connected) from the "Output Device..." sub-menu also makes it visible.

Since there is no physical printer, the printed output is put in a window where it may be viewed. In addition, this window allows Copy operations (e.g. Cut-n-Paste) to extract the contents (or a portion of it). Under the "File" menu, a menu option "Save" may be used to save the current contents to a file. A menu option "Tear Off" will clear the print window and discard all current contents. The menu option "Print" will send the re-formatted output to the default printer.

702 Plotting OutputWriter

This peripheral was based on a modified IBM Selectric typewriter. It is capable of text output along with micro-spacing which allows plotting. The device is "connected" through the "Devices"/"Output Device..." sub-menu. Printing to this device causes the "output window" to become visible. Selecting the device (when already connected) from the "Output Device..." sub-menu also makes it visible. The output may be consumed in the same way as for the Output Writer, from the "File" menu (Saved, Printed, or Tear Off). There is also a "Typewriter" menu that provides a "Home" function for the carriage, and will eventually provide setup of paper size, margins, etc.

711 Input/OutputWriter

Group I/O Commands
GROUP 2 04 12Type in Run Mode
GROUP 2 04 13Enter in Learn Mode

This peripheral was based on a modified IBM Selectric typewriter. It is capable of text output as well as input from the keyboard. The device is "connected" through the "Devices"/"Output Device..." sub-menu. Printing to this device causes the "output window" to become visible. Selecting the device (when already connected) from the "Output Device..." sub-menu also makes it visible. The output may be consumed in the same way as for the Output Writer, from the "File" menu (Saved, Printed, or Tear Off). There is also a "Typewriter" menu will eventually provide setup of paper size, margins, etc.

In addition to the "paper view" window there is a control panel that indicates and controls the input modes. Clicking the I/O LOCAL switch will toggle between those two modes. In LOCAL mode the page may be typed directly without sending anything to the calculator. Unlike the real hardware, the calculator is allowed to run normally in LOCAL mode. I/O mode is when the device is under full control of the calulator.

The calculator command Group 2 04 12 places the device in the "input mode", where the calulator is forced into LEARN mode and characters typed in the device window are stored in the program memory of the calculator. Typically, a sequence of characters are preceded by the ALPHA code and ended with an END ALPHA code. Press the GO button to end input mode.

The calculator command Group 2 04 13 places the device in the "type mode", where characters typed in the devuice window are printed but not sent to the calculator. The calculator remains in the RUN mode, but is waiting for the GO command from the device in order to be released.

712 Flatbed Plotter

This device is capable of vector (line) plotting as well as (drawn) text from a limited character set. The device is "connected" through the "Devices"/"Output Device..." sub-menu. Plotting to this device causes the "output window" to become visible. Selecting the device (when already connected) from the "Output Device..." sub-menu also makes it visible. The output may be consumed in the same way as for the Output Writer, from the "File" menu (Saved, Printed, or Tear Off). There is also a "Plotter" menu that allows setting the plot area, pen color, and returning the plot carriage to the "home" position. Future enhancements will include control over the paper size.

730 Fixed/Removable Disk

This device is simulated by a single file that supports the entire 16M address range of the device protocol. So there is not a separate removable disk, but simply a single image that may be read/written as a whole. Selecting the "730 Disk" option from the "Devices" menu will pop-up a file selection dialog from which a image may be selected to use as the disk. The file will be expanded as needed by writes. The file may also be "sparse", if writes are made beyond the current end of file. Unwritten portions of the file will read back as zero.

703 Paper Tape Reader

Group I/O Commands
GROUP 1 00 00Read number in Run Mode
GROUP 1 00 07Skip to CR/LF (no data entry)
End Of Tape is signaled by S&R 00 and GO

This device is referred to in Wang documentation as the "Paper Tape Editor". It can extract numeric data from "standard" 8-level ASCII paper tapes. The original device apparently was capable of printing the paper tape contents on an OutputWriter, however details of that are not known and that feature is not (currently) emulated.

File images used with this device are either "Text" (.txt) or "Wang Data File" (.wdf). The simplest form is one number per line with no other text.

Invoking GROUP 1 00 00 will cause one numeric value to be scanned from tape. non-numeric characters are skipped, then the numeric entry codes are sent until a non-numeric code is encountered. Note, scientific notation was apparently not supported, and is not emulated.

Invoking GROUP 1 00 07 will cause the device to skip all characters until a Carriage Return is seen. The emulation looks for the Unix end-of-line character (line feed).

Also, it was not clear from the brochure exactly how "End Of Tape" was handle. This emulation sends both "SR 0000" and "GO" on end of tape, as that seems to be required if the tape is being handled entirely under program control (because the calculator was essentially stopped while waiting for the Group I/O operation, the SR 0000 would RETURN to the stopped state and the program would not continue without the GO).

705 Micro Face

Group I/O Commands
GROUP 1 07 xxEnter number from device 'xx' in Run Mode

This device was a general-purpose electronic interface to any hardware that could generate BCD data, enabling real-time sampling of external data. It was limited to a maximum of 7 digits plus sign bit, and less if a decimal point was added somewhere. It supported scientific notation only as far as the program could decode certain digits as exponent (the device was not capable of using the SET EXP function of the calculator). Up to 16 devices were supported, allowing for sampling of 16 different data points.

Invoking GROUP 1 07 xx will cause external device 'xx' (00-15) to be activated and one sample read. The emulation has no "TTL fan-out" limitations, so the number of devices is not limited to 10. For the purposes of emulation, an "external device" is any arbitrary command to be executed on the native computer. The command must produce a single numeric value on it's stdout, although the emulation does not limit that to 7 digits. It is recommended that the sign be appended to the string, for example "55-" to represent negative fifty five. This is the way the original hardware presented the numeric value to the calculator, and avoids problems with the CHANGE SIGN code sometimes affecting the previous number, not the next one being entered. An alternative is to always code a CLEAR X before the GROUP 1 command.

Several example "devices" are present by default, and attempts are made to provide equivalents on Windows (CYGWIN is preferred). These default commands are:

DeviceUnix commandNumber returned
07 12date +%sSeconds since "epoch"
07 13echo $RANDOMA pseudo-random number 0-32767
07 14date +%H%M%Scurrent time, HHMMSS
07 15date +%m%d%ycurrent date, MMDDYY

"Devices" (commands) are setup through the "705 Micro Face" item in the "Devices" menu.

706/707 Teletype

Group I/O Commands
GROUP 1 15 00Start Tape (X ON) and enter number in Run Mode
GROUP 1 15 01Print "1" and enter number in Run Mode
GROUP 1 15 02Print "2" and enter number in Run Mode
GROUP 1 15 03Print "3" and enter number in Run Mode
GROUP 1 15 04Print "4" and enter number in Run Mode
GROUP 1 15 05-15Enter number in Run Mode
GROUP 2 15 00Start Tape (X ON) and enter characters in Learn Mode (tape must contain WRITE ALPHA codes, etc.)
GROUP 2 15 01Print "1" and enter characters in Learn Mode
GROUP 2 15 02Print "2" and enter characters in Learn Mode
GROUP 2 15 03Print "3" and enter characters in Learn Mode
GROUP 2 15 04Print "4" and enter characters in Learn Mode
GROUP 2 15 05-15Enter characters in Learn Mode
Run Mode emits X OFF (Stop Tape) when exiting commands

This peripheral consisted of Model 707 components that provided an ASCII/TTY/Remote interface to the calculator and an unmodified ASR33 Teletype designated Model 706. The emulation provides the Model 707 functionality (with additions described below) and the Model 706 functionality is provided by a simple socket/port text client such as "telnet".

An ASR33 Teletype integrated the keyboard, print unit, paper tape punch, and paper tape reader. This emulation places the paper tape functionality in with the Model 707 code and leaves the keyboard and print unit to the chosen client. If a client supports session logging and playback, then the paper tape functionality in the Model 707 might be redundant. But since most "telnet" clients, and simple I/O through a socket, do not support such features this functionality is kept in with the Model 707 code.

The client connects to the Model 707 using the host configured (default is the localhost IP using port 10707. The Model 707 must be "installed" (using the "Devices" -> "Output Device..." menu) in order for a client connection to succeed. Although the Model 707 hardware supported more than one Model 706, this emulation does not (currently) support multiple clients connected at the same time. Note, such support would require a change to paper tape handling, as each client would expect independent control of their own paper tape "hardware".

If using "telnet" as a client, the user should turn off "LINEMODE". This is typically done by entering command mode using the assign client escape character (often Ctrl-]), and entering the command "mode character". This mode is also known as "character-by-character" mode and includes having the server (Model 707) perform the "echo" functionality. The emulation does not currently assume a client is "telnet" and so does not attempt to force this configuration. most telent clients support some sort of "telnetrc" file, which may be used to set "mode character", however that would force character mode for all connections to that host by telnet, not just connections to the Model 707 (since telnet is rarely used anymore for "login connections", this may not be a problem).

The paper tape functions are controlled through the "Devices" -> "707 Teletye..." sub-menu, which is only enabled while a client is connected. This better emulates the true hardware locality of the ASR33 Teletype. A file image for the paper tape reader may be selected, and the paper tape punch image may be saved or torn-off (and discarded). There is always a file available to the punch, it is named "707Punch.txt". "Saving" consists of renaming that file and creating a new, empty, punch image. This file will be truncated (empty) whenever the "Tear Off" or "Save" options are used (with the exception of "Canceling a Save" does not alter the punch image).

Teletype-Wang character conversions are documented in the 707 Character Conversion Table.

714 Mark-Sense Card Reader

Group I/O Commands
GROUP 1 04 08Read cards in Run Mode
GROUP 2 04 08Read cards in Learn Mode

While support for the actual card reader is pending, there is a novelty program that allows one to "edit" a program image in a similar way that a stack of mark-sense cards were edited. This is provided in the wang700.jar file, and may be run with the command "java -cp wang700.jar w700_edit", or the "edit" ("Wang714" on Windows) startup script in the package directory (typically HOME/wang700apc).

Simulator Internals

The original Wang 700 microcode was constantly executing instructions the entire time that the calculator was turned on. The simulator cannot afford to consume 100% CPU on the host system. One major area of consumption is the display refresh routines. To minimize system load, the refresh routines are "short cut" and long periods of refresh (stopped in Run mode, alpha-STOP when running a program, etc.) are converted into sleeps (waiting for a keyboard event, or sleep for a predetermined amount of time).

On the original calculator, the display was only visible during the time that the microcode was actually refreshing the display. All other times the display was blank, simply because it was not being refreshed. The simulator has a static display that does not go blank when refreshing stops. In order to better simulate the original hardware, specific places in the microcode have been identified and the display is explicitly blanked at those times. In addition, whenever a keyboard event takes place the display is blanked. It is possible, though, that there are places that have not been identified yet that the display would go blank on the original hardware but not in the simulator.

The simulator is capable of operating much faster than the original calculator. Because of this, there are subtle differences in the behavior of the display (for example) while running a program. Consider a program that uses alpha-STOP to display intermediate results. The calculations between two alpha-STOP's may take so little time on the simulator that the interleaving blanked display is not perceptible.

Peripherals are handled by the microcode, and as such will behave the same as the original calculator up to the point that the microcode hands off control to the simulator.

One example is the original tape drive, which simply recorded a stream of 0's and 1's onto the tape. The simulator must interpret those 0's and 1's and convert them back into words of data. The simulator must also convert the words back into signals, and timing, that the microcode expects to see when reading the tape. Also, the original microcode used gaps on the tape to indicate the end/beginning of a program (or registers) image. That is not practical when using files, so the gaps are represented with a pair of END PROG codes and the simulator must convert to/from the equivalent signals and timing for the microcode.