home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
PRINTING
/
DMPLAS11.ZIP
/
DLTEST-5.BAS
< prev
next >
Wrap
BASIC Source File
|
1991-08-15
|
3KB
|
52 lines
10 FILE$="DLTEST-5.PRN"
20 PRINT CRLF$:PRINT " Creating ";FILE$;" - Please wait ";
30 OPEN "O",#1,FILE$
40 CR$=CHR$(13) :LF$=CHR$(10) :CRLF$=CR$+LF$ :ESC$=CHR$(27)
50 UNDON$=ESC$+"-1" :UNDOFF$=ESC$+"-0"
60 R$="L...5....1....5....2....5....3....5....4....5....5....5....6....5....7....5....8"
70 S$="L...5....1....5....2....5....3....5....4....5....5....5....6....5....7....5....8....5....9....5....0....5....1....5....2....5....3....5."
80 GOTO 120
90 PRINT#1,ESC$;"f";CHR$(0);CHR$(C);"[ESC 'f' 0";C;"]": RETURN
100 PRINT#1,ESC$;"$";CHR$(N1);CHR$(N2);"[ESC '$'";N1;N2;"]": RETURN
110 PRINT#1,ESC$;"\";CHR$(N1);CHR$(N2);"[ESC '\'";N1;N2;"]";: RETURN
120 PRINT#1,ESC$;"@";LF$;LF$;LF$;"We start printing on Line 3 by sending 3 'LF'commands, then went to Line 10"
130 PRINT#1,CR$;ESC$;"f";CHR$(1);CHR$(6);"Got to Line 10 with CR + ESC 'f' 1 6";
140 PRINT#1,ESC$;LF$;"Jumped up to line 9 with ESC LF";
150 PRINT#1,CR$;ESC$;"J";CHR$(108);"And then got to the beginning of Line 12 with CR + ESC 'J' 108"
160 PRINT#1,"NOTE: The default line spacing of 6 lpi has not been changed"
170 PRINT#1,"so these lines have been normally spaced";CRLF$
180 PRINT#1,ESC$;"0";UNDON$;"ESC 'f' 0 n sets Print Position to Column n";UNDOFF$;CRLF$
190 PRINT#1,R$
200 FOR C=0 TO 60 STEP 20 :GOSUB 90 :NEXT C
210 PRINT#1,CRLF$;
220 PRINT#1,CHR$(15);S$
230 FOR C=0 TO 60 STEP 20 :GOSUB 90 :NEXT C
240 PRINT#1,CRLF$
250 PRINT#1,CHR$(18);UNDON$;"ESC '$' n1 n2 sets Absolute Horizontal Position (60 units = 1 inch)";UNDOFF$;CRLF$
260 PRINT#1,R$
270 N2=0:FOR N1=0 TO 240 STEP 60 :GOSUB 100 :NEXT N1
280 N2=1:N1=44:GOSUB 100:N1=104:GOSUB 100
290 PRINT#1,CRLF$;
300 PRINT#1,CHR$(15);S$
310 N2=0:FOR N1=0 TO 240 STEP 60 :GOSUB 100 :NEXT N1
320 N2=1:N1=44:GOSUB 100:N1=104:GOSUB 100
330 PRINT#1,CRLF$
340 PRINT#1,CHR$(18)
350 PRINT#1,CHR$(18);UNDON$;"ESC '\' n1 n2 sets Relative Horizontal Position (120 units = 1 inch)";UNDOFF$;CRLF$
360 PRINT#1,R$
370 PRINT#1,"L";:N2=0:N1=30: FOR I=1 TO 4 :GOSUB 110 :NEXT I
380 PRINT#1,CRLF$
390 PRINT#1,CHR$(15);S$
400 PRINT#1,"L";:N2=0:N1=30: FOR I=1 TO 5 :GOSUB 110 :NEXT I
410 PRINT#1,CRLF$
420 PRINT#1,CHR$(18)
430 PRINT#1,ESC$;"2";"See your printer manual for details of calculating unit counts";CRLF$
440 PRINT#1,"Now we go to the top of the page with ESC FF to print the title";CRLF$
450 PRINT#1,ESC$;CHR$(12);CR$;" DLTEST-5 Vertical and Horizontal Movement Commands (this is Line 0)"
460 PRINT#1,ESC$;"f";CHR$(1);CHR$(54);"From there we came to Line 55 with ESC 'f' 1 54 to print these lines"
470 PRINT#1,"And then sent a plain FF to do a normal formfeed to finish up";
480 PRINT#1, CHR$(12);ESC$;"@";
490 CLOSE #1
500 SYSTEM
510 END