[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: output redirection
- Subject: Re: output redirection
- From: mjmahon@aol.com (Michael J. Mahon)
- Date: 11 Sep 2001 08:00:06 GMT
- Newsgroups: comp.sys.apple2
- Organization: AOL http://www.aol.com
- References: <o6in7.172764$oh1.75167001@news2.rdc2.tx.home.com>
- Xref: archiver1.google.com comp.sys.apple2:13195
Ken Tucker wrote:
>"William Katz" <druid@dorsai.org> wrote in message
>9nk8tt0170u@enews3.newsguy.com">news:9nk8tt0170u@enews3.newsguy.com...
>
>> 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 file://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, I have this exact same problem. When doing PR#2 (and using a null
>modem cable), I get garbage on my PC. It's character by character from the
>Apple, so I can tell it's sending the data, but I'm just seeing junk instead
>of the correct characters. I haven't had any luck going the other way either
>(ADT in particular). I suspect it's a bad cable on my end. But since you're
>able to transfer files...And get the garbage ... I'm at a loss. Maybe
>someone can help me here too. ;)
Apple text output is all "high-ASCII", meaning that the high bit is set.
On a PC, this is graphical gibberish. Also, at end-of-line, Apple sends
a (high-ASCII) CR, hex 8D, while a PC expects low-ASCII CR LF, or
hex 0D 0A.
-michael
Email: mjmahon@aol.com
Home page: http://members.aol.com/MJMahon/