6530 Programmer's Guide

Tandem NonStop Kernel Application Interface
6530 Programmer’s Guide
4-5
Programming
Example
The following is an example of an application written in the Transaction
Application Language (TAL) for interaction with the 6530. The example
performs this series of functions:
Puts the 6530 in Block Protect submode
Sets enhanced color field mapping
Starts the enhanced color field with a blue color for foreground and a
red color for background
Beginning at row 0, column 0, writes the ASCII character set to the
screen (and screen buffer) sequentially. Ends at row 24, column 80.
Reads back the contents of the screen buffer, beginning at row 1,
column 1, sequentially.f
See the Transaction Application Language Reference Manual for more
information about programming in TAL.
Note The program presented here can be compiled and run exactly
as presented. However, it is not a supported software product of
Tandem and has not undergone the rigorous testing given to an
officially released product. Keep this fact in mind when adapting
the code to your purpose.
?NOLIST
?NOCODE
?NOMAP
?NOGMAP
?INSPECT, SYMBOLS
?SOURCE
$SYSTEM.SYSTEM.EXTDECS(CLOSE,CONTROL,DEBUG,DELAY,DEVICEINFO,
? ABEND,FNAMEEXPAND,FILEINFO,MYTERM,NUMOUT,
? OPEN,READ,SETMODE,STOP,WRITE,WRITEREAD)
?LIST
?PAGE " M A I N P R O G R A M "
PROC SAMPLE^TERMINAL^PRGRM MAIN;
BEGIN
INT .fname [ 0 : 33 ] , fnum , I, R, C, count^read ;
INT .buffer [ 0 : 1500 ], tube^out [ 0 : 10 ] ;
STRING .fname^s := @fname ’<<’ 1 , .char [0:0], .e ;