Wang 600 Program Codes

This is an explanation of advance programming codes, some of which are undocumented in Wang manuals. Most of these codes are used only in programs, although many of them work from the keyboard in Run mode. One exception is the "program print" command for printing a formatted number. This only functions when it is in a running program, although there is an alternate code that may be used in Run mode.

Key SequenceCodeFunction
"Program Print" Codes
PRINT tf08 02, tt ffPrint, formatted, using 'ff' decimal places
and with letter tag 'tt'
"Alpha" Codes
α STOP09 02, 09 030.5 second pause
α PRINT09 02, 08 02enable key trace
α α09 02, 09 02disable key trace
α LOGeX09 02, 08 10enable program trace
α eX09 02, 08 11disable program trace
α f(x)-0009 02, 10 00π
α f(x)09 02, 10 xxdisplay ×= 10xx
α F(x)09 02, 11 xxdisplay ÷= 10xx
α Cx*09 02, 14 xxdisplay ×= 10xx
α Dx*09 02, 15 xxdisplay ÷= 10xx
α LOAD PROG09 02, 08 14Skip N "records" and load program from tape
N = display
α 1/X09 02, 08 15Skip N "records" and load program from tape
(same as α LOAD PROG?)
α √X09 02, 08 13(same as α LOAD PROG?)
α RECALL09 02, 08 01recall registers from tape,
start with R(display), R(display - 1), ...
α STORE09 02, 09 01store register(s) to tape,
start with R(display), R(display - 1), ...
α JIF009 02, 08 04jump if R0 = display
α JIF+09 02, 08 05jump if R0 >= display
α SIN09 02, 08 06jump if R0 < display
Program Control
MARK mm09 00, mm mmSet Label mm mm
SEARCH mm08 00, mm mmGoto Label (MARK, mm mm)
f(x)10 xxCall function (MARK, 10 xx)
F(x)11 xxCall function (MARK, 11 xx)
D7* mm15 07, mm mmCall Label (MARK, mm mm)
D15* mm15 15, mm mmGoto Label (MARK, mm mm)
I/O f(x)15 02, 10 xxJump if R0 = display (xx: don't care)
I/O F(x)15 02, 11 xxJump if R0 ≠ display (xx: don't care)
I/O Cx*15 02, 14 xxJump if R0 = display (xx: don't care)
I/O Dx*15 02, 15 xxJump if R0 ≠ display (xx: don't care)
Program Control in ROM
(all Jump codes also work in ROM)
Ax*12 xxCall ROM f(x) (MARK, 12 xx)
Bx*13 xxCall ROM F(x) (MARK, 13 xx)
D3* mm15 03, mm mmGoto Label ROM (MARK, mm mm)
D4* mm15 04, mm mmGoto Label ROM (MARK, mm mm)
D5* mm15 05, mm mmGoto Label ROM (MARK, mm mm)
D6* mm15 06, mm mmGoto Label ROM (MARK, mm mm)
D12* mm15 12, mm mmCall Label ROM (MARK, mm mm)
Misc Data
D0* rr15 00, rr rrRecall R(rr)
(same as RECALL)
INDIR cr15 11, cc rrPerform register OP 'cc' indirectly on R(rr). If 'cc' == 00 then add register contents to P.C.
Cx*14 xxExchange display and R(xx)
D1* tf15 01, tt ffPrint formatted, same as program print
but works from keyboard
D10* aa15 10, aa aaMimics alpha functions
(same as α)
D8* xx15 08, xx xxunknown - NO OP
D9* rr15 09, rr rrStore R(rr)
(same as STORE)
I/O Codes
I/O xy*15 02, xx yy
xx: 00-09
yy: 00-15
Print display to "Output Writer"
xx = integer places
yy = decimal places
I/O Ay*15 02, 12 yyPrint yy blanks to "Output Writer"
α cc...09 02, cc cc ... 02 02Prints string to OutputWriter
until 02 02 encountered
cc cc must be 00 00 - 07 15,
04 00 - 07 15 plot corresponding character 00 00 - 03 15 based on registers 00 00 (Y) and 00 01 (X)
I/O By*15 02, 13 yyPage in/out blocks of program steps
to/from "Fixed/Removable Disk". Register 00 00 is disk address, 00 01 is program step. 'yy' determines in/out and number of steps.
GROUP1 xx15 13, xx xxOutput 'xx' to "device 4" and stop.
Device then takes over and issues GO when done.
GROUP2 xx15 14, xx xxOutput 'xx' to "device 5" and stop.
Device then takes over and issues GO when done.

* Requires use of pushbuttons 1-7, and Sp/8, in combination with keys 00-15 to form code.