Instruction Manual

34
APPENDIX 1 - SAMPLE BASIC TERMINAL PROGRAM FOR IBM PC
This program will transmit characters entered on the keyboard to the ANAFAZE 8
PID and display them on the screen. Characters sent from the ANAFAZE 8 PID
will also be displayed. The program is set for 2400 baud -- which is how the
ANAFAZE 8 PID's are configured when they are shipped from the factory.
10
'******************************************************
*
20 'TERMIN2 -- Terminal Emulation Program
30
'******************************************************
*
100 CLOSE :OPEN "COM1:2400,N,8,1,RS,CS,DS," AS #1 'OPEN
COM
1 2400 BAUD,NO PARITY
110 CLS:PRINT "TO OPERATE: ANY KEY PRESSED WILL BE SENT
TO
THE ANAFAZE 8, ANY ANSWER WILL BE DISPLAYED"
120 IF EOF(1) THEN 130 ELSE N$=INPUT(1,#1):GOTO 120
'CLEARS BUFFER
130 A$=INKEY$
140 IF A$="" THEN 150 ELSE PRINT A$;:PRINT #1,A$;:GOTO
130
150 IF EOF(1) THEN 130 ELSE N$=INPUT$(1,#1):PRINT
N$;:GOTO 150