Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 14 of 47

PDT 1100 Terminal Programmer's Guide: Chapter 10 Statement Reference, pages 111 to 120

Pages 111 to 120 of 413, from PDT 1100 Terminal Programmer's Guide

The original document is the PDF (3.5 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Symbol PDT-1100

Page 111

Chapter 10 Statement Reference Introduction This chapter provides detailed descriptions of the statements used to program the PDT 1100 terminal.

10-1

Page 112

PDT 1100 Terminal Programmer’s Guide

APLOAD Statement Name: ANK Pattern LOAD

Type: I/O Statement

Description Loads a user-defined font in the single-byte ANK* mode (*ANK: Alphanumeric and Katakana).

Syntax APLOAD characode, fontarrayname where: characode = A numeric expression which returns a value from 128

(80h) to 159 (9Fh). fontarrayname = An array integer variable name.

Note: Do not specify parentheses ( ) or subscripts which represent a general array as shown below or a syntax error results. APLOAD &H80,cp%() 'error APLOAD &H80,cp%(5) 'error

Notes APLOAD loads a user-defined font data defined by fontarrayname to the user font area specified by characode. !

!

!

10-2

To display user-defined fonts loaded by the APLOAD, use the PRINT statement in the single-byte ANK mode. If you attempt to display an undefined character code, a space character appears. In the PDT 1100, if the small-size font is selected, user-defined fonts loaded by the APLOAD are condensed into small size (6 dots wide by 6 dots high) for display. For the generating procedure of the small-sized user-defined fonts, refer to Display Mode and Letter Size on page C-4. The loaded user-defined fonts are in effect when the user program which loaded those fonts is running and during execution of the successive user programs chained by the CHAIN statement.

Page 113

Statement Reference

!

!

!

If you issue more than one APLOAD statement specifying a same character code, the last statement takes effect. The Interpreter refers to the array data defined by fontarrayname only when it executes the APLOAD statement. Once a user program has finished loading the user font, changing the data in the array or deleting the array itself (by the ERASE statement) does not affect the loaded user font. An array integer variable – a work array, register array, or common array – for fontarrayname should be declared by the DIM, DEFREG, or COMMON statement, respectively. DIM cp0%(5) DEFREG cp1%(5) COMMON cp2%(5)

The array variable should be one-dimensional and have at least six elements. Each element data should be an integer and stored in the area from the first to 6th elements of the array.

Syntax Errors Error Code and Message

Meaning error 71: Syntax error

No fontarrayname is defined. fontarrayname has an array string variable. fontarrayname includes parentheses ( ). fontarrayname includes subscripts.

Execution Errors Error Code

Meaning

05h

Parameter out of the range:

08h

!

characode is out of the specified range

!

The array structure is not correct.

Array not defined

10-3

Page 114

PDT 1100 Terminal Programmer’s Guide

Example DIM cp%(5) cp%(0)=&H00 cp%(1)=&H08 cp%(2)=&H1C cp%(3)=&H3E cp%(4)=&H7F cp%(5)=&H00 APLOAD &H80,cp% PRINT CHR$(&H80)

cp%(0) cp%(1) cp%(2) cp%(3) cp%(4) cp%(5) #

#

#

#

$

#

0 (LSB)

#

#

#

$

$

#

1

#

#

$

$

$

#

2

#

$

$

$

$

#

3

#

#

$

$

$

#

4

#

#

#

$

$

#

5

#

#

#

#

$

#

6

#

#

#

#

#

#

7 (MSB)

Figure 10-1. Array Elements

Reference Statements

10-4

Bit in each array element

COMMON, DEFREG, DIM, KPLOAD, PRINT, and SCREEN

Page 115

Statement Reference

BEEP Statement Name: Beep

Type: I/O Statement

Description Sounds the beeper.

Syntax BEEP[onduration[,offduration[,repetitioncount[,frequency]]]] where: onduration, offduration , and repetitioncount = Numeric expressions, each of which returns a value from 0 to 255. frequency = A numeric expression which returns a value from 0 to

32,767.

Notes BEEP sounds the beeper to the following specifications: ! ! ! ! !

at the pitch of the sound in Hz specified by frequency during the length of time specified by onduration at the intervals of the length of time specified by offduration by the number of repetitions specified by repetitioncount. Defaults: onduration and offduration:

1 (100 msec.)

repetitioncount:

1 frequency:

4337 Hz* (*Same as when 2 is set to frequency)

10-5

Page 116

PDT 1100 Terminal Programmer’s Guide

!

Setting frequency to 0, 1, or 2 produces the special beeper effects listed below. Table 10-1. Beep Settings frequency Setting

! ! !

!

!

PDT 1100

Tone

Statement example

0

1033 Hz

Low-pitched

BEEP ,,,0

1

2168 Hz

Medium-pitched

BEEP ,,,1

2

4337 Hz

High-pitched

BEEP ,,,2

If frequency is set to 0, 1, or 2 (or if it is omitted), adjust the beeper volume on the LCD when powering on the PDT 1100. (For the adjustment procedure, refer to the PDT 1100 Terminal Product Reference Guide for details.) If you set a value other than 0, 1, and 2, the beeper volume is set to the maximum and is not adjustable. Specifying a value of 3 through 61 to frequency deactivates the beeper. Setting onduration to 0 deactivates the beeper. Setting onduration to a value other than 0 and offduration to 0 causes the PDT 1100 to beep continuously. Setting onduration to a value other than 0 and offduration to a value other than 0 and repetitioncount to 0 deactivates the beeper. The following table specifies the relationship between frequencies and the musical scale. Table 10-2. Relationship of Frequency to Musical Scale

10-6

Scale 1

Scale 2

Scale 3

Scale 4

Scale 5

Scale 6 do

130 Hz

261 Hz

523 Hz

1046 Hz 2093 Hz 4186 Hz do#

138

277

554

1108

2217 re

146

293

587

1174

2349 re#

155

311

622

1244

2489 mi

164

329

659

1318

2637 fa

174

349

698

1396

2793 fa#

184

369

739

1479

2959

Page 117

Statement Reference

Table 10-2. Relationship of Frequency to Musical Scale (Continued)

!

!

Scale 1

Scale 2

Scale 3

Scale 4

Scale 5 sol

195

391

783

1567

3135 sol#

207

415

830

1661

3322 la

220

440

880

1760

3520 la#

233

466

932

1864

3729 si

246

493

987

1975

3951

Scale 6

The subsequent instruction proceeds immediately after the BEEP instruction, even if the beeper is still sounding. If a second BEEP instruction occurs while the beeper is still sounding, the first BEEP is cancelled and the second BEEP instruction executes.

Syntax Error Error Code and Message

Meaning error 71: Syntax error

The number of parameters or commas (,) exceeds the limit.

Execution Error Error Code

Meaning

05h

Parameter out of range.

10-7

Page 118

PDT 1100 Terminal Programmer’s Guide

Example BEEP bon%,boff%,count%,helz% BEEP bon%,boff%,count% BEEP bon%,boff%,,helz% BEEP bon%,,count%,helz% BEEP ,boff%,count%,helz% BEEP bon%,boff% BEEP bon%,,count% BEEP ,boff%,count% BEEP bon%,,,helz% BEEP ,boff%,,helz% BEEP ,,count%,helz% BEEP bon% BEEP ,boff% BEEP ,,count% BEEP ,,,helz% BEEP

10-8

Page 119

Statement Reference

CALL Statement Name: Call

Type: Flow Control Statement

Description Calls an FN3 function.

Syntax Syntax 1 CALL “filename” functionnumber [data [,data]...]

Syntax 2 CALL “drivename: filename” functionnumber [data [,data]...] where: “filename” and “drivename:filename” = A string expression. functionnumber = An integer constant. data = A string variable or a numeric variable.

Notes CALL calls a function specified by functionnumber from a file specified by “filename” and assigns the parameter specified by data to the called function. !

! !

!

“filename” is the name of a FN3 function. (For FN3 functions, refer to the BASIC 3.0 Extension Library Manual). The extension of the file name is.FN3. functionnumber is the function number of an FN3 specified by “filename”. data is a variable for the function number of the FN3 (that is, it is used as an argument to the FN3 function). When specifying an array to data, add a pair of parentheses containing nothing as shown below. CALL “_xxx.FN3” 1 DATA ()

10-9

Page 120

PDT 1100 Terminal Programmer’s Guide

!

drivename should precede filename. drivename is A: or B: for the RAM or flash ROM, respectively. If drivename is omitted, the default drive A: applies.

Note: To use the CALL statement, download the extension programs from the BASIC 3.0 Extension Library sold separately. (The BASIC 3.0 Extension Library is supported by the PDT 1100.)

Syntax Error Error Code and Message Meaning error 3: “” missing error 71: Syntax error

No double quote precedes or follows filename or drivename:filename. filename or drivename:filename is not enclosed in double quotes.

Execution Error Error Code

Meaning

02h

Syntax error (“filename” or “drivename:filename” is incorrect syntax or the extension is not .FN3.)

1Fh functionnumber out of the range.

35h

File not found.

10-10