20
2
3
digit: Program control
0: Stop 1: Performance
2
4
digit: Program control (Hold)
0: OFF 1: ON
2
5
digit: Program control (Wait)
0: OFF 1: ON
2
6
to 2
15
digit: Not used, Always 0
7. Sample program
7.1 Sample program list
1000 '*************************************************************************************************
1010 ' <SAMPLE1A.BAS>
1020 '
•
This program is a communication example for DCL-300, FCD-100, FCR-100,
1030 ' FCL-100, GCS-300, HCD-100, JCD-100, JCR-100, JCS-200, JCD-300,
1040 ' JCR-300, JCS-300, MCD-100, MCR-100, PC-800, PC-900 and PCD-300.
1050 '
•
Runs on the IBM PC and compatible PC with GW-BASIC.
1060 ' SHINKO TECHNOS CO., LTD.
1070 '*************************************************************************************************
1080 '
1090 '************************************************
1100 '* Initial *
1110 '************************************************
1120 CRPMAX=25:
'maximum row line number (vertical)
1130 CMAX=80:
'maximum column number
1140 CRP=1:
'row line pointer
1150 CCP=1:
'column pointer
1160 DIM KD$(200):
'key input buffer
1170 CLS: GOSUB 1690
1180 OPEN "COM1:9600,E,7,1" AS #1 : '9600bps, even, data 7 bits data, 1 stop bit
1190 ON COM(1) GOSUB 1420
1200 COM(1) ON
1210 '************************************************
1220 '* Main *
1230 '************************************************
1240 B=1
1250 KD$(B)=""
1260 WHILE KD$(B)="": KD$(B)=INKEY$: WEND
1270 IF KD$(B)=CHR$(2) THEN KD$(1)=KD$(B):B=1
1280 IF KD$(B)=CHR$(&HD) THEN GOSUB 1340 ELSE GOSUB 1360: GOTO 1250
1290 FOR B=1 TO BMAX
1300 PRINT#1,KD$(B);
1310 NEXT B
1320 GOTO 1240
1330 '
1340 GOSUB 1750: KD$(B)=CHR$(3): BMAX=B:GOSUB 1620
1350 RETURN
1360 GOSUB 1620
1370 IF B<200 THEN B=B+1 ELSE PRINT "Over flow ... Key input buffer": STOP
1380 RETURN
1390 '************************************************
1400 '* Receiver *
1410 '************************************************
1420 N=LOC(1):IF N=0 THEN RETURN
1430 D$=INPUT$(N,#1):CRPB=2
1440 FOR L=1 TO N
1450 RD$=MID$(D$,L,1)
1460 IF RD$ < " " THEN GOSUB 1520 ELSE GOSUB 1540
1470 NEXT L
1480 RETURN
1490 '************************************************
1500 '* Display *
1510 '************************************************
1520 GOSUB 1560:PRINT "^";:GOSUB 1560:PRINT CHR$(ASC(RD$)+ASC("@"));
1530 RETURN
1540 GOSUB 1560:PRINT RD$;