[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
output redirection
- Subject: output redirection
- From: William Katz <druid@dorsai.org>
- Date: 11 Sep 2001 05:54:05 GMT
- Newsgroups: comp.sys.apple2
- Organization: The Dorsai Embassy - best in NY
- User-agent: tin/1.5.9-20010723 ("Chord of Souls") (UNIX) (SunOS/5.6 (sun4m))
- Xref: archiver1.google.com comp.sys.apple2:13191
Does anyone know if I can redirect output, from ProDOS AppleSoft BASIC for
example, to a file or serial port?
What I want to do is send the output of a "catalog" command to either a
file, or my Apple Super Serial Card serial port.
I tried the following unsuccessfully:
At the basic prompt, I typed "pr#2", then typed "catalog". On my m$-dos
computer, I only saw garbage characters on the screen. I have the two
computers connected via null-modem, and use Telix on the m$-dos side set
at 9600 or 19200 bps, and 8N1, with XON/XOFF set on. The connection works
just fine, as I have transfered many files between the two computers this
way (using ProTERM 3.1 on the //e side). In ProTERM, is there any way to
send a disk "catalog" to the editor, or directly to the 'modem'?
I also tried using Copy II+ 9.1, and set my printer slot to 2. Again,
only garbage characters on the other computer.
I'm guessing that a simple AppleSoft BASIC program can write output to a
file? Something like:
10 d$=chr$(4): print d$;"pr#3"
20 print d$;"create catalog.txt,ttxt"
30 print d$;"open catalog.txt"
40 print d$;"catalog,s6,d1"
50 print d$;"write catalog.txt"
60 print d$;"close catalog.txt"
70 end
It's been a while since I used basic, so excuse any errors in the above
attempt.
It would be nice if ProDOS had the built in ability to do command
redirection, such as "command > file.txt". I know redirecting to the
printer is pretty easy, via "pr#1", typing in your commands, followed by a
"pr#0".
Anyway, TIA for any help.
--
William D. Katz "a good skier"
Internet: druid@dorsai.org
Internet: wkatz@nyx.net