Wang 700 Programming Functions

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.

Key SequenceCodeFunction
"Write Alpha" Codes
WRITE ALPHA 1/X04 12, 06 150.75 second pause
WRITE ALPHA 0-904 12, 07 xxX ×= 10xx("0" means 10)
WRITE ALPHA (**)04 12, 04 xxX ÷= 10xx("0" means 10)
WRITE ALPHA GO04 12, 05 14X = 180 ÷ π
WRITE ALPHA STOP04 12, 05 15X = π ÷ 180
WRITE ALPHA GROUP204 12, 04 10Skip if Y positive (Y ≥ 0)
WRITE ALPHA WRITE04 12, 04 11Skip if Y zero (Y = 0)
WRITE ALPHA SKIP IF ERROR04 12, 05 10Skip if Y negative (Y < 0)
WRITE ALPHA RETURN04 12, 05 11Skip if Y not zero (Y ≠ 0)
WRITE ALPHA LOG10X04 12, 06 10Skip if X positive (X ≥ 0)
WRITE ALPHA LOGeX04 12, 06 11Skip if X zero (X = 0)
WRITE ALPHA SET EXP04 12, 07 10Skip if X negative (X < 0)
WRITE ALPHA CHANGE SIGN04 12, 07 11Skip if X not zero (X ≠ 0)
Program Control
MARK mm04 08, mm mmSet Label mm mm
SEARCH mm04 07, mm mmGoto Label (MARK, mm mm)
*00 00 - 03 15Search+Return (Call) function (MARK, ff ff)
I/O Codes
WRITE xy*04 11, xx yy
xx: 00-09
yy: 00-15
Print X to "Output Writer"
xx = integer places
yy = decimal places
WRITE y*04 11, 12 yyPrint yy blanks to "Output Writer"
WRITE ALPHA cc*...END ALPHA04 12, cc cc ... 04 13Prints string to OutputWriter
until END ALPHA encountered
cc cc must be 00 00 - 03 15 (print character), or
08 00 - 11 15 plot corresponding character 00 00 - 03 15 based on display X and Y
*08 yyPage in/out blocks of program steps
to/from "Fixed/Removable Disk". Display Y is disk address, X is program step. 'yy' determines in/out and number of steps.
08 00 through 08 07 page-in blocks of program steps from "device 2". "Source" address is in Y (integer portion, 0 - 16M). In X is the starting program step number (integer portion, 0000 - 1983). Length determined by 'xx':
00010203 04050607
1 step 8 steps 16 steps 32 steps 64 steps 128 steps 256 steps (nothing)
08 08 through 08 15 page-out blocks of program steps to "device 2". "Destination" address is in Y (integer portion, 0 - 16M). In X is the starting program step number (integer portion, 0000 - 1983). Length determined 'xx':
08091011 12131415
1 step 8 steps 16 steps 32 steps 64 steps 128 steps 256 steps (nothing)
GROUP1 xx*04 09, xx xxOutput 'xx' to "device 4" (keyboard mode) or "device 6" (running program) and stop.
Device then takes over and issues GO when done.
GROUP2 xx*04 10, xx xxOutput 'xx' to "device 5" (keyboard mode) or "device 7" (running program) and stop.
Device then takes over and issues GO when done.

* Requires use of toggle switches in combination with keys 00-15 to form code.

** Requires either use of toggle switches in combination with keys 00-15 to form code, or knowledge of which key generates desired code.