[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Castle Adventure by David Malmberg
- Subject: Re: Castle Adventure by David Malmberg
- From: pausch@saaf.se (Paul Schlyter)
- Date: Tue, 13 Jul 2004 08:43:18 GMT
- Newsgroups: comp.sys.apple2
- Organization: Svensk Amat|rAstronomisk F|rening
- References: <ccqcrh$cib$6@chessie.cirr.com> <40F30AEF.75B89A84@swbell.net>
- Xref: g2news1.google.com comp.sys.apple2:2011
In article <40F30AEF.75B89A84@swbell.net>,
Rubywand <rubywand@swbell.net> wrote:
> Even so, the usual PC user will probably need to clean out chars added by
> PC -- like the linefeed char that gets added to CR to end lines (you have $0A
> and $0D instead of $0D). Bringing the Text into Appleworks should show any odd
> chars and automatically take care of the 0A0D --> 0D conversion when the file
> is saved as Text.
Actually, it's the other way around: the normal end-of-line in PC
text files is 0D0A, not 0A0D. Some PC software pukes at files with
the end-of-line sequence "backwards" (0A0D). However, an increasing
number of PC programs now ignore the 0D and then the order doesn't
matter, and there need not even be any 0D in the end-of-line marker.
Such software works fine on text files with the UNIX convention of
marking end-of-lines with a single 0A.
Windows inherited the 0D0A end-of-line sequence from MS-DOS, which
inherited it from CP/M-80, which inherited it from TOPS-20.
Btw what end-of-line sequence does the Mac OS/X use? If it follows the
Mac tradition an end-of-line ought to be a 0D, but if it follows the UNIX
tradition it ought to be 0A.
--------------------------------------------------------------------
The reason for these different conventions of representing an
end-of-line is that the ASCII character set lacks a representation
for "end-of-line". The closest it gets are the ASCII control
characters "Carriage Return" (0D) and "Line Feed" (0A). And to
start a new line on a printer which is controlled by the ASCII
control characters, you must send to the printer a 0D followed
by a 0A (or the other way around). If you just send 0D's to the
printer, all lines will overwrite one another, and if you just
send 0A's then the next line will start immediately below the END
of the previous line.
Old mainframe computers often used a different way to represent
end-of-lines: there were no end-of-line characters at all in the
text, instead end-of-lines were implicitly assumed at regular
intervals, usually every 80'th character. Lines shorter than 80
characters were padded with spaces, and lines longer than 80
characters either were truncated or wrapped onto the next line.
--
----------------------------------------------------------------
Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN
e-mail: pausch at stockholm dot bostream dot se
WWW: http://www.stjarnhimlen.se/
http://home.tiscali.se/pausch/