11/25/96
➆
6270 Programming Tips
83
C H A P T E R
➆
6250 Programming Tips
The information in this chapter will enable you to understand how to use the 6000 Series
language to implement the 6250's features into your application:
❏
Creating Programs and Subroutines
❏
Controlling Execution of Programs and the Command Buffer
❏
Program Flow Control
❏
Program Debug Tools
❏
Program Interrupts
❏
Error Handling
Creating Programs & Subroutines
A program is a series of commands. These commands are executed in the order in which they
are programmed when the program is run. Immediate commands (commands that begin with
an exclamation point [
!
]) cannot be stored in a program. Only buffered commands may be
used in a program.
The 6250 has 40,000 bytes of non-volatile memory. Up to 39,000 bytes can be configured
for program storage of up to 100 programs with the
MEMORY
command (default is 21,400
bytes). You can use the
TMEM
command to determine how many bytes are available in the
program buffer, and the
TDIR
command to determine what programs have been defined. The
programs defined may have variable lengths, so you may have one long program or several
short ones, as long as the total length does not exceed the allocated memory capacity.
The commands that you enter to define a program are presented vertically in the examples
below. This was done to help you read and understand the commands. When you are actually
typing these commands into your program editor, they can be entered horizontally only if you
use the colon (
:
) as a command delimiter.
To begin the definition of a program, enter the Begin Program Definition (
DEF
) command
immediately followed by a program name and a delimiter. The End Program Definition (
END
)
command ends the program definition. All commands that you enter after
DEF
and before
END
will be executed when the program is run. An example is provided below.