Download Print this page

Advantech PCL-848A/B User Manual page 49

Multifunction ieee-488 interface card

Advertisement

10
'FILE NAME : EXAMPLE.2
20
' Program Example : SET IEEE-488 PRINTER
30
'
40
'Purpose : This program converts an IEEE-488 printer to a
50
'PC system printer
70
'
80
'Initialization
90
100
CLS
110
DEF SEG=&HD000
120
DEVICE%=57
130
140
150
Enter the IEEE-488 printer setting
170
INPUT "Enter the IEEE-488 printer address ? ",ADDR%
180
IF ADDR&<0 OR ADDR~~>30 THEN PRINT "Bad entry." ~ GOTO 170
190
INPUT "Enter the printer port ? (1/LPT1 2/LPT2;) ",N%\
200
IF N%<>1 OR N%<>2 TuEN PRINT "Bad entry.' . GOTO 19
220
'
230
'Setting the IEEE-488 printer
250
CALL DEVICE%(ADDR%,N%)
260
PRINT
270
PRINT "IEEE-488 printer is ready to use."
290
'
300
'Check the IEEE-488 printer function
320
PRINT
330
INPUT "Send string to printer ? (Y/N) ",Y$
340
IF Y$<>"y" AND Y$<>"Y" THEN END
350
LINE INPUT "Enter the string : ";D$
360
LPRINT D$
370
GOTO 320
380
'
390
END
CHAPTER 4 PROGRAMMING TECBNIQUES
-
43

Advertisement

loading