Wang 600 Emulator

WANG 600 Emulator

Download Binaries
Linux (x86)wang600GUI based on GLUT library (comes with Linux)
Windowswang600.exeGUI based on GLUT library (obtain from here )
DOSwang600.comNo GUI
TOS *)wang600.prgNo GUI
*) Executable on a real Atari ST or in turn emulated by my Atari ST Emulator!

Calling Modes
Command line interactive:wang600
Redirected input/output:wang600 < {input_file} > {output_file}
Automatic tape execution:wang600 -a -t {tape_file} [arg]*
Graphical user interface:wang600 -g

Program Examples
Solar and lunar eclipses (German)wang600 < finst43.in
Simple prime numbers program (tape file)
   load program from tape
   list program
   run program
wang600 -t prim.wng
> LP
> LIST 0
> GO
Example from below museum (tape file)
   load program from tape
   list program
   enter parameter n
   compute n!
wang600 -g -t fac.wng
 press key LOAD PROG on GUI
 press key LS on GUI
 press key 6 on GUI
 press key GO on GUI

From my memories collection:
Mark Sense Card
Program Listing
Results Printout
German Data Sheet
Keyboard Layout
Personal Summary

Link to excellent web site describing the Wang 600:
http://oldcalculatormuseum.com/wang600.html
(Also look for Wang 720C there for microcode internals!)

Short emulator description:

================================================================================
genealpha (@) WANG 500/600 [TP] CalcEmulator. V 2.10, Mar 21 2010.
Copyright (C) 1999-2010 by Alf Urban, Munich. All rights reserved.
================================================================================

Purpose and Operation
---------------------

WANG600 emulates the functionality of the legendary programmable desk
calculator WANG 600, built from 1972 until the late seventies.

This machine has 16 general purpose registers for floating point operations
(like + / - / x / : / STore / REcall etc.), 312 / 824 / 1848 program steps
(600-2 / 600-6 / 600-14), a 16-digits display, trigonometric / logarithmic /
inverse functions, program flow instructions, I/O and many more operations.

The keyboard/display is read/written from/to stdin/stdout and may be redirected,
the cassette tape unit is emulated by simple binary files,
the drum printer by an ASCII output file.

The emulator distinguishes between "commands" and "operations",
the first are for machine control and similar purposes,
the latter are executable instructions and may be used in a program sequence.

There are two basic operation modes: RUN and LEARN, for execution and
programming, respectively.

See the TUTORIAL for a more detailed introduction.


Functional Restrictions
-----------------------

* Double precision arithmetic, therefore 3 digits exponent instead of only 2
* Minor incompatibilites, e.g. dot matrix display instead of 9-segments ;-)
* Card reader not supported (but not necessary, we have tapes!)

================================================================================

usage: wang600 [option]* [cmd | op | arg]*

	-s {steps}	storage capacity (default: 824 steps; multiple of 8!)
	-t {tape}	tape file name (input/output)
	-p {printer}	printer file name (output)
	-a		automatic LP/GO/EXIT after start/args/end
	-g		graphical surface (only if no -a and no input redirection)

================================================================================

	Summary of (case insensitive) commands, lowercase part is shortcut:
	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	hELP		show commands help text (this page)
	oPS	| cODES	show operations help text / internal machine codes
	?		show current display / program step
	EXIT		terminate emulator			#comments

	rUN[LEARN]	run mode executes operations directly [show steps]
	leARN[PRINT]	learn mode records operations to memory [print steps]
	lIST {[-]n | 0}	print program (n steps from/before current PC to EP)

	FL	| SC	float/scientific presentation of numbers on display
	DEG	| RAD	interpretation of numbers for trigonometric functions

	TAPE	{file | cmd}	new tape file or RELEASE, fORWARD, REWIND
	PRINTER	{file | cmd}	new printer file or FEED, ON, OFF

	PRIME			reset display, PC, return address, error flag
	SETPC	{step}		set PC to step
	SM	{mark}		search mark, set PC to step after mark
	sTEP	| bACK		single step / increment / decrement PC
	INS	| DEL		insert / delete a program step at current PC
	RECORD	| VERIFY	record / verify program from current PC to EP
	TITLE|DATE|AUTHOR {str|-|=} strings for tape blocks (new|clear|copy)


	Summary of (case sensitive) operations:
	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	{E | T | + | - | x | : | ST | RE | *8 | *9 | f | F | A..D}{0..15}

	{S | M | RE | ST}{0..255 | base_operation}
	{W | a}{base_operation}

	GO | SP			start/continue program, stop program
	JZ | JNZ | JGE | JERR	skip next step if display [non]zero, >=0, err
	[A]SN | [A]CS | [A]TN	[arc]sin/cos/tan
	RD | DR			convert radians to degrees and vice versa
	LN | LG | EXP | DXP	natural / decimal logarithm / exp. function
	SQU | SQRT		square and square root
	INT | ABS		integer and absolute value
	LP | EP			load program, end program
	RCP | RT		reciprocal value, return from function

	[-]{0..9}*[.[0..9]*][e[-]{0..9}*]     (10/2 digits mantissa/exponent)
	CD | CM			clear display / memory (16 base registers)
	- | PI | PAUSE		change sign / 3.14159265358 / 0.5 secs delay
	JRZ | JRNZ | JRGE |JRLT	skip next step if R0 [not]equal, >=, < disp.
	ID{reg_operation}	indirect register operation (T +-x: ST RE C)
	W{0..9 | F | E}[X..Z | A..M (if omitted: empty line)]


	Summary of internal machine codes:
	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Xy	E   T   +   -   x   :   ST  RE  *8  *9  f   F   A   B   C   D#
xY	0   1   2   3   4   5   6   7   8   9   10  11  12  13  14  15

Ey	0   1   2   3   4   5   6   7   8   9   .   EE  +-  err CM  CD
*8y	S#  RE# W#  GO  JZ  JGE SN  CS  TN  RD  LN  EXP SQU INT LP  RCP
*9y	M#  ST# a#  SP JNZ JERR ASN ACS ATN DR  LG  DXP SQRT ABS EP RT
Dy		IO#				    ID#     G1# G2#

W Xy	X   Y   Z   A   B   C   D   E   F   G   H   I   J   K   L   M
W xY	fx0 fx1 fx2 fx3 fx4 fx5 fx6 fx7 fx8 fx9 flp exp exp exp exp feed
a *8y	PI rdd pon skp JRZ JRGE JRLT				load PAUSE
a *9y	   wrd poff PAUSE
a fy	PI  *10**y
a Fy	PI  /10**y
D2 x0								JRZ JRNZ
Dy 08							    ron read

Notes:	# indicates a 2 steps instruction
	J* conditional jumps: compare display to zero
	JR* conditional jumps: compare register R0 to display
	Cy exchanges display and register Ry

================================================================================

Licence and Disclaimer
----------------------

You are free to use, copy and distribute this program for any use, IF:

	* NO FEE IS CHARGED FOR USING THE PROGRAM,	*and*
	* THE PROGRAM IS NOT MODIFIED IN ANY WAY.

Alf Urban disclaims all warranties as to this software, whether express
or implied, including without limitation any implied warranties of mer-
chantability, fitness for a particular purpose or functionality.

Any responsibility for any damages (including consequential ones)
caused directly or by reliance on this program is denied.

Using this program is an acknowledgement of these conditions.

================================================================================