KEY OFF: CLS
PRINT " *************************************************************** "
PRINT " * CAPTURE.BAS * "
PRINT " * * "
PRINT " * Download a file using DTR and RTS Hardware Handshaking * "
PRINT " * Mimics a serial printer, except saves input to a disk file * "
PRINT " * Line settings are: COM1:1200,N,8,1 * "
PRINT " * use QBASIC (or GWBASIC /S:1024 /C:1024) * "
PRINT " *************************************************************** "
GOSUB 200:
GOSUB 300:
GOSUB 400:
GOSUB 500:
GOSUB 600:
GOSUB 1000:
GOSUB 1100:
END
INPUT "Enter the name of the file to capture: ",F$
INPUT "Add Ctrl-Z to the end of the file (Y/N) ",Z$
IF INSTR("YyNn", Z$) = 0 THEN 220
RETURN
OPEN F$ FOR OUTPUT AS #2
RETURN
OPEN "COM1:1200,N,8,1" FOR RANDOM AS #1 LEN = 1024
RETURN
PRINT
PRINT "You may now instruct the other computer to send " ;F$
PRINT "Press [ESC] to end the capture."
PRINT
RETURN
PAUSE = 0: C$ = ""
WHILE C$ <> CHR$(27)
IF EOF(1) THEN 710:
B = LOC(1):
IF B > 768 THEN GOSUB 800:
IF B < 256 AND PAUSE = 1 THEN GOSUB 900:
LN$ = INPUT$(LOC(1), #1):
PRINT LN$; :
PRINT #2, LN$; :
C$ = INKEY$:
WEND
RETURN
IF PAUSE = 1 THEN RETURN
OUT &H03FC, 0:
PAUSE = 1
RETURN
OUT &H03FC, 3:
PAUSE = 0
RETURN
CLOSE #1:
IF INSTR("Yy" ,Z$) <> 0 THEN PRINT #2, CHR$(26); :
CLOSE #2:
RETURN
PRINT
PRINT "*** Finished Capture ***"
RETURN
|