Date : Sun, 09 Jun 2013 16:16:44 +0100
From : jgh@... (J.G.Harston)
Subject: Acorn newline sequence
Stephen Harris wrote:
>> Does anybody have any ideas why Acorn ended up with their newline
>> sequence of <10><13> instead of <13><10> as used everywhere else in
>> the world?
>
> "everywhere" ? Unix uses <13> and had done since the early 70s.
I specifically said "newline", not "end-of-line". Acorn's end-of-line
sequence is a <10><13> newline. Unix's end-of-line sequence is a single
<10>. Apple's end-of-line sequence is a single <13>. CP/M's and DOS's
end-of-line sequence is a <13><10> newline.
> maybe Acorn picked it just for perversity ;-)
Or accident. :) Somebody coded OSASCI, OSNEWL and OSWRCH in an early
System ROM and it's stayed that way around ever since.
Though, looking at the System/Atom MOS entries, it runs:
OSRDCH JMP (RDCHV) ; Read a character
OSECHO JSR OSRDCH ; Read character and echo
OSASCI CMP @#0D ; Write ASCII sequence
BNE OSWRCH
OSCRLF LDA @#0A ; Write LF-CR Newline sequence
JSR OSWRCH
OSWRCR LDA @#0D ; Write CR
OSWRCH JMP (WRCVEC) ; Write a character
So, having the newline sequence the other way around would mean that
OSECHO couldn't just run on into OSASCI like that.
> It does, however, match close to what happens on a manual typewriter;
> a tap of lever does a linefeed; a push of the lever does a linefeed
> and
> then starts to return the carriage to the start point.
With my manual typewriter when you push the newline lever across from
the right to the left it moves the carriage across, and then at the
maximum extent it engages the cogs to move the drum up one line. So,
<cr><lf> (<13><10>).
--
J.G.Harston - jgh@... - mdfs.net