Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!princeton!udel!rochester!cornell!uw-beaver!mit-eddie!ll-xn!ames!pasteur!ucbvax!UCONNVM.BITNET!SEWALL
From: SEWALL@UCONNVM.BITNET.UUCP
Newsgroups: comp.sys.apple
Subject: Re: help for xmodem and text files
Message-ID: <8806031853.aa02836@SMOKE.BRL.ARPA>
Date: 3 Jun 88 18:05:03 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The Internet
Lines: 55
Posted: Fri Jun  3 14:05:03 1988

> What is the standard for xmodem and end of line for text files.
>Should xmodem translate cr <-> cr & lf for text files or what???????

XModem is even older than Apple; it originated in CP/M (somewhere
I've the phone number of the World's oldest BBS - Ward Christensen's
"Ward Board" in Chicago in continuous operation since February 1977
AND oddly enough, it's messages only with NO file transfer).  XModem
doesn't know the difference between text and binary file types, much
less Applesoft.  It's strictly an 8-bit transfer of whatever the file
contains.

Some of the problems:

While it'll transfer a binary file just dandy, it
transfers NONE of the directory entry info with it (assumes the receiver
will provide for that somehow); no start address, no length, no nothing.
Enter Apple II Binary (tah, tah).  If XModem is used to transfer an
BNY file it will be stored with an (arbitrary) start address of $0000
(BLOADing one crashes Apples!) and, often as not, the receiving end will
assign it a file type of TXT.  That bothers BLU (or any of the other
BNY unpackers) not a whit.  In the end BNY permits XModem to transfer
any kind of (ProDOS anyway) file.  Even C64 BBS's can archive BNY files.

XModem transfer of text files (which really is what your question speaks
to) is another kettle of fish altogether.  From Apple 2 to Apple 2 no
problem.  However, from Apple to another micro-system can cause beaucoup
problems.  DOS 3.3 text files are stored with the high bit set (negative
ASCII); the rest of the micro world chooses to have the high bit cleared.
Most (not all) other systems want CR/LF instead of just CR as a record
delimiter.  Mainframes, by and large, prefer only CR (which also is Apple's
preference), and I'm told Amigas want only LF.

Apple DOS 3.3 to MS-DOS usually confuses the bbs software to the extent that
the file is stored in "Intel8088 binary" (or some such, I may have
misremembered the exact nomenclature).  MS-DOS wants the 8th bit cleared and
CR/LF.

There is at least one ProDOS utility that will add or strip LF after CR
(text files received by XModem from MS-DOS systems ALWAYS have CR/LF).
One of the nice features of SOFTERM is that it provides a "menu" of options
when XMODEM is envoked (a partial rendition of which is) -

Add LF after CR  N        Delete LF after CR  N
Change LF to CR  N        Change CR to LF     N
Set high bit     N        Clear high bit      N
File type        B
Start address    A$0000  

---------------------
Disclaimer: The "look and feel" of this message is exclusively MINE!
            (subject to change without notice; void where prohibited)

ARPA:   sewall%uconnvm.bitnet@mitvma.mit.edu       Murphy A. Sewall
BITNET: SEWALL@UCONNVM                          School of Business Admin.
UUCP:   ...ihnp4!psuvax1!UCONNVM.BITNET!SEWALL  University of Connecticut