Msg: 234 *Conference*
07-13-91 10:12:09
From: RICHARD HANSON
To : JOHN RUSSO
Subj: REPLY TO MSG #230 (TS-DOS QUESTION)
John: Yes, there are a couple of ways to dump .DO file data directly to disk (TPDD or TPDD2) from within a running BASIC program, when you have TS-DOS on ROM or disk. Here's some ideas: The very first thing you need to do is turn your DOS ON, thus enabling the disk access code in TS-DOS to remain resident. This will enable direct disk access from within BASIC and TEXT. Once the DOS is turned ON, BASIC programs need only have a 0: placed in front of any open command to access the TPDD. This makes it very simple. Here's an example of collecting data in real time and dumping it directly to a file named STUFF.DO on disk: 10 MAXFILES=1 20 OPEN"0:stuff.do"FOROUTPUTAS1 30 CLS:LINEINPUT "Enter Data: ",A$ 40 PRINT#1,A$:CLS:PRINT@130"Got it...!" 50 CLS:PRINT@125,"Any key to continue, ESC to end..." 60 Z$=INKEY$:IFZ$=""THEN60 70 IFZ$=CHR$(27)THENCLOSE:MENUELSEGOTO30 Here's an example of taking a pre-existing data file named STUFF.DO and dumping it to disk. 10 MAXFILES=2 20 PRINT@130,"Uno momento..." 30 OPEN"stuff.do"FORINPUTAS1 40 OPEN"0:stuff.do"FOROUTPUTAS2 50 IFEOF(1)THENCLOSE:MENU 60 LINEINPUT#1,A$ 70 PRINT#2,A$; 80 GOTO50 There might be a few bugs in the above programs as I have not tested them, just wrote them off the top of my head. They should work. Let me know if this is what you had in mind. -Rick-