CHAPTER 2

LANGUAGE ELEMENTS

A BASIC-80 program consists of instructions, which tell BASIC-80 what to do, and data, which gives BASIC-80 the inform.ation necessary to do it. This chapter describes the different types of instructions and data, and shows how to represent them.

Instructions

BASIC-80 performs work by interpreting user-provided instructions. These instruc- tions are divided into three categories: commands, statements, and functions. These instruction types are described in the following topics; the individual instructions are described in detail in Chapters 6 and 7.

Commands

Commands are executed as soon as you enter them; they alter or direct entire pro- grams or files. Most commands can be used in program statements, but many of them halt program execution and force variables to zero or null.

Table 2-1 lists the BASIC-80 commands.

Statements

Statements are executed when they are encountered during program execution. They make up most of the instructions of a program. Most statements can be entered as commands.

Table 2-2 lists the BASIC-80 statements.

Table 2-1. BASIC-SO Commands

Command

Description

Example

 

 

 

ATTRIB

Changes the attributes of a file.

ATTRIB "~F1 :STAT", "W1"

AUTO

Automatically numbers program

AUTO 25,500

 

statements.

 

CLEAR

Sets aside memory for strings.

CLEAR 2000

CONT

Continues execution after BREAK.

CONT

DELETE

Deletes a line or lines from a

DELETE 700~875

 

program.

 

DIR

Displays a list of all non-invisible

DIR1

 

files on a disk.

 

EDIT

Specifies a program statement to

EDIT 170

 

be changed.

 

EXIT

Retu rns to operating system .

EXIT

KILL

Deletes a file from disk.

KILL ":F1 :STAT"

LIST

Displays a line or lines of a

LIST 300-400

 

program.

 

LOAD

Retrieves a file from disk.

LOAD ":F1 :DATES"

 

 

 

Page 11
Image 11
Intel 9800758-02 manual Commands, Statements