Denso BHT-200QW Especificações

Consulte online ou descarregue Especificações para Leitores de códigos de barras Denso BHT-200QW. Denso BHT-200QW Specifications Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 587
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 0
Vista de página 0
1 2 3 4 5 6 ... 586 587

Resumo do Conteúdo

Página 2

2 1.1 Software Overview 1.1.1 Software Structure of the BHT The structure of software for the BHT is shown below. The

Página 3 - Preface

92 7.1.3 Dot Patterns of Fonts Character fontsCharacter fontsCharacter fontsCharacter fonts In the figures below, " " shows a displ

Página 4 - How this book is organized

Chapter 7. I/O Facilities 93 Two-byte Kanji Mode • Standard-size font Half-width Kanji 8 x 16 dots (Regular)Half-width Kanji 16 x 16 dots (Double-widt

Página 5

94 Cursor shapeCursor shapeCursor shapeCursor shape The LOCATE statement specifies the cursor shape--Underline cursor, full block cursor, or

Página 6

Chapter 7. I/O Facilities 95 Two-byte Kanji Mode • Standard-size font ( 8 x 16 dots) In regular size Underline cursor Full block cursor Invi

Página 7

96 7.1.4 Mixed Display of Different Screen Modes, Font Sizes, and/or Character Enlargement Sizes [1] ANK Mode and Kanji Mode Together in One Line A

Página 8

Chapter 7. I/O Facilities 97 [3] Regular-Size and Double-Width Characters Together on the Same Screen The regular-size and double-width characters ma

Página 9 - Chapter 1

98 7.1.5 Displaying User-defined Characters Loading a userLoading a userLoading a userLoading a user----defined fontdefined fontdefined fontdefi

Página 10 - 1.1 Software Overview

Chapter 7. I/O Facilities 99 7.1.6 VRAM The INP function may read the VRAM data. The OUT statement writes data into the VRAM so that graphics may be d

Página 11

100 Setting an 8Setting an 8Setting an 8Setting an 8----bit binary patternbit binary patternbit binary patternbit binary pattern The data of a

Página 12 - 1.1.2 Overview of BHT-BASIC

Chapter 7. I/O Facilities 101 7.1.7 Displaying the System The BHT-8000 may display the shifted key icon and alphabet input icon at the right end of t

Página 13 - 1.2 BHT-BASIC

Chapter 1. Software Overview for the BHT 3 □□□□System Programs DriversDriversDriversDrivers A set of programs which is called by the BHT-BASIC Inte

Página 14 - BHT-BASIC 3.0?

102 Notes when displaying the system statusNotes when displaying the system statusNotes when displaying the system statusNotes when displaying the sy

Página 15

Chapter 7. I/O Facilities 103 7.1.8 Other Facilities for the LCD Setting national characterSetting national characterSetting national characterSe

Página 16 - Execution

104 7.2 Input from the Keyboard 7.2.1 Alphabet Entry In addition to the numeric entry from the keypad, the BHT-8000 supports software keyboard entry

Página 17 - Chapter 2

Chapter 7. I/O Facilities 105 Alphabet Entry ProcedureAlphabet Entry ProcedureAlphabet Entry ProcedureAlphabet Entry Procedure (1) Switch to t

Página 18

106 When no key is ready to be established, pressing any of the function keys, BS, C, ENT, and magic keys will return the key data of the pressed key

Página 19 - Environment

Chapter 7. I/O Facilities 107 7.3 Timer and Beeper 7.3.1 Timer Functions The timer functions (TIMEA, TIMEB, and TIMEC) are available in BHT-BASIC fo

Página 20 - 2.1.2 Required Software

108 7.4 Controlling and Monitoring the I/Os 7.4.1 Controlling by the OUT Statement The OUT statement can control the input and output devices (I/Os

Página 21 - Procedures

Chapter 7. I/O Facilities 109 7.4.3 Monitoring by the WAIT Statement The WAIT statement monitors the input and output devices (I/Os) listed in Append

Página 22

110 Chapter 8 Files CONTENTSCONTENTSCONTENTSCONTENTS 8.1 File Overview...

Página 23

Chapter 8. Files 111 8.1 File Overview 8.1.1 Data Files and Device I/O Files BHT-BASIC treats not only data files but also bar code device I/Os and c

Página 24

4 1.1.2 Overview of BHT-BASIC With BHT-BASIC, you can customize application programs for meeting your specific needs as given below. - Retrieving

Página 25

112 8.2 Data Files 8.2.1 Overview Like user programs, data files will be stored in the user area of the memory. The user area is located at drives A

Página 26 - Production Procedure

Chapter 8. Files 113 8.2.3 Structure of Data Files RecRecRecRecordordordord A data file is made up of a maximum of 32767 records. A record is

Página 27 - [ 1 ] Select a source file

114 8.2.4 Data File Management by Directory Information The Interpreter manages data files using the directory information stored in the system area

Página 28 - [ 1 ] Create a new project

Chapter 8. Files 115 8.2.5 Programming for Data Files Input/Output for Numeric DataInput/Output for Numeric DataInput/Output for Numeric DataInpu

Página 29

116 Restrictions on Input/Output of Data FilesRestrictions on Input/Output of Data FilesRestrictions on Input/Output of Data FilesRestrictions on

Página 30

Chapter 8. Files 117 8.2.6 About Drives The BHT-8000 has logical drives. Drive B is provided for ensuring compatibility with other BHT series. If you

Página 31

118 8.3 Bar Code Device 8.3.1 Overview Opening the Bar Code Device by OPENOpening the Bar Code Device by OPENOpening the Bar Code Device by OPEN

Página 32

Chapter 8. Files 119 Specifying Options in the OPENSpecifying Options in the OPENSpecifying Options in the OPENSpecifying Options in the OPEN &quo

Página 33 - in the toolbar

120 8.3.2 Programming for Bar Code Device Code MarkCode MarkCode MarkCode Mark The MARK$ function allows you to check the code mark (denotin

Página 34 - [ 3 ] Building

Chapter 8. Files 121 Controlling the Indicator LED and Beeper (Vibrator) for of SuccessfulControlling the Indicator LED and Beeper (Vibrator) for

Página 35

Chapter 1. Software Overview for the BHT 5 1.2 BHT-BASIC 1.2.1 Features BHT-BASIC is designed as an optimal programming language in making applicatio

Página 36 - Main Window

122 8.4 Communications Device 8.4.1 Overview The available communications interface in BHT is as follows. • IrDA interface • Direct-connect interface

Página 37

Chapter 8. Files 123 8.4.3 Programming for Data Communications Setting the Communications ParametersSetting the Communications ParametersSetting the

Página 38 - 2.4.7 Options

124 8.4.4 Overview of Communications Protocols The BHT supports two communications protocols—BHT-protocol and BHT-Ir protocol for file transmission.

Página 39 - [ 2 ] Linking options

Chapter 8. Files 125 [ 2 ] BHT-Ir protocol In addition to the BHT-protocol, the BHT supports the BHT-Ir protocol. If you select the BHT-Ir protocol b

Página 40 - [ 4 ] Outputting list files

126 8.4.5 File Transfer Tools [ 1 ] Transfer Utility Transfer Utility is optionally available in two versions: MS-DOS–based and Windows-based. It s

Página 41

127 Chapter 9 Event Polling and Error/Event Trapping CONTENTSCONTENTSCONTENTSCONTENTS 9.1 Overview...

Página 42

128 9.1 Overview BHT-BASIC supports event polling and two types of trapping: error trapping and event trap-ping. – Event polling – Trapping Error t

Página 43 - [ 5 ] Outputting a mapfile

Chapter 9. Event Polling and Error/Event Trapping 129 9.2 Event Polling [ 1 ] Programming sample The program below shows the event polling example wh

Página 44

130 [ 2 ] I/O devices capable of being monitored by the event polling Listed below are the I/O devices which the event polling can monitor. I/O Dev

Página 45 - Command Line

Chapter 9. Event Polling and Error/Event Trapping 131 9.3 Error Trapping [ 1 ] Overview If a run-time error occurs during program running, error trap

Página 46 - [ 2 ] Options

6 1.2.2 What’s New in BHT-BASIC 3.5 Upgraded from BHT-BASIC 3.0? Based on BHT-BASIC 3.0, BHT-BASIC 3.5 newly supports the following functions: [ 1

Página 47 - Description

132 [ 2 ] Programming for trapping errors To trap errors, use the ON ERROR GOTO statement in which you should designate the error-handling routine

Página 48

Chapter 9. Event Polling and Error/Event Trapping 133 9.4 Event (of Keystroke) Trapping [ 1 ] Overview If any of the function keys previously specif

Página 49

134 If function keys specified for keystroke trapping are pressed during execution of the following statements or functions relating keyboard input,

Página 50

135 Chapter 10 Sleep Function CONTENTSCONTENTSCONTENTSCONTENTS 10.1 Sleep Function ...

Página 51

136 10.1 Sleep Function The BHT supports the sleep function that automatically interrupts program execution if no event takes place within the specif

Página 52 - 2.5 Downloading

137 Chapter 11 Resume Function CONTENTSCONTENTSCONTENTSCONTENTS 11.1 Resume Function ...

Página 53 - 2.6.3 Termination

138 11.1 Resume Function The resume function automatically preserves the current status of a running application pro-gram (user program) when the BHT

Página 54 - Chapter 3

139 Chapter 12 Power-related Functions CONTENTSCONTENTSCONTENTSCONTENTS 12.1 Low Battery Warning...

Página 55 - 3.1 Program Overview

140 12.1 Low Battery Warning If the output voltage of the battery cartridge drops below a specified lower level limit when the BHT is in operation, t

Página 56

Chapter 12. Power-related Functions 141 12.3 Wakeup Function The wakeup function allows you to turn the BHT on at the wakeup time (of the system clock

Página 57 - Jump into Jump out

Chapter 1. Software Overview for the BHT 7 Defining and declaring userDefining and declaring userDefining and declaring userDefining and declaring

Página 58 - 3.2 Handling User Programs

142 12.4 Remote Wakeup Function [1] Outline The remote wakeup function allows you to wake up the BHT from a remote location so as to run the specifie

Página 59 - 3.2.3 Included Files

Chapter 12. Power-related Functions 143 [2] Remote wakeup operation About BHT internal operation enabling remote wakeupAbout BHT internal operati

Página 60 - Chapter 4

144 If the host receives no response from the BHT for 30 ms, go back to step (1). (3) Perform steps (1) and (2) repeatedly for 60 seconds or more. I

Página 61 - [ 1 ] Labels

Chapter 12. Power-related Functions 145 (4) The BHT will exit from the off state and execute t

Página 62 - [ 3 ] Comments

146 [3] Remote wakeup program File nameFile nameFile nameFile name The BHT may handle the file named "BHTRMT.PD3" as a remote wakeu

Página 63 - 4.1.2 Program Line Length

Chapter 12. Power-related Functions 147 (4) Set the BHT station ID to be used in the BHT response message Set a 6-byte numeric string referring to th

Página 64 - 4.2 Usable Characters

148 Checking the execution recordChecking the execution recordChecking the execution recordChecking the execution record of remote wakeup of remo

Página 65

149 Chapter 13 Backlight Function CONTENTSCONTENTSCONTENTSCONTENTS 13.1 Backlight Function...

Página 66

150 13.1 Backlight Function The BHT has a backlight function (LCD backlight and key backlight). Pressing the M1 key while holding down the Shift key

Página 67 - 4.3 Labels

Chapter 13. Backlight Function 151 Setting 0 to port 6020h deactivates the backlight function and turns off the backlight if lit. When the backlight f

Página 68 - 4.4 Identifiers

8 1.3 Program Development and Execution BHT-BASIC consists of Compiler and Interpreter. 1.3.1 Compiler BHT-BASIC 3.5 Compiler consists of the follo

Página 69 - 4.5 Reserved Words

152 Chapter 14 Statement Reference CONTENTSCONTENTSCONTENTSCONTENTS APLOAD...153 BEEP...

Página 70 - Chapter 5

Chapter 14. Statement Reference 153 ____________________________________________________________________ ANK Pattern LOAD I/O statement APLOAD Loa

Página 71 - 5.1 Constants

154 • If you issue more than one APLOAD statement specifying a same character code, the last statement takes effect. • Only when the Interpreter ex

Página 72

Chapter 14. Statement Reference 155 • The cursor size will be as shown below. Display font Size (W×H) No. of elements Standard-size 6×8 dots LSB

Página 73 - 5.2 Variables

156 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error • No fontarrayname or cursor

Página 74 - [ 2 ] Numeric Variables

Chapter 14. Statement Reference 157 ____________________________________________________________________ I/O statement BEEP Drives the beeper or vibr

Página 75

158 You may change the beeper volume with the OUT statement. (For details, refer to Appendix D, "I/O Ports.") If you set a value other than

Página 76 - 5.3 User-defined Functions

Chapter 14. Statement Reference 159 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error T

Página 77 - 5.4 Type Conversion

160 ____________________________________________________________________ Flow control statement CALL Calls an FN3 or SUB function. _________________

Página 78

Chapter 14. Statement Reference 161 • filename is the name of an FN3 function. The extension of the file names is fixed to .FN3. (For the FN3 functio

Página 79 - 5.5 Scope of Variables

9 Chapter 2 Development Environment and Procedures CONTENTSCONTENTSCONTENTSCONTENTS 2.1 Overview of Development Environment...

Página 80

162 Calling a userCalling a userCalling a userCalling a user----defined functiondefined functiondefined functiondefined function (SUB function) (

Página 81 - 5.5.2 Local Variables

Chapter 14. Statement Reference 163 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 02h Syntax error ("[dri

Página 82

164 ____________________________________________________________________ Flow control statement CHAIN Transfers control to another program. ________

Página 83 - 5.5.4 Common Variables

Chapter 14. Statement Reference 165 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 3: ’"’ missin

Página 84 - Chapter 6

166 ____________________________________________________________________ CLear FILE File I/O statement CLFILE Erases the data stored in a data file

Página 85 - 6.1 Overview

Chapter 14. Statement Reference 167 Example:Example:Example:Example: OPEN "master.Dat"AS #1 FIELD #1,20 AS bar$,10 AS ky$ CLFILE #1 CLOSE #1

Página 86 - 6.2 Operator Precedence

168 ____________________________________________________________________ File I/O statement CLOSE Closes file(s). __________________________________

Página 87 - 6.3 Operators

Chapter 14. Statement Reference 169 ____________________________________________________________________ CLear Screen I/O statement CLS Clears the L

Página 88 - 6.3.2 Relational Operators

170 ____________________________________________________________________ Declarative statement COMMON Declares common variables for sharing between

Página 89 - 6.3.3 Logical Operators

Chapter 14. Statement Reference 171 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 5: Variable name r

Página 90 - [ 4 ] The XOR operator

10 2.4.7 Options...30 [ 1 ] Compiling options

Página 91 - 6.3.5 String Operators

172 ____________________________________________________________________ Declarative statement CONST Defines symbolic constants to be replaced with

Página 92

Chapter 14. Statement Reference 173 ____________________________________________________________________ I/O statement CURSOR Turns the cursor on or

Página 93 - Chapter 7

174 ____________________________________________________________________ Declarative statement DATA Stores numeric and string literals for READ stat

Página 94 - 7.1.1 Display Fonts

Chapter 14. Statement Reference 175 ____________________________________________________________________ User-defined function declarative statement

Página 95

176 Description:Description:Description:Description: DECLARE defines a user-defined function defined in other source program files. • Declaration of

Página 96

Chapter 14. Statement Reference 177 ____________________________________________________________________ DEFine FuNction User-defined function defin

Página 97

178 Description:Description:Description:Description: Creating a user-defined function DEF FN creates a user-defined function. • Definition of a use

Página 98

Chapter 14. Statement Reference 179 Syntax errors:Syntax errors:Syntax errors:Syntax errors: When defining a user-defined function Error code and me

Página 99

180 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 07h Insufficient memory space (You nested DEF FN statements

Página 100 - 7.1.3 Dot Patterns of Fonts

Chapter 14. Statement Reference 181 ____________________________________________________________________ DEFine FuNction...END DEFine User-defined f

Página 101

Chapter 2. Development Environment and Procedures 11 2.1 Overview of Development Environment The following hardware and software are required for de

Página 102

182 Description:Description:Description:Description: Creating a user-defined function DEF FN ..END DEF creates a user-defined function. The function

Página 103

Chapter 14. Statement Reference 183 Calling a user-defined function FNfunctionname calls a user-defined function. • The number of realparameters sho

Página 104

184 When calling a user-defined function Error code and message Meaning error 68: Mismatch argument typeor number • The number of the real parame

Página 105 - Same Screen

Chapter 14. Statement Reference 185 ____________________________________________________________________ DEFine REGister Declarative statement DEFRE

Página 106

186 numericinitialvaluedefinition For one-dimensional: {numericconstant[,numericconstant...]} DEFREG n6%(3)={9,8,7,6} For two-dimensional: {{numericc

Página 107 - 7.1.6 VRAM

Chapter 14. Statement Reference 187 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 6: Variable name

Página 108

188 Example:Example:Example:Example: Example 1: Valid DEFREG statements DEFREG a,e$ DEFREG b=100,c(10),d$(2,4)[ 10] DEFREG bps$="19200" DEF

Página 109 - 7.1.7 Displaying the System

Chapter 14. Statement Reference 189 ____________________________________________________________________ DIMension Memory control statement DIM Decla

Página 110

190 • In declaring an array string variable, you can specify the string length. If its specification is omitted, the default value of 20 characters

Página 111

Chapter 14. Statement Reference 191 ____________________________________________________________________ Flow control statement END Terminates progra

Página 112 - 7.2 Input from the Keyboard

Copyright © 2003 DENSO WAVE INCORPORATED All rights reserved. No part of this publication may be reproduced i

Página 113

12 2.1.2 Required Software • OS • Editor Windows95/98/NT/2000/XP • BHT-BASIC 3.5 Compiler • Transfer Utility (option) • Ir-Transfer Utility C

Página 114 - [ 2 ] Shift key

192 ____________________________________________________________________ Memory control statement ERASE Erases array variables. ____________________

Página 115 - 7.3 Timer and Beeper

Chapter 14. Statement Reference 193 ____________________________________________________________________ File I/O statement FIELD Allocates string va

Página 116

194 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error filenumber is missing. RunRunRun

Página 117

Chapter 14. Statement Reference 195 ____________________________________________________________________ Flow control statement FOR…NEXT Defines a lo

Página 118 - Chapter 8

196 • The default value of increment is 1. • You can nest FOR ..NEXT statements to a maximum of 10 levels. • When using the FOR ..NEXT statement t

Página 119 - 8.1 File Overview

Chapter 14. Statement Reference 197 ____________________________________________________________________ User-defined function statement FUNCTION…END

Página 120 - 8.2 Data Files

198 Description:Description:Description:Description: Creating a user-defined function FUNCTION...END FUNCTION creates a user-defined function. The f

Página 121

Chapter 14. Statement Reference 199 • If you specify a global variable in realparameter when calling a user-defined function, the user-defined functi

Página 122 - Information

200 When calling a user-defined function Error code and message Meaning error 68: Mismatch argument type or number • The number of the real para

Página 123

Chapter 14. Statement Reference 201 ____________________________________________________________________ File I/O statement GET Read a record from a

Página 124

Chapter 2. Development Environment and Procedures 13 2.2 Overview of Developing Procedures 2.2.1 Developing Procedures The program developing procedu

Página 125 - 8.2.6 About Drives

202 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error filenumber is missing. RunRunRu

Página 126 - 8.3 Bar Code Device

Chapter 14. Statement Reference 203 ____________________________________________________________________ Declarative statement GLOBAL Declares one or

Página 127

204 subscript For one-dimensional: integerconstant For two-dimensional: integerconstant,integerconstant Where integerconstant is a numeric

Página 128

Chapter 14. Statement Reference 205 ____________________________________________________________________ Flow control statement GOSUB Branches to a s

Página 129

206 ____________________________________________________________________ Flow control statement GOTO Branches to a specified label. ________________

Página 130 - 8.4 Communications Device

Chapter 14. Statement Reference 207 ____________________________________________________________________ Flow control statement IF…THEN…ELSE…END IF C

Página 131

208 • A block-structured IF statement block has the following advantages over a single-line IF statement (which is not supported in BHT-BASIC): - Mo

Página 132 - [ 1 ] BHT-protocol

Chapter 14. Statement Reference 209 ____________________________________________________________________ I/O statement INPUT Reads input from the key

Página 133 - [ 2 ] BHT-Ir protocol

210 • The cursor shape specified by the most recently executed LOCATE statement takes effect. • Even after execution of the CURSOR OFF statement, th

Página 134 - 8.4.5 File Transfer Tools

Chapter 14. Statement Reference 211 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 06h The operation result is

Página 135 - Chapter 9

14 2.2.2 Functions of BHT-BASIC 3.5 BHT-BASIC 3.5 contains Compiler, Linker, and Librarian whose functions are listed below. Functions of Compiler

Página 136 - 9.1 Overview

212 ____________________________________________________________________ File I/O statement INPUT # Reads data from a device I/O file into specified

Página 137 - 9.2 Event Polling

Chapter 14. Statement Reference 213 • Notes for entering numeric data: Valid characters include 0 to 9, a minus sign (-), and a period (.). They shou

Página 138

214 ____________________________________________________________________ I/O statement KEY Assigns a string or a control code to a function key; als

Página 139 - 9.3 Error Trapping

Chapter 14. Statement Reference 215 Description:Description:Description:Description: Assigning a string or a control code to a function key KEY in sy

Página 140

216 • Pressing the M1 key (key number 30) while holding down the shift key functions as a backlight on/off control key by default. • If pressed tog

Página 141 - [ 1 ] Overview

Chapter 14. Statement Reference 217 NOTE If you issue KEY statements specifying a same function key, only the lastKEY statement takes effect. The

Página 142

218 ____________________________________________________________________ I/O statement KEY ON and KEY OFF Enables or disables keystroke trapping for

Página 143 - Chapter 10

Chapter 14. Statement Reference 219 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error •

Página 144 - 10.1 Sleep Function

220 ____________________________________________________________________ File I/O statement KILL Deletes a specified file from the memory. _________

Página 145 - Chapter 11

Chapter 14. Statement Reference 221 Example:Example:Example:Example: CLOSE IF kyIn$="Y"THEN KILL "Master.Dat" END IF Reference:Re

Página 146 - 11.1 Resume Function

Chapter 2. Development Environment and Procedures 15 2.3 Writing a Source Program 2.3.1 Writing a Source Program by an Editor To write a source prog

Página 147 - Chapter 12

222 ____________________________________________________________________ Kanji Pattern LOAD I/O statement KPLOAD Loads a user-defined Kanji font in

Página 148 - Backlight

Chapter 14. Statement Reference 223 • The loaded user-defined fonts are effective during execution of the user program which loaded those fonts and d

Página 149 - 12.3 Wakeup Function

224 • An array integer variable--a work array, register array, or common array--for cursorarrayname should be declared by the DIM, DEFREG, or COMM

Página 150 - 12.4 Remote Wakeup Function

Chapter 14. Statement Reference 225 • If the double-width is specified, then user-defined cursors loaded by the KPLOAD will display in double-width,

Página 151 - [2] Remote wakeup operation

226 Example:Example:Example:Example: DIM kp%(15) kp%(0)=&H0000 kp%(1)=&H8011 kp%(2)=&H6022 kp%(3)=&H1844 kp%(4)=&H0600 kp%(5)=&am

Página 152

Chapter 14. Statement Reference 227 ____________________________________________________________________ Assignment statement LET Assigns a value to

Página 153

228 ____________________________________________________________________ LINE INPUT LINE INPUT Reads input from the keyboard into a string variable.

Página 154 - [3] Remote wakeup program

Chapter 14. Statement Reference 229 If "prompt" is followed by a comma, the statement displays the prompting message but no question mark or

Página 155

230 ____________________________________________________________________ File I/O statement LINE INPUT # Reads data from a device I/O file into a st

Página 156

Chapter 14. Statement Reference 231 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error •

Página 157 - Chapter 13

16 • Comment lines starting with a single quotation mark (') and those with a REM should have the following description rules each. A single qu

Página 158 - 13.1 Backlight Function

232 ____________________________________________________________________ I/O statement LOCATE Moves the cursor to a specified position and changes t

Página 159

Chapter 14. Statement Reference 233 • The entry ranges of the column and row are the same in the regular-size, double-width. • Any parameter value o

Página 160 - Chapter 14

234 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the range Example:Example:Example:Exam

Página 161

Chapter 14. Statement Reference 235 ____________________________________________________________________ Error control statement ON ERROR GOTO Enable

Página 162

236 ____________________________________________________________________ Flow control statement ON…GOSUB, ON…GOTO Branches to one of specified label

Página 163

Chapter 14. Statement Reference 237 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error •

Página 164

238 ____________________________________________________________________ I/O statement ON KEY…GOSUB Specifies an event-handling routine for keystrok

Página 165

Chapter 14. Statement Reference 239 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error •

Página 166

240 ____________________________________________________________________ File I/O statement OPEN Opens a data file for I/O activities. _____________

Página 167

Chapter 14. Statement Reference 241 • filelength is the maximum number of registrable records in a file. It can be set only when a new data file is c

Página 168

Chapter 2. Development Environment and Procedures 17 2.4 Producing a User Program 2.4.1 Starting the BHT-BASIC 3.5 Compiler Start the Compiler, e.g.

Página 169

242 ____________________________________________________________________ File I/O statement OPEN "BAR: " Opens the bar code device file. T

Página 170

Chapter 14. Statement Reference 243 • Only a single bar code device file can be opened at a time. The total number of files which can be opened at a

Página 171

244 □□□□Auto-off mode (F) OPEN "BAR :F"AS #7 CODE "A" If you press the trigger switch *1 , the illumination LED *2 comes on. When

Página 172

Chapter 14. Statement Reference 245 • If readmode is omitted, the BHT defaults to the auto-off mode. • In the momentary switching mode, alternate swit

Página 173

246 readcode The BHT supports seven types of bar codes--the universal product codes, Interleaved 2 of 5 (ITF), Standard 2 of 5 (STF), Codabar

Página 174

Chapter 14. Statement Reference 247 □□□□Interleaved 2 of 5 (ITF) (I) Syntax : I[:[mini.no.digits[-max.no.digits]][CD] [,[mini.no.digits[-max.no.dig

Página 175

248 CD is a check digit. Specifying a C to CD makes the Interpreter check bar codes with MOD-16. The check digit is included in the number of digits.

Página 176

Chapter 14. Statement Reference 249 □□□□Code 128 ((((K)))) Syntax : K[:[mini.no.digits[-max.no.digits]] [,[mini.no.digits[-max.no.digits]]] [,[mini.n

Página 177

250 (4) FNC4 An FNC4 converts data encoded by the code set A or B into a set of extended ASCII-encoded data (128 added to each official ASCII code va

Página 178

Chapter 14. Statement Reference 251 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error T

Página 179

18 2.4.2 Outline of User Program or Library Production Procedure Unlike the BHT-BASIC 3.0 Compiler that converts a single source program into a user

Página 180

252 ____________________________________________________________________ File I/O statement OPEN "COM: " Opens a communications device fil

Página 181

Chapter 14. Statement Reference 253 Description:Description:Description:Description: OPEN "COM:" opens a communications device file and asso

Página 182

254 charalength charalength is a character length or the number of data bits. It should be 8(default) or 7 bits. stopbit stopbit is th

Página 183 - DECLARE

Chapter 14. Statement Reference 255 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error f

Página 184

256 ____________________________________________________________________ I/O statement OUT Sends a data byte to an output port. ____________________

Página 185

Chapter 14. Statement Reference 257 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the ran

Página 186

258 ____________________________________________________________________ I/O statement POWER Controls the automatic power-off facility. ____________

Página 187

Chapter 14. Statement Reference 259 Turning off the power immediately Execution of POWER OFF or POWER 0 immediately turns off the power. • The execut

Página 188

260 ____________________________________________________________________ I/O statement PRINT Displays data on the LCD screen. ______________________

Página 189 - DEF FN…END DEF

Chapter 14. Statement Reference 261 CR/LFcontrol CR/LFcontrol determines where the cursor is to be positioned after the PRINT statement executes. • I

Página 190

Chapter 2. Development Environment and Procedures 19 2.4.3 Designating a Single Source File or a Project File 2.4.3.1 Designating a single source fi

Página 191

262 ____________________________________________________________________ File I/O statement PRINT # Outputs data to a communications device file. __

Página 192

Chapter 14. Statement Reference 263 • If CR/LFcontrol is a semicolon (;), the PRINT # statement outputs data without adding spaces or control codes. S

Página 193

264 ____________________________________________________________________ I/O statement PRINT USING Displays data on the LCD screen under formatting

Página 194

Chapter 14. Statement Reference 265 numericformat numericformat is a formatting string consisting of #, decimal point (.), and/or +,each of which cau

Página 195

266 stringformat stringformat is a formatting string consisting of !, @, and/or &&, each of which causes a special printing effect as descri

Página 196

Chapter 14. Statement Reference 267 CR/LFcontrol CR/LFcontrol determines where the cursor is to be positioned after the PRINT USING statement execute

Página 197

268 ____________________________________________________________________ Declarative statement PRIVATE Declares one or more work variables or regist

Página 198

Chapter 14. Statement Reference 269 subscript For one-dimensional: integerconstant For two-dimensional: integerconstant,integerconstant Wher

Página 199

270 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the range 07h Insufficient memory spac

Página 200

Chapter 14. Statement Reference 271 ____________________________________________________________________ File I/O statement PUT Writes a record from

Página 201

20 2.4.3.2 Designating a project file To build a library out of a single source file or to build a user program or library out of multiple source fi

Página 202

272 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error filenumber is missing. RunRunRu

Página 203 - FOR…NEXT

Chapter 14. Statement Reference 273 ____________________________________________________________________ I/O statement READ Reads data defined by DAT

Página 204

274 If the string data is invalid as numeric data, the READ statement assigns the value 0 to the numeric variable. Statement example:

Página 205 - FUNCTION…END FUNCTION

Chapter 14. Statement Reference 275 ____________________________________________________________________ Declarative statement REM Declares the rest

Página 206

276 ____________________________________________________________________ I/O statement RESTORE Specifies a DATA statement location where the READ st

Página 207

Chapter 14. Statement Reference 277 ____________________________________________________________________ Error control statement RESUME Causes progra

Página 208

278 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 14h RESUME without error (RESUME statement occurs outside o

Página 209

Chapter 14. Statement Reference 279 ____________________________________________________________________ Flow control statement RETURN Returns contro

Página 210

280 ____________________________________________________________________ I/O statement SCREEN Sets the display mode (screen mode, and font size) and

Página 211

Chapter 14. Statement Reference 281 • At the start of program execution, the following settings apply: Screen mode ANK mode Font size Standard-siz

Página 212

Chapter 2. Development Environment and Procedures 21 [ 2 ] Select an existing project file You may select an existing project file in the Select Proj

Página 213

282 ____________________________________________________________________ Flow control statement SELECT…CASE…END SELECT Conditionally executes one of

Página 214

Chapter 14. Statement Reference 283 • You can nest the SELECT…CASE…END SELECT statements to a maximum of 10 levels. SELECT a CASE 1 SELECT b CASE 3 P

Página 215 - IF…THEN…ELSE…END IF

284 ____________________________________________________________________ User-defined function statement SUB…END SUB Names and defines user-defined

Página 216

Chapter 14. Statement Reference 285 Description:Description:Description:Description: Creating a user-defined function SUB...END SUB creates a user-de

Página 217

286 Syntax errors:Syntax errors:Syntax errors:Syntax errors: When defining a user function Error code and message Meaning error 64: Function redefi

Página 218

Chapter 14. Statement Reference 287 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 07h Insufficient memory s

Página 219

288 ____________________________________________________________________ I/O statement WAIT Pauses program execution until a designated input port p

Página 220 - INPUT #

Chapter 14. Statement Reference 289 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 71: Syntax error •

Página 221

290 ____________________________________________________________________ Flow control statement WHILE…WEND Continues to execute a statement block as

Página 222

Chapter 14. Statement Reference 291 Syntax errors:Syntax errors:Syntax errors:Syntax errors: Error code and message Meaning error 26 : Too deep nest

Página 223

i Preface This manual describes the syntax and development procedure of BHT-BASIC 3.5 which is a programming language for developing application pr

Página 224

22 [ 3 ] Add files to a project file You may add one or more source files and libraries to a project file at a time. (1) Create a new project (Refe

Página 225

292 ____________________________________________________________________ I/O statement XFILE Transmits a designated file according to the specified

Página 226 - KEY ON and KEY OFF

Chapter 14. Statement Reference 293 - Transmission direction Parameter omitted (default) Transmits a file from the BHT. R or r Receives a file from t

Página 227

294 - Timeout length when a link will be established Specify the timeout length by 1 to 9. Uploading Set value DownloadingBHT-protocol BHT-Ir protoco

Página 228

Chapter 14. Statement Reference 295 • A communications device file should be opened before execution of the XFILE statement. (For the file opening,

Página 229

296 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 02h Syntax error ([drivename:]filename is not correct.) 07h

Página 230

Chapter 14. Statement Reference 297 ____________________________________________________________________ File I/O statement $INCLUDE Specifies an inc

Página 231

298 Fatal Error:Fatal Error:Fatal Error:Fatal Error: Error code and message Meaning fatal error 30: Cannot find include file "XXX" No inc

Página 232

Chapter 14. Statement Reference 299 Additional Explanation for Statements Effective range of labels Labels are effective only in a file. Definition

Página 233

300 Chapter 15 Function Reference CONTENTSCONTENTSCONTENTSCONTENTS ABS ...301 ASC ...

Página 234

Chapter 15. Function Reference 301 ____________________________________________________________________ ABSolute Numeric function ABS Returns the abs

Página 235

Chapter 2. Development Environment and Procedures 23 [ 4 ] Select files in the active project From files existing in the active project, you may selec

Página 236 - LINE INPUT

302 ____________________________________________________________________ ASCii code String function ASC Returns the ASCII code value of a given cha

Página 237

Chapter 15. Function Reference 303 ____________________________________________________________________ Block Check Character String function BCC$ R

Página 238 - LINE INPUT #

304 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the range (checktype is out of the

Página 239

Chapter 15. Function Reference 305 ____________________________________________________________________ CHecK DiGiT String function CHKDGT$ Returns

Página 240

306 Sample coding 1: CD.Data$=CHKDGT$("a123Qa","N") "Q" is a CD position character, so CHKDGT$ calculates the correct

Página 241

Chapter 15. Function Reference 307 When CDtype is I (ITF), the length of barcodedata must be an even number of two or more digits. If not, CHKDGT$ re

Página 242

308 When CDtype is N (Codabar), the length of barcodedata must be three digits or more including start and stop characters. If not, CHKDGT$ returns

Página 243 - ON ERROR GOTO

Chapter 15. Function Reference 309 ____________________________________________________________________ CHaRacter code String function CHR$ Returns

Página 244 - ON…GOSUB, ON…GOTO

310 • To display a Kanji code, use a shift JIS code as shown below. The shift JIS code for 漢 is 8ABFh. SCREEN 1 PRINT CHR$(&h8A);CHR$(&hBF)

Página 245

Chapter 15. Function Reference 311 ____________________________________________________________________ COUNTRY I/O function COUNTRY$ Sets a national

Página 246 - ON KEY…GOSUB

24 • Main Object display area This area shows the name of a main object in a user program if you have selected "User program (PD3)" with t

Página 247

312 • After setting a national character set, you may display national characters assigned to 32 (20h) to 127 (7Fh), on the LCD. • "countrycode

Página 248

Chapter 15. Function Reference 313 ____________________________________________________________________ CurSoR LINe I/O function CSRLIN Returns the

Página 249

314 ____________________________________________________________________ DATE I/O function DATE$ Returns the current system date or sets a specifie

Página 250 - OPEN "BAR: "

Chapter 15. Function Reference 315 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the r

Página 251

316 ____________________________________________________________________ End Of File File I/O function EOF Tests whether the end of a device I/O fi

Página 252

Chapter 15. Function Reference 317 ____________________________________________________________________ ERror Line Error-handling function ERL Retur

Página 253

318 ____________________________________________________________________ ERRor code Error-handling function ERR Returns the error code of the most

Página 254 - □Universal product codes (A)

Chapter 15. Function Reference 319 ____________________________________________________________________ End of TeXt I/O function ETX$ Modifies the v

Página 255

320 ____________________________________________________________________ FREe area Memory management function FRE Returns the number of bytes avail

Página 256

Chapter 15. Function Reference 321 ____________________________________________________________________ HEXadecimal String function HEX$ Converts a d

Página 257

Chapter 2. Development Environment and Procedures 25 2.4.4 Compiling and Building First specify the options and then proceed to the compiling or buil

Página 258

322 ____________________________________________________________________ INput KEYboard I/O function INKEY$ Returns a character read from the keybo

Página 259

Chapter 15. Function Reference 323 ____________________________________________________________________ INPort data I/O function INP Returns a byte

Página 260 - OPEN "COM: "

324 ____________________________________________________________________ INPUT File I/O function INPUT$ Returns a specified number of characters re

Página 261

Chapter 15. Function Reference 325 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the r

Página 262

326 ____________________________________________________________________ IN STRing String function INSTR Searches a specified target string for a s

Página 263

Chapter 15. Function Reference 327 • A returned value of INSTR is a decimal number from 0 to 255, depending upon the conditions as listed below. Con

Página 264

328 ____________________________________________________________________ INTeger Numeric operation function INT Returns the largest whole number les

Página 265

Chapter 15. Function Reference 329 ____________________________________________________________________ LEFT String function LEFT$ Returns the specif

Página 266

330 ____________________________________________________________________ LENgth String function LEN Returns the length (number of bytes) of a given

Página 267

Chapter 15. Function Reference 331 ____________________________________________________________________ LOcation Counter of file File I/O function L

Página 268

26 [ 2 ] Compiling In any of the following methods, compile the currently selected source file(s) into an object file(s): From the Build menu, choo

Página 269

332 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 34h Bad file name or number (You specified filenumber of

Página 270 - PRINT #

Chapter 15. Function Reference 333 ____________________________________________________________________ Location Of File File I/O function LOF Retur

Página 271

334 ____________________________________________________________________ code MARK I/O function MARK$ Returns the bar code type and the number of d

Página 272 - PRINT USING

Chapter 15. Function Reference 335 ____________________________________________________________________ MIDdle String function MID$ Returns a portion

Página 273

336 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the range Reference:Reference:Refe

Página 274

Chapter 15. Function Reference 337 ____________________________________________________________________ POSition I/O function POS Returns the current

Página 275

338 ____________________________________________________________________ RIGHT String function RIGHT$ Returns the specified number of rightmost char

Página 276 - PRIVATE

Chapter 15. Function Reference 339 ____________________________________________________________________ SEARCH File I/O function SEARCH Searches a

Página 277

340 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 05h Parameter out of the range 34h Bad file name or numb

Página 278

Chapter 15. Function Reference 341 ____________________________________________________________________ Start Of Heading I/O function SOH$ Modifies

Página 279

Chapter 2. Development Environment and Procedures 27 2.4.5 Setting the Editor for Displaying Files Set the editor that you want to use for displaying

Página 280

342 ____________________________________________________________________ STRing String function STR$ Converts the value of a numeric expression into

Página 281

Chapter 15. Function Reference 343 ____________________________________________________________________ Start of TeXt I/O function STX$ Modifies the

Página 282

344 ____________________________________________________________________ TIME I/O function TIME$ Returns the current system time or wakeup time, or

Página 283

Chapter 15. Function Reference 345 Syntax 2 Setting the system time TIME$ sets the system time specified by "time." The format of "tim

Página 284 - RESTORE

346 ____________________________________________________________________ TIMER-A/TIMER-B/TIMER-C I/O function TIMEA/TIMEB/TIMEC Returns the current

Página 285

Chapter 15. Function Reference 347 ____________________________________________________________________ VALue String function VAL Converts a string i

Página 286

348 Chapter 16 Extended Functions CONTENTSCONTENTSCONTENTSCONTENTS 16.1 Overview...

Página 287

Chapter 16. Extended Functions 349 16.1 Overview In addition to the BHT-BASIC statements and functions, the BHT-8000 series supports the following ext

Página 288

350 16.2 Reading or writing system settings from/to the memory (SYSTEM.FN3) 16.2.1 Function Number List of SYSTEM.FN3 The SYSTEM.FN3 may read or w

Página 289

Chapter 16. Extended Functions 351 16.2.2 Detailed Function Specifications .fcSysIGet(=1) Read numeric data from System Mode settings Synta

Página 290 - SELECT…CASE…END SELECT

28 2.4.6 Error Messages and Their Indication onto the Main Window [ 1 ] Selecting either an editor or main window as an error message output device

Página 291

352 Item number (PARA%) System menu item Attribute*1 DATA%, numeric data of the system menu item Initial value .syCmifOpt 0 IrDA interface .syCmif

Página 292 - SUB…END SUB

Chapter 16. Extended Functions 353 Item number (PARA%) System menu item Attribute*1 DATA%, numeric data of the system menu item Initial value .syHP

Página 293

354 .fcSysISet(=2) Write numeric data to System Mode settings Syntax: CALL "SYSTEM.FN3" .fcSysISet PARA%,DATA% Description:

Página 294

Chapter 16. Extended Functions 355 .fcSysSSet(=4) Write string data to System Mode settings Syntax: CALL "SYSTEM.FN3" .fcSysSSe

Página 295

356 16.3 Controlling system files(SYSMDFY.FN3) 16.3.1 Function Number List of SYSMDFY.FN3 The SYSMDFY.FN3 may reconfigure the BHT system , as well

Página 296

Chapter 16. Extended Functions 357 .fcMdBDo(=2) Reconfigure BHT system Syntax: CALL "SYSMDFY.FN3" .fcMdBDo FILE$, OPT% Description: T

Página 297

358 16.4 Calculating a CRC (CRC.FN3) 16.4.1 Function Number List of CRC.FN3 The CRC.FN3 may calculate a CRC depending upon the function number spec

Página 298 - WHILE…WEND

359 Chapter 17 TCP/IP (BHTs with Bluetooth communications device) CONTENTSCONTENTSCONTENTSCONTENTS 17.1 Two Sides...

Página 299

360 17.5 Socket Library (SOCKET.FN3)... 386 17.5.1 Overview ...

Página 300

Chapter 17. TCP/IP 361 17.1 Two Sides 17.1.1 BHT The BHT equipped with a spread spectrum communications device or IrDA communications device includes

Página 301

Chapter 2. Development Environment and Procedures 29 [ 2 ] How error messages are displayed on the editor or main window During building, the BHT-BAS

Página 302

362 17.2 Programming Procedure 17.2.1 Bluetooth Communication System The following is the procedure for using TCP/IP over a Bluetooth communications

Página 303

Chapter 17. TCP/IP 363 [ 2 ] Configure TCP/IP System To connect to the TCP/IP pathway, specify the following system settings by using the extension l

Página 304

364 [ 3 ] Declare TCP/IP Communications Pathway Specify the following system settings by using the socket library (SOCKET.FN3): • Communications de

Página 305 - $INCLUDE

Chapter 17. TCP/IP 365 [ 4 ] Connect to TCP/IP Communications Pathway Use the extension library SOCKET.FN3. Connecting to the TCP/IP communications p

Página 306

366 [ 5 ] Transfer Data or File via Socket Interface To transfer data via the socket interface, use the extension library SOCKET.FN3. Refer to 17.3,

Página 307

Chapter 17. TCP/IP 367 17.3 Socket API 17.3.1 Overview The SOCKET.FN3 library implements a subset of the BSD4.4 socket application program interface

Página 308 - Chapter 15

368 User Datagram Protocol (UDP)

Página 309

Chapter 17. TCP/IP 369 17.3.2 Programming Notes for Socket API [ 1 ] Programming Notes for TCP (a) Avoid retransmission control in application pro

Página 310

370 [ 2 ] Programming Notes for UDP The user datagram protocol (UDP) has no flow control, so send/receive data may go missing due to poor line condi

Página 311

Chapter 17. TCP/IP 371  Host's retransmission cHost's retransmission cHost's retransmission cHost's retransmission control for a

Página 312

30 2.4.7 Options To specify compiling options and linking options, select the check-box options you want in the Set Options dialog box. Each of avail

Página 313 - CHKDGT$

372 [ 3 ] Programming Notes for Socket API If TCP/IP communication becomes no longer possible during data transmission, extended functions SOCKET.FN

Página 314

Chapter 17. TCP/IP 373 (Example) STATUS% = 0 ON ERROR GOTO TCP.ERR 'Prepare for error interrupt (To TCP.ERR 'at the time of error

Página 315

374 IF STATUS% > 2 THEN '<<<<< Close the socket processing (CALL “SOCKET.FN3 28) >>>>> IF (WERR<&g

Página 316

Chapter 17. TCP/IP 375  Note for runNote for runNote for runNote for run----time error 105htime error 105htime error 105htime error 105h Socket cl

Página 317

376 17.4 FTP Client 17.4.1 Overview The FTP.FN3 library implements FTP client services for file transfers to and from FTP servers. Note that there ar

Página 318

Chapter 17. TCP/IP 377 The FTP client automatically pads the last record of a downloaded program file with null codes (00h) to maintain the fixed-leng

Página 319 - COUNTRY$

378 [ 2 ] Extension Libraries (*.FN3 and *.EX3) The FTP client treats files with extensions .FN3 and .EX3 as extension libraries. Extension librarie

Página 320

Chapter 17. TCP/IP 379 Aside: When downloading extension libraries, the BHT uses 128 bytes out of 130 bytes of record length (the remaining 2 bytes w

Página 321

380 [ 3 ] Data Files The FTP client treats files with extensions other than .PD3, .FN3, and .EX3 as data files. Data file records consist of fields

Página 322

Chapter 17. TCP/IP 381 The treatment of short records is under application control. The default is to delete any trailing spaces (20h). Alternativ

Página 323

Chapter 2. Development Environment and Procedures 31 [ 2 ] Linking options Linking Options Description Mapfile Outputs map information to the file

Página 324

382 Line delimiters inside data records The FTP client can send and receive all codes from 00h to FFh as described above. The treatment of line delim

Página 325

Chapter 17. TCP/IP 383 17.4.3 Using FTP Client [ 1 ] Basic Procedure First, set up for using the FTP client, as necessary, with the following steps.

Página 326

384 [ 3 ] Calculating Memory Requirements The FTP protocol specifications do not provide for checking the amount of BHT memory available during down

Página 327

Chapter 17. TCP/IP 385 Data Files Determine MEM from the field lengths and number of records. BPR = bytes per record = (number of fields) + (sum o

Página 328

386 17.5 Socket Library (SOCKET.FN3) 17.5.1 Overview String Variables The following are the string variables used by this library together with t

Página 329

Chapter 17. TCP/IP 387 Function Number List Number Used to: Corresponding Socket API Function .fcAccept 1* –– accept() .fcBind 2 Assign address to

Página 330

388 Number Used to: Corresponding Socket API Function .fcSocket 26 Create socket socket() .fcWritev 27*–– writev() .fcClose 28 Close socket close(

Página 331

Chapter 17. TCP/IP 389 17.5.2 Detailed Function Specifications Function #2 .fcBind Assign address to socket Syntax: CALL "SOCKET.FN3" .fcB

Página 332

390 Function #3 .fcConnect Connect socket Syntax: CALL "SOCKET.FN3" .fcConnect SOCKFD%, FAMILY%, PORT%, address where address is ADDRES

Página 333

Chapter 17. TCP/IP 391 Run-time errors: Error code Meaning 105h Power-off detected 106h An internal error has occurred in the TCP/IP module during dat

Página 334

ii How this book is organized This manual is made up of 16 chapters and appendices. Chapter 1. Software Overview for the BHTChapter 1. Software Overv

Página 335

32 [ 4 ] Outputting list files The Compiler may output three types of list files as listed below depending upon the options specified at the start o

Página 336

392 Function #6 .fcGSckOpt Get socket option Syntax: CALL "SOCKET.FN3" .fcGSckOpt SOCKFD%, OPTNAME%, option where option is OPTION% or

Página 337

Chapter 17. TCP/IP 393 Run-time errors: Error code Meaning 105h Power-off detected. 106h An internal error has occurred in the TCP/IP module during da

Página 338

394 Function #7 .fcHToNL Convert host long (4 bytes) to network byte order Syntax: CALL "SOCKET.FN3" .fcHToNL HOSTLONG, NETLONG Descript

Página 339

Chapter 17. TCP/IP 395 Function #11 .fcNToHL Convert network long (4 bytes) to host byte order Syntax: CALL "SOCKET.FN3" .fcNToHL NETLONG

Página 340

396 Function #14 .fcRecv Receive data sent to the specified TCP socket Syntax: CALL "SOCKET.FN3" .fcRecv SOCKFD%, RECVBUFF$[()], RECVLEN

Página 341

Chapter 17. TCP/IP 397 Run-time errors: Error code Meaning 105h Power-off detected 106h An internal error has occurred in the TCP/IP module during dat

Página 342

398 Example: Append operation Incoming data: 1024 bytes ("0123456789...0123") Receive buffer: 8 elements, 128 characters each for a

Página 343

Chapter 17. TCP/IP 399 Example: Overwrite operation Incoming data: 1024 bytes ("0123456789...0123") Receive buffer: 8 elements, 128 c

Página 344

400 Function #15 .fcRcvfrom Receive data sent to the specified UDP socket Syntax: CALL "SOCKET.FN3" .fcRcvfrom SOCKFD%, RECVBUFF$[()], R

Página 345

Chapter 17. TCP/IP 401 Run-time errors: Error code Meaning 105h Power-off detected 106h An internal error has occurred in the TCP/IP module during dat

Página 346

Chapter 2. Development Environment and Procedures 33 •••• Address of object programAddress of object programAddress of object programAddress of ob

Página 347 - SEARCH

402 Function #17 .fcSelect Monitor socket requests Syntax: CALL "SOCKET.FN3" .fcSelect MAXFD%, READFDSET$, WRITEFDSET$, EXCEPTFDSET$, TI

Página 348

Chapter 17. TCP/IP 403 Function #18 .fcFDZERO Initialize socket identifier set Syntax: CALL "SOCKET.FN3" .fcFDZERO SOCKFDSET$ Description

Página 349

404 Parameters: SOCKFD% Socket identifier SOCKFDSET$ Socket identifier set Return value: (None)

Página 350

Chapter 17. TCP/IP 405 Function #21 .fcFDISSET Get socket identifier status from socket identifier set Syntax: CALL "SOCKET.FN3" .fcFDISS

Página 351

406 Function #22 .fcSend Send message to another TCP socket Syntax: CALL "SOCKET.FN3" .fcSend SOCKFD%, SENDBUFF$[()], SENDLEN%, SENDMODE

Página 352

Chapter 17. TCP/IP 407 Run-time errors: Error code Meaning 105h Power-off detected 106h An internal error has occurred in the TCP/IP module during dat

Página 353

408 Function #23 .fcSendto Send message to another UDP socket Syntax: CALL "SOCKET.FN3" .fcSendto SOCKFD%, SENDBUFF$[()], SENDLEN%, SEND

Página 354 - TIMEA/TIMEB/TIMEC

Chapter 17. TCP/IP 409 Run-time errors: Error code Meaning 105h Power-off detected 209h Socket identifier is invalid. 216h A parameter is invalid. 228

Página 355

410 Function #24 .fcSSckOpt Set socket options Syntax: CALL "SOCKET.FN3" .fcSSckOpt SOCKFD%, OPTNAME%, option where option is OPTION% o

Página 356 - Chapter 16

Chapter 17. TCP/IP 411 Run-time errors: Error code Meaning 105h Power-off detected. 106h An internal error has occurred in the TCP/IP module during da

Página 357 - 16.1 Overview

34 •••• Symbol table for common variableSymbol table for common variableSymbol table for common variableSymbol table for common variablessss L

Página 358 - (SYSTEM.FN3)

412 Function #25 .fcShutdwn Shut down socket Syntax: CALL "SOCKET.FN3" .fcShutdwn SOCKFD%, HOWTO% Description: This function shuts down

Página 359 - R/W: Read and write possible

Chapter 17. TCP/IP 413 Function #26 .fcSocket Create socket Syntax: CALL "SOCKET.FN3" .fcSocket FAMILY%, TYPE%, PROTOCOL%, SOCKFD% Descri

Página 360

414 Run-time errors: Error code Meaning 105h Power-off detected. 106h An internal error has occurred in the TCP/IP module during data transmission. 1

Página 361 - Read and write possible

Chapter 17. TCP/IP 415 Function #28 .fcClose Close socket Syntax: CALL "SOCKET.FN3" .fcClose SOCKFD% Description: This function closes t

Página 362

416 Function #40 .fcTSetup Specify TCP/IP communications pathway Syntax: CALL "SOCKET.FN3" .fcTSetup IFTYPE%, LAYERMODE%, INTERFACE% Des

Página 363

Chapter 17. TCP/IP 417 Function #41 .fcTCnnSys Connect TCP/IP communications pathway with system settings Syntax: CALL "SOCKET.FN3" .fcTC

Página 364 - 16.3 Controlling system

418 Function #42 .fcTCnnUsr Connect TCP/IP communications pathway with user settings Syntax: CALL "SOCKET.FN3" .fcTCnnUsr INTERFACE%, I

Página 365

Chapter 17. TCP/IP 419 Run-time errors: Error code Meaning 34h Communications device file not open 101h Cannot connect to communications pathway 102h

Página 366

420 Function #43 .fcTDiscnn Disconnect TCP/IP communications pathway Syntax: CALL "SOCKET.FN3" .fcTDiscnn INTERFACE% Description: This

Página 367 - Chapter 17

Chapter 17. TCP/IP 421 Function #44 .fcTSysGet Get TCP/IP system settings Syntax: CALL "SOCKET.FN3" .fcTSysGet PARA%, data where data i

Página 368

Chapter 2. Development Environment and Procedures 35 [ 5 ] Outputting a mapfile Select the Mapfile check box of the Linking Options in the Set Option

Página 369 - 17.1 Two Sides

422 Function #45 .fcTSysSet Set TCP/IP system settings Syntax: CALL "SOCKET.FN3" .fcTSysSet PARA%, data where data is DATA% or DATA$ D

Página 370 - 17.2 Programming Procedure

Chapter 17. TCP/IP 423 Function #46 .fcTStsGet Get TCP socket status Syntax: CALL "SOCKET.FN3" .fcTStsGet SOCKFD%, PATTERN%, TIMEOUT%, RE

Página 371

424 17.6 FTP Library (FTP.FN3) 17.6.1 Overview String Variables The following are the string variables used by this library together with their m

Página 372

Chapter 17. TCP/IP 425 Reply Codes The messages that FTP servers send during and after FTP operations vary, but servers all use the same reply code

Página 373

426 Reply Codes Description 426 Connection closed; transfer aborted. 450 Requested file action not taken. File unavailable (e.g., file busy). 451 R

Página 374 - 'interface%

Chapter 17. TCP/IP 427 17.6.2 Detailed Function Specifications Function #1 .fcFTPOpnS Open FTP client session with system settings Syntax: CALL &quo

Página 375 - 17.3 Socket API

428 Function #2 .fcFTPOpnU Open FTP client session with user settings Syntax: CALL "FTP.FN3" .fcFTPOpnU FTPHANDLE%, SERV.IP$, USERNAME$,

Página 376

Chapter 17. TCP/IP 429 Function #3 .fcFTPClos Close FTP client session Syntax: CALL "FTP.FN3" .fcFTPClos FTPHANDLE%, REPLY% Description

Página 377

430 Function #4 .fcPWD Get current directory on FTP server Syntax: CALL "FTP.FN3" .fcPWD FTPHANDLE%, CURDIR$, REPLY% Description: This

Página 378

Chapter 17. TCP/IP 431 Function #5 .fcCWD Change current directory on FTP server Syntax: CALL "FTP.FN3" .fcCWD FTPHANDLE%, NEWDIR$, REPLY

Página 379

36 •••• Map for userMap for userMap for userMap for user----defined functiondefined functiondefined functiondefined functionssss Shows the sym

Página 380

432 Function #6 .fcRETR Download file from FTP server Syntax: CALL "FTP.FN3" .fcRETR FTPHANDLE%, SERV.FNAME$, CLNT.FNAME$, CRLF.TYPE%, CRL

Página 381 - (Example)

Chapter 17. TCP/IP 433 .ftRcdData1 Treat line delimiters in records as DATA. TRIM trailing spaces in fields. .ftLspDel 10 Treat line delimiters in r

Página 382

434 CRLF.MODE% = .ftRcdSepa 'Data composition: Will be ignored for 'files except data files DISP.MODE% = .ftDisp 'Enable prog

Página 383

Chapter 17. TCP/IP 435 Run-time errors: Error code Meaning 02h Syntax error (Incorrect file name) 05h Number of field items or number of digits in a f

Página 384 - 17.4 FTP Client

436 Function #7 .fcSTOR Upload file to FTP server Syntax: CALL "FTP.FN3" .fcSTOR FTPHANDLE%, SERV.FNAME$, CLNT.FNAME$, CRLF.TYPE%, UP.MOD

Página 385

Chapter 17. TCP/IP 437 Example: Uploading program file, with progress display CLNT.FNAME$ = "SAMPLE.PD3" 'Name of file on BHT SER

Página 386

438 Function #8 .fcFSysGet Get FTP system settings Syntax: CALL "FTP.FN3" .fcFSysGet PARA%, ftp.para where ftp.para is FTP.PARA% or FTP

Página 387

Chapter 17. TCP/IP 439 Function #9 .fcFSysSet Change FTP system settings Syntax: CALL "FTP.FN3" .fcFSysSet PARA%, ftp.para where ftp.para

Página 388 - [ 3 ] Data Files

440 Function #10 .fcRNFR Change file name on FTP server Syntax: CALL "FTP.FN3" .fcRNFR FTPHANDLE%, OLD.FNAME$, NEW.FNAME$, REPLY% Descri

Página 389

Chapter 17. TCP/IP 441 Function #11 .fcPORT Set port number for file transfer Syntax: CALL "FTP.FN3" .fcPORT FTPHANDLE%, PORT% Descriptio

Página 390

Chapter 2. Development Environment and Procedures 37 2.4.8 Starting the BHT-BASIC Compiler from the Command Line You may start the BHT-BASIC Compiler

Página 391 - 17.4.3 Using FTP Client

442 Function #12 .fcDELE Delete file from FTP server Syntax: CALL "FTP.FN3" .fcDELE FTPHANDLE%, SERV.FNAME$, REPLY% Description: This f

Página 392 - User Programs (*.PD3)

443 Chapter 18 Bluetooth (BHTs with Bluetooth communications device) CONTENTSCONTENTSCONTENTSCONTENTS 18.1 Bluetooth Communications...

Página 393 - [ 5 ] FTP Transfers

444 18.1 Bluetooth Communications 18.1.1 Introduction The BHT supports the following profiles based on the BluetoothTM Specification Ver.1.1. • The

Página 394 - 17.5.1 Overview

Chapter 18. Bluetooth 445 18.1.2 System Components The following figures give examples of Bluetooth networks using the BHT. For further details, refer

Página 395 - Function Number List

446 • The BHT does not support multiple simultaneous links (Piconet.) As master, the BHT supports only one slave at a time. • As a slav

Página 396

Chapter 18. Bluetooth 447 18.2 Programming Overview 18.2.1 Software Components The BHT system consists of the BHT main system and Bluetooth communicat

Página 397 - Assign address to socket

448 18.2.2 Statements and Functions Used Bluetooth communications uses the following statements and functions. (1) Statements and functions Refer t

Página 398 - Connect socket

Chapter 18. Bluetooth 449 18.2.3 Programming Procedures 18.2.3.1 Discovering Accessible Remote Devices in the Vicinity (Inquiry) The BHT supports the

Página 399 - Run-time errors:

450 There are two ways to specify the above parameters. • Use the system settings • Specify them in the OPEN statement The user modifies the system

Página 400 - Get socket option

Chapter 18. Bluetooth 451 18.2.3.2 Serial Link with Remote Device The BHT supports the Serial Port Profile for RS232 (or similar) serial cable emulat

Página 401

38 [ 2 ] Options The BHT-BASIC 3.5 Compiler supports three types of options—compiler processing options, compiling options, and linking option. 

Página 402

452 to the specified slave device. Otherwise, the Bluetooth communications device waits for a call from a master before connecting. For further detai

Página 403 - Function #12 .fcNToHS

Chapter 18. Bluetooth 453 OPEN "COM4:M,SPP,112233AABBCC" AS #4 ' Address for remote device: ' 11:22:33:AA:BB:CC" ' U

Página 404 - Function #14 .fcRecv

454 18.2.3.3 Dial-Up Networking via Remote Device The BHT supports the Dial-up Networking Profile for accessing the Internet via a modem or other de

Página 405

Chapter 18. Bluetooth 455 Dial-up networking connections have the following parameters. • Bluetooth device address for remote device •

Página 406 - Example: Append operation

456 OPEN "COM4:M,DUN" AS #4 (b) Specifying parameters in the OPEN statement OPEN "COM4:M,DUN,112233AABBCC,BHT,30,2" AS #4 &a

Página 407 - Example: Overwrite operation

Chapter 18. Bluetooth 457 auh% = .soPPPPAP ' PPP authentication procedure: PAP usr$ = "USER" ' User name for PPP authenticat

Página 408 - Function #15 .fcRcvfrom

458 18.2.3.4 Service Discovery The BHT supports the Service Discovery Application Profile for querying and browsing for services offered by another B

Página 409

Chapter 18. Bluetooth 459 (a) Using the system settings OPEN "COM4:M,SDAP" as #4 (b) Specifying parameters in the OPEN statement OPEN &q

Página 410 - Monitor socket requests

460 18.2.4 Programming Notes 18.2.4.1 Retransmission control in serial communications Any system design using wireless communications must assume da

Página 411

Chapter 18. Bluetooth 461 18.2.4.2 Reading data received in serial communications We recommend that user programs always follow the approach shown be

Página 412 - Return value: (None)

Chapter 2. Development Environment and Procedures 39 Compiling optionsCompiling optionsCompiling optionsCompiling options Compiling options D

Página 413 - Function #21 .fcFDISSET

462 Do not use INPUT# or LINE INPUT# statement for reading data received. The INPUT# or LINE INPUT# statement waits for reception of CR (0Dh) or com

Página 414 - Function #22 .fcSend

Chapter 18. Bluetooth 463 18.2.4.3 Resume Operation Bluetooth communications does not support resume operation. If the BHT shuts itself down due to lo

Página 415

464 18.2.4.4 Power Supply Control  Power supply control of Power supply control of Power supply control of Power supply control of Bluetooth commun

Página 416 - Function #23 .fcSendto

Chapter 18. Bluetooth 465 • Power-saving mode introduces delays. For operations involving real-time communications, we recommend that

Página 417

466 18.3 Bluetooth Statements and Functions 18.3.1 Overview The following statements and functions are available for use with the Bluetooth communi

Página 418 - Set socket options

Chapter 18. Bluetooth 467 Statement or FunctionUsed to: EOF Read whether there is data in the Bluetooth communications device file receive buffer LOC

Página 419

468 18.3.2 Detailed Specifications OPEN "COM4:I" Open the Bluetooth communications device file in inquiry mode, discovering accessible re

Página 420 - Shut down socket

Chapter 18. Bluetooth 469 COM4 This indicates the Bluetooth interface. Note that the BHT cannot open this communications device file concurrentl

Página 421 - Create socket

470 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 105h Power-off detected 600h Failed to open a Bluetooth

Página 422

Chapter 18. Bluetooth 471 OPEN "COM4:M" Open the Bluetooth communications device file with the BHT as master and connect to a slave Synta

Página 423 - Close socket

40 [ 3 ] Error Level Indication by ERRORLEVEL If you specify a +E option at the command line and run the BHT-BASIC 3.5 Compiler, the ERRORLEVEL of M

Página 424 - Function #40 .fcTSetup

472 COM4 This indicates the Bluetooth interface. Note that the BHT cannot open this communications device file concurrently with the IrDA inter

Página 425 - Function #41 .fcTCnnSys

Chapter 18. Bluetooth 473 timeout This specifies a time limit for completing the operation. The unit is seconds; the range, 1 to 255. Leaving thi

Página 426 - Function #42 .fcTCnnUsr

474 RunRunRunRun----time errors:time errors:time errors:time errors: Error code Meaning 47h Abnormal end of communications or termination of com

Página 427

Chapter 18. Bluetooth 475 OPEN "COM4:S" Open the Bluetooth communications device file with the BHT as a slave and wait for a master Synta

Página 428 - Function #43 .fcTDiscnn

476 COM4 This indicates the Bluetooth interface. Note that the BHT cannot open this communications device file concurrently with the IrDA inter

Página 429 - Get TCP/IP system settings

Chapter 18. Bluetooth 477 Leaving this parameter blank specifies the use of the system setting. Specifying a parameter does not affect the system sett

Página 430 - Set TCP/IP system settings

478 CLOSE Close the Bluetooth communications device file Refer to Chapter 14, "Statement Reference." INPUT # Read data from the Bluetoo

Página 431 - Get TCP socket status

Chapter 18. Bluetooth 479 PRINT # Write data to the Bluetooth communications device file Syntax:Syntax:Syntax:Syntax: Refer to Chapter 14, "

Página 432 - 17.6 FTP Library (FTP.FN3)

480 WAIT Wait for a change in Bluetooth communications device file receive buffer status Refer to Chapter 14, "Statement Reference." XFI

Página 433 - Reply Codes

Chapter 18. Bluetooth 481 18.4 Bluetooth Extended Functions (BT.FN3) 18.4.1 Overview The Bluetooth extended functions (BT.FN3) used in a BHT-BASIC CA

Página 434

Chapter 2. Development Environment and Procedures 41 2.4.9 Output from the BHT-BASIC 3.5 Compiler The BHT-BASIC 3.5 Compiler outputs the following in

Página 435 - Function #1 .fcFTPOpnS

482 18.4.2 Detailed Specifications Function #1 .fcBTGetVal Read Bluetooth integer setting Syntax: CALL "BT.FN3" .fcBTGetVal PARA%,DATA% De

Página 436 - Function #2 .fcFTPOpnU

Chapter 18. Bluetooth 483 Function #2 .fcBTSetVal Write Bluetooth integer setting Syntax: CALL "BT.FN3" .fcBTSetVal PARA%,DATA% Descripti

Página 437 - Close FTP client session

484 Function #3 .fcBTGetStr Read Bluetooth string setting Syntax: CALL "BT.FN3" .fcBTGetStr PARA%,DATA$ Description: This function reads

Página 438 - Function #4 .fcPWD

Chapter 18. Bluetooth 485 Run-time errors: Error code Meaning 05h Parameter out of the range F0h Mismatch parameter number F1h Mismatch parameter typ

Página 439 - Function #5 .fcCWD

486 Function #4 .fcBTSetStr Write Bluetooth string setting Syntax: CALL "BT.FN3" .fcBTSetStr PARA%,DATA$ Description: This function wri

Página 440 - Function #6 .fcRETR

Chapter 18. Bluetooth 487 Function #7 .fcBTSysVer Read Bluetooth system version Syntax: CALL "BT.FN3" .fcBTSysVer BTSYSVER$ Description:

Página 441

488 Function #8 .fcBTDevInf Read Bluetooth device information Syntax: CALL "BT.FN3" .fcBTDevInf PARA%,DATA$ Description: This function re

Página 442

Chapter 18. Bluetooth 489 Run-time errors: Error code Meaning 05h Parameter out of the range 34h Bad file name or number. (The Bluetooth communicatio

Página 443

490 Function #9 .fcBTRmtNam Get remote device name Syntax: CALL "BT.FN3" .fcBTRmtNam BDADDR$,BDNAME$ Description: This function gets the

Página 444 - Upload file to FTP server

Chapter 18. Bluetooth 491 Run-time errors: Error code Meaning 05h Parameter out of the range 34h Bad file name or number. (The Bluetooth communicati

Página 445

iii Chapter 12. PowerChapter 12. PowerChapter 12. PowerChapter 12. Power----related Functionsrelated Functionsrelated Functionsrelated Functions D

Página 446 - Get FTP system settings

42 Output Destination Conditions Address–Source list If the Address-source List check box is selected in the Set Options dialog box. Symbol table

Página 447 - Change FTP system settings

492 Function #10 .fcBTInqRes Read remote device discovery results Syntax: CALL "BT.FN3" .fcBTInqRes NUM%,BDADDR$[()] Description: This

Página 448 - Function #10 .fcRNFR

Chapter 18. Bluetooth 493 Run-time errors: Error code Meaning 05h Parameter out of the range 34h Bad file name or number. (The Bluetooth communicati

Página 449 - Function #11 .fcPORT

494 Function #11 .fcBTRmtInf Get Bluetooth device address for remote device Syntax: CALL "BT.FN3" .fcBTRmtInf BDADDR$ Description: This

Página 450 - Delete file from FTP server

Chapter 18. Bluetooth 495 Function #12 .fcBTGetStt Read connection status Syntax: CALL "BT.FN3" .fcBTGetStt STATUS% Description: This fun

Página 451 - Chapter 18

496 Function #13 .fcBTGetLnk Read authenticated Bluetooth device addresses Syntax: CALL "BT.FN3" .fcBTGetLnk NUM%,BDADDR$[()] Description

Página 452 - 18.1.1 Introduction

Chapter 18. Bluetooth 497 Function #14 .fcBTClrLnk Erase authenticated Bluetooth device addresses Syntax: CALL "BT.FN3" .fcBTClrLnk [BDADD

Página 453 - 18.1.2 System Components

498 Function #15 .fcBTHold Control power-saving mode Syntax: CALL "BT.FN3" .fcBTHold INTERVAL% Description: This function shifts into th

Página 454 - Availabl

Chapter 18. Bluetooth 499 Run-time errors: Error code Meaning 05h Parameter out of the range 34h Bad file name or number. (The Bluetooth communicati

Página 455 - 18.2 Programming Overview

500 Function #20 .fcBTChkSnd Check data transmit result Syntax: CALL "BT.FN3" .fcBTChkSnd STATUS% Description: This function checks whet

Página 456

Chapter 18. Bluetooth 501 Example: Transmit a message and wait for completion of the transmission PRINT #4, "1234567890" ' Transmit da

Página 457 - Vicinity (Inquiry)

Chapter 2. Development Environment and Procedures 43 2.4.10 Structure of User Programs and Libraries If you specify a user program to be produced in

Página 458

502 Function #21 .fcBTGetSvc Read service discovery results Syntax: CALL "BT.FN3" .fcBTGetSvc NUM%,SCLASS%[()],SNAME$[()] Description: T

Página 459

Chapter 18. Bluetooth 503 SNAME$ entries, the interface stops when the arrays are full. If the service name is longer than the string length of SNAME$

Página 460

504 AppendicesAppendicesAppendicesAppendices CONTENTSCONTENTSCONTENTSCONTENTS Appendix A Error Codes and Error Messages...

Página 461 - Chapter 18. Bluetooth

Appendices 505 Appendix AAppendix AAppendix AAppendix A Error Codes and Error MessagesError Codes and Error MessagesError Codes and Error MessagesE

Página 462

506 Error code Meaning 36h Improper file type (The statement attempts an operation that conflicts with the file type-- data file, communications de

Página 463

Appendices 507 Error code Meaning 100h Cannot specify communications pathway 101h Cannot connect to communications pathway 102h Communications pa

Página 464

508 Error code Meaning 293h The problem occurred on the communication pathway. 295h There is no user for login request. 600h Failed to open a Bl

Página 465

Appendices 509 A2. Compilation ErrorsA2. Compilation ErrorsA2. Compilation ErrorsA2. Compilation Errors Fatal ErrorsFatal ErrorsFatal ErrorsFa

Página 466 - 18.2.3.4 Service Discovery

510 Syntax ErrorsSyntax ErrorsSyntax ErrorsSyntax Errors Error code & Message error 1: Improper label format error 2: Improper label name

Página 467

Appendices 511 Error code & Message error 21: Too many variables (register float array) error 22: Too many variables (register string array) erro

Página 468 - 18.2.4 Programming Notes

44 2.5 Downloading 2.5.1 Overview of Transfer Utility/Ir-Transfer Utility C/Ir-Transfer Utility E Transfer Utility/Ir-Transfer Utility C/Ir-Transfer

Página 469

512 Error code & Message error 46: error 47: error 48: error 49: error 50: Incorrect use of IF...THEN...ELSE...ENDIF error 51: Incomplete

Página 470

Appendices 513 Error code & Message error 77: Initial string too long error 78: Array symbols exceed 30 for one DIM, GLOBAL, or PRIVATE statement

Página 471 - 18.2.4.3 Resume Operation

514 Linking ErrorsLinking ErrorsLinking ErrorsLinking Errors Error Message PRC area size different Out of space in RFG area Out of space in PR

Página 472

Appendices 515 Error Message Non-array integer register variable area overflow Non-array float register variable area overflow Register memory pool a

Página 473 - User Program

516 Library ErrorsLibrary ErrorsLibrary ErrorsLibrary Errors Error Message Cannot find object to be deleted [objectname] Designated object alr

Página 474 - Functions

Appendices 517 Appendix BAppendix BAppendix BAppendix B Reserved WordsReserved WordsReserved WordsReserved Words The following list shows reser

Página 475

518 Appendix CAppendix CAppendix CAppendix C Character SetsCharacter SetsCharacter SetsCharacter Sets C1. Character SetC1. Character SetC1. Cha

Página 476 - [#]filenumber

Appendices 519 C2. National Character SetsC2. National Character SetsC2. National Character SetsC2. National Character Sets You may switch characte

Página 477 - Syntax errors:Syntax errors:

520 Appendix DAppendix DAppendix DAppendix D I/O PortsI/O PortsI/O PortsI/O Ports Input PortsInput PortsInput PortsInput Ports A user p

Página 478

Appendices 521 Port No. Bit assign- ment Monitors the following: - 0 Deactivated 0 Wakeup function .pvWupOn 1Activated - 0 Initiated by the power key

Página 479

Chapter 2. Development Environment and Procedures 45 2.6 Executing a User Program 2.6.1 Starting To run a user program, start System Mode and select

Página 480

522 Port No. Bit assign-ment Monitors the following: - 0 Released 0 Magic key 1 .pvM1kyOn 1 Held down - 0 Released 1 Magic key 2 .pvM2kyOn 1 Held

Página 481

Appendices 523 Port No. Bit assign-ment Monitors the following: .pvRwuOff 0 Deactivated .pnRwuCtrl 60F0h 0 Remote wakeup function *13 .pvRwuOn 1 Acti

Página 482

524 *8 A user program returns the A/D converted value (0 to 255) of the battery voltage level (0 to 7V). The returned value is an instantaneous valu

Página 483

Appendices 525 Output PortsOutput PortsOutput PortsOutput Ports A user program can control the hardware through the output ports by using the

Página 484

526 Port No. Bit assign-ment Controls the following: .pnTmPOff 6030h 7-0 Effective held-down time of power key *10 - 1-255 .pvCPBHT 0 BHT-protocol .

Página 485

Appendices 527 *1 The indicator LED is controllable only when the bar code device file is closed. If the file is opened, the OUT statement will be ig

Página 486

528 *11 You can set the communications protocol type for transmitting files with the XFILE statement. *12 You may set the BHT’s ID number to be used

Página 487

Appendices 529 Appendix EAppendix EAppendix EAppendix E Key Number Assignment on the Key Number Assignment on the Key Number Assignment on the Key

Página 488

530 Appendix FAppendix FAppendix FAppendix F Memory AreaMemory AreaMemory AreaMemory Area Memory MapMemory MapMemory MapMemory Map The

Página 489 - (BT.FN3)

Appendices 531 ROM 8MB, RAM 512KB Type (except BHT8048DB)System work area (512KB) Font area JIS Level 1 font

Página 490 - Function #1 .fcBTGetVal

46 Chapter 3 Program Structure CONTENTSCONTENTSCONTENTSCONTENTS 3.1 Program Overview ...

Página 491 - Function #2 .fcBTSetVal

532 Memory ManagementMemory ManagementMemory ManagementMemory Management The BHT manages the user area of the memory for user programs and dat

Página 492 - Function #3 .fcBTGetStr

Appendices 533 Appendix GAppendix GAppendix GAppendix G Handling Space CharactersHandling Space CharactersHandling Space CharactersHandling Space C

Página 493

534 To handle space characters as data To handle trailing spaces in a data field as data (not as padding characters), you must take special co

Página 494 - Function #4 .fcBTSetStr

Appendices 535 Example 3 When specifying a field data to be searched, do not include trailing spaces in a data field. A B CA B CA B CA B

Página 495 - Function #7 .fcBTSysVer

536 To make the BHT handle space characters as dataTo make the BHT handle space characters as dataTo make the BHT handle space characters as data

Página 496 - Function #8 .fcBTDevInf

Appendices 537 Appendix HAppendix HAppendix HAppendix H Programming NotesProgramming NotesProgramming NotesProgramming Notes Program file na

Página 497

538 Appendix IAppendix IAppendix IAppendix I Program SamplesProgram SamplesProgram SamplesProgram Samples Writing the function for receiving b

Página 498 - Get remote device name

Appendices 539 .kb$ = input$(1) while .kb$<>"" if instr(esc$, .kb$) then'Key designated in esc$? fnbarkey$ = .kb$ 'Then, ret

Página 499

540 Testing the written functionTesting the written functionTesting the written functionTesting the written function while 1 '

Página 500 - Function #10 .fcBTInqRes

Appendices 541 Appendix JAppendix JAppendix JAppendix J Quick ReferenceQuick ReferenceQuick ReferenceQuick Reference for Statements and Functifo

Página 501

Chapter 3. Program Structure 47 3.1 Program Overview 3.1.1 Statement Blocks A statement block is a significant set of statements (which is also called

Página 502 - Function #11 .fcBTRmtInf

542 Handling errors Statements ON ERROR GOTO Enables error trapping. RESUME Causes program execution to resume at a specified location after

Página 503 - Read connection status

Appendices 543 Controlling the LCD screen Statements APLOAD Loads a user-defined font in the single-byte ANK mode. CLS Clears the LCD screen. CUR

Página 504 - Function #13 .fcBTGetLnk

544 Controlling the keyboard input Statements INPUT Reads input from the keyboard into a variable. KEY Assigns a string or a control code to a f

Página 505 - Function #14 .fcBTClrLnk

Appendices 545 Communicating with I/Os Statements OUT Sends a data byte to an output port. POWER Controls the automatic power-off facility. WAIT Pau

Página 506 - Control power-saving mode

546 Manipulating data files and user program files Statements CLFILE Erases the data stored in a data file. CLOSE Closes file(s). FIELD Allocate

Página 507

Appendices 547 Functions BCC$ Returns a block check character (BCC) of a data block. EOF Tests whether the end of a device I/O file has been reache

Página 508 - Check data transmit result

548 Manipulating string data Functions ASC Returns the ASCII code value of a given character. CHR$ Returns the character corresponding to a giv

Página 509

Appendices 549 Appendix KAppendix KAppendix KAppendix K Unsupported Statements and Unsupported Statements and Unsupported Statements and Unsupporte

Página 510 - Function #21 .fcBTGetSvc

550 SupplementSupplementSupplementSupplement CONTENTSCONTENTSCONTENTSCONTENTS Supplement A What's different from the BHT-5000?...

Página 511

Supplement 551 Suuplement ASuuplement ASuuplement ASuuplement A What's different from the What's different from the What's different

Página 512 - AppendicesAppendices

48 [ 3 ] User-defined Functions Before calling user-defined functions, it is necessary to define those functions with any of the following statement

Página 513

552 •••• Switching time between sending and receiving on the IrDA interfaceSwitching time between sending and receiving on the IrDA interfaceSwit

Página 514

Supplement 553 A.3 Screen displayA.3 Screen displayA.3 Screen displayA.3 Screen display Item BHT-5000 BHT-8000 BHT-2000 compatible mode Available

Página 515

554 A.4 KeyboardA.4 KeyboardA.4 KeyboardA.4 Keyboard Item BHT-5000 BHT-8000 Magic keys *1 M1 and M2 keys M1, M2, M3, and M4 keys Default trigger

Página 516

Supplement 555 A.6 FilesA.6 FilesA.6 FilesA.6 Files Item BHT-5000 BHT-8000 File storage device(s) RAM (Drive A) Flash ROM (Drive B) Flash ROM (The

Página 517 - A2. Compilation Errors

556 A.A.A.A.8 Beeper & vibrator control8 Beeper & vibrator control8 Beeper & vibrator control8 Beeper & vibrator control Item BHT-

Página 518

Supplement 557 Supplement BSupplement BSupplement BSupplement B What's different from the What's different from the What's different

Página 519

558 B.3 Screen displB.3 Screen displB.3 Screen displB.3 Screen displayayayay Item BHT-6000 BHT-8000 Standard-size font: 16 x 6 (6 x 8) Standard-s

Página 520

Supplement 559 B.4 KeyboardB.4 KeyboardB.4 KeyboardB.4 Keyboard Item BHT-6000 BHT-8000 Magic keys *1 M1 and M2 keys M1, M2, M3, and M4 keys Defau

Página 521

560 B.6 FilesB.6 FilesB.6 FilesB.6 Files Item BHT-6000 BHT-8000 File storage device(s) RAM (Drive A) Flash ROM (Drive B) Flash ROM (The RAM is use

Página 522

Supplement 561 B.8 Beeper & vibrator controlB.8 Beeper & vibrator controlB.8 Beeper & vibrator controlB.8 Beeper & vibrator control

Página 523

Chapter 3. Program Structure 49 3.1.2 Notes for Jumping into/out of Statement Blocks It is not recommended to jump control from a main routine or sub

Página 524

562 Supplement CSupplement CSupplement CSupplement C What's different from the What's different from the What's different fro

Página 525

Supplement 563 C.3 Monitor the CUC.3 Monitor the CUC.3 Monitor the CUC.3 Monitor the CU state state state state Item BHT-7000 BHT-8000 Get the CU s

Página 526 - C1. Character Set

564 C.7 Remote wakeupC.7 Remote wakeupC.7 Remote wakeupC.7 Remote wakeup Item BHT-7000 BHT-8000 When the rechargeable battery cartridge is loaded

Página 527 - C2. National Character Sets

IndexIndexIndexIndex _ _(underline, underscore), 433, 436 1 12-dot font, 87 16-dot font, 87 A ACK, 143, 144, 309 address-source list, 30, 33, 3

Página 528

BEEP, 85, 107, 129, 152, 157, 158, 159, 517, 544, 556, 561, 563 beeper, ii, iii, 107, 121, 136, 140, 157, 158, 191, 242, 245, 249, 524, 528, 544, 54

Página 529

170, 171, 223, 312, 517, 541 chained, 50, 67, 147, 153, 154, 164, 170, 223, 312 chaining, ii, 50 charaattribute, 88, 169, 280, 281 character attribu

Página 530

counter, 216, 258, 259 country code, 246, 311, 312, 543 countrycode, 311, 312, 519 CRC-16, 303, 358 cross reference, 5, 30, 39, 51, 297, 509 CU, v,

Página 531

469, 472, 476, 523 directories, 27 directory, 27, 37, 41, 43, 114, 115, 166, 220, 376, 385, 424, 426, 430, 431, 432, 436, 438, 440 directory, direct

Página 532

FD_ISSET, 387, 405 FD_SET, 387, 403 FD_ZERO, 387, 403 field, 113, 115, 124, 193, 194, 201, 266, 271, 292, 293, 295, 339, 353, 380, 385, 432, 433, 43

Página 533

239, 275, 279, 505, 517, 541, 549 GOTO, 16, 47, 49, 53, 129, 152, 205, 206, 208, 236, 237, 275, 374, 517, 541, 549 H header, 32, 124, 296, 341, 343,

Página 534

50 3.2 Handling User Programs 3.2.1 User Programs in the Memory The user area of the memory (memories) in the BHT can store more than one user prog

Página 535

239, 279, 322, 517, 527, 543, 544, 554, 559, 562 KEY OFF, 152, 217, 218, 238, 239, 322, 544 KEY ON, 133, 152, 217, 218, 238, 239, 322, 544 keyboard

Página 536

Multi-statements, 54 N national character, 103, 311, 312, 518, 519, 543 non-array integer variable, 66, 170, 175, 177, 197, 284 non-array real varia

Página 537

461, 517 OUT, 6, 85, 87, 96, 97, 99, 100, 101, 102, 104, 105, 108, 116, 121, 125, 136, 146, 150, 151, 152, 158, 245, 256, 257, 281, 289, 323, 345, 3

Página 538

register variable, 6, 7, 30, 34, 35, 36, 39, 67, 71, 136, 138, 185, 186, 187, 192, 193, 203, 268, 299, 510, 512, 515, 532, 542 Relational operations

Página 539

440, 441, 442, 456, 457, 507 socket API, 367, 369, 387, 388, 389, 390, 392, 394, 395, 396, 400, 402, 403, 405, 406, 408, 410, 412, 413, 415 socket a

Página 540

286, 548 subnet mask, 363 Subnet mask, 363, 365, 386, 418, 421 subroutine, 47, 205, 206, 279, 541 subscript, 57, 65, 66, 185, 187, 189, 190, 203, 20

Página 541

447, 449, 450, 452, 455, 458, 460, 461, 463, 464, 479, 487, 492, 494, 496, 520, 523, 524, 525, 527, 532, 537, 542, 546, 556, 561, 563 user-defined f

Página 542

BHT-BASIC (BHT-8000 series) Programmer’s Manual 3rd Edition, June 2003 DENSO WAVE INCORPORATED The purpo

Página 543

Chapter 3. Program Structure 51 3.2.3 Included Files "Included files" are separate source programs which may be called by the INCLUDE metaco

Página 544

iv Notational Conventions Used in This BookNotational Conventions Used in This BookNotational Conventions Used in This BookNotational Conventions

Página 545

52 Chapter 4 Basic Program Elements CONTENTSCONTENTSCONTENTSCONTENTS 4.1 Structure of a Program Line ...

Página 546

Chapter 4. Basic Program Elements 53 4.1 Structure of a Program Line 4.1.1 Format of a Program Line A program line consists of the following element

Página 547 - 'the initial state

54 [ 2 ] Statements Statements can come in two types: executable and declarative statements. • Executable statements• Executable statements• Executa

Página 548

Chapter 4. Basic Program Elements 55 4.1.2 Program Line Length A program line is terminated with a CR code by pressing the carriage return key. The a

Página 549 - Controlling program flow

56 4.2 Usable Characters 4.2.1 Usable Characters Listed below are characters which can be used for writing programs. Note that a double quote ("

Página 550 - Statements

Chapter 4. Basic Program Elements 57 4.2.2 Special Symbols and Control Codes Symbols and control codes used outside of a character string have the fo

Página 551 - Controlling the LCD screen

58 Symbols and control codes Typical use : (Colon) • Separates statements. • Separates time information in TIME$ function. ; (Semicolon) Line feed c

Página 552

Chapter 4. Basic Program Elements 59 4.3 Labels A label can contain the following characters: • Alphabet characters • Numeral characters • Period (.)

Página 553 - Communicating with I/Os

60 4.4 Identifiers Identifiers for the names of variables should comprise the same alphanumerics as the labels. Rules for naming identifiersRule

Página 554

Chapter 4. Basic Program Elements 61 4.5 Reserved Words "Reserved words" are keywords to be used in statements, functions, and operators. F

Página 555 - Manipulating numeric data

v Icons Used in This BookIcons Used in This BookIcons Used in This BookIcons Used in This Book Statements and functions unique to BHT-BASIC.

Página 556

62 Chapter 5 Data Types CONTENTSCONTENTSCONTENTSCONTENTS 5.1 Constants...

Página 557

Chapter 5. Data Types 63 5.1 Constants 5.1.1 Types of Constants A constant is a data item whose value does not change during program execution. Const

Página 558 - SupplementSupplement

64 Real ConstantsReal ConstantsReal ConstantsReal Constants Real constants should be formatted as shown below. Syntax: sign mantissa Syntax:

Página 559 - A.1 Communication

Chapter 5. Data Types 65 5.2 Variables A variable is a symbolic name that refers to a unit of data storage. The contents of a variable can change duri

Página 560 - A.2 Bar code reading

66 Memory OccupationMemory OccupationMemory OccupationMemory Occupation A string variable occupies the memory space by (the number of characte

Página 561 - A.3 Screen display

Chapter 5. Data Types 67 5.2.2 Classification of Variables Work VariablesWork VariablesWork VariablesWork Variables A work variable is intended

Página 562

68 5.3 User-defined Functions Out of user-defined functions, the SUB and FUNCTION functions can be called from other files. The DEF FN function can b

Página 563

Chapter 5. Data Types 69 5.4 Type Conversion 5.4.1 Type Conversion BHT-BASIC has the type conversion facility which automatically converts a value of

Página 564

70 5.4.2 Type Conversion Examples The following examples show the type conversion from real to integer. Assignment of Real Expressions to Integer

Página 565

Chapter 5. Data Types 71 5.5 Scope of Variables You may scope work variables and register variables to be local or global with the PRIVATE or GLOBAL s

Página 566

vi AbbreviationsAbbreviationsAbbreviationsAbbreviations ANK Alpha-Numeric and Katakana BASIC Beginners All purpose Symbolic Instruction Code

Página 567

72 If used inside the SUB or FUNCTION function in the same file where the global variable is defined, the variable will also have the same value. (Ex

Página 568

Chapter 5. Data Types 73 5.5.2 Local Variables A local variable can be accessed only in a file where it is defined. Write PRIVATE preceding a desired

Página 569

74 5.5.3 Variables Not Declared to be Global or Local If not declared to be global or local, a variable is closed in each file where it is defined.

Página 570

Chapter 5. Data Types 75 5.5.4 Common Variables A common variable should be declared in a main object beforehand. To share the common variable by file

Página 571

76 Chapter 6 Expressions and Operators CONTENTSCONTENTSCONTENTSCONTENTS 6.1 Overview...

Página 572

Chapter 6. Expressions and Operators 77 6.1 Overview An expression is defined as a combination of constants, variables, and other expressions which ar

Página 573 - IndexIndex

78 6.2 Operator Precedence When an expression contains more than one operator, BHT-BASIC performs the operations in the standard precedence as shown

Página 574

Chapter 6. Expressions and Operators 79 6.3 Operators 6.3.1 Arithmetic Operators Arithmetic operators include a negative sign (-) and operators for mu

Página 575

80 6.3.2 Relational Operators A relational operator compares two values. Depending upon whether the comparison is true or false, the operator returns

Página 576

Chapter 6. Expressions and Operators 81 6.3.3 Logical Operators A logical operator combines multiple tests and manipulates Boolean operands, then retu

Página 577

1 Chapter 1 Software Overview for the BHT CONTENTSCONTENTSCONTENTSCONTENTS 1.1 Software Overview...

Página 578

82 [ 2 ] The AND operator The AND operator ANDs the same order bits in two expressions on either side of the operator, then sets 1 to the resultant

Página 579

Chapter 6. Expressions and Operators 83 6.3.4 Function Operators The following two types of functions are available in BHT-BASIC, both of which work a

Página 580

84 Comparison of Character StringsComparison of Character StringsComparison of Character StringsComparison of Character Strings The string ope

Página 581

85 Chapter 7 I/O Facilities CONTENTSCONTENTSCONTENTSCONTENTS 7.1 Output to the LCD Screen...

Página 582

86 7.1 Output to the LCD Screen 7.1.1 Display Fonts [1] Screen mode and font size Listed below are the fonts available on BHT. Screen mode Font s

Página 583

Chapter 7. I/O Facilities 87 Screen modeScreen modeScreen modeScreen mode The ANK mode displays ANK characters listed in Appendices C1 and C2.

Página 584

88 [2] Character attributes (Reverse font and enlargement attribute) Reverse font attributeReverse font attributeReverse font attributeReverse f

Página 585

Chapter 7. I/O Facilities 89 7.1.2 Coordinates on the LCD To locate characters on the coordinates of the LCD screen, use the LOCATE statement. To obt

Página 586

90 Two-byte Kanji Mode • Standard-size font Be careful about the specification of line numbers in figures below. A single column shown below represen

Página 587 - BHT-BASIC

Chapter 7. I/O Facilities 91 • Small-size font Be careful about the specification of line numbers in figures below. A single column shown below repres

Comentários a estes Manuais

Sem comentários