Re: [cc65] Re: Questions for CBM guys

From: <silverdr1inet.com.pl>
Date: 2008-03-04 11:07:13
On 2008-03-04, at 02:25, Jonathan Graham Harston wrote:

> "Oliver Schmidt" wrote:
>> 1. What char code does place the cursor at the beginning of the next
>> line? This seems to be $0D.
>
> Most screen drivers do not have /a/ code to move to the beginning
> of the next line.
>
> 0D CR (Carriage Return) moves to the biginning of the current line
> 0A LF (Line Feed) moves the cursor to the current column of the
> next line.
>
> To move the beginning of the next line you need to send both
> codes, LF,CR or CR,LF.

If by "most systems" of "most screen drivers" you mean those coming  
from Microsoft and Co. then of course yes. In many other cases it is  
*NO*:

MSDOS	: $0d$0a
CBM	: $0d
Amiga	: $0a
Atari	: $9b
Unix	: $0a
Mac[*]	: $0d
etc...

[*] - Classic MacOS, OS X falls under Unix umbrella

While I very much agree that the approach used by Microsoft is the  
most logical (very big surprise - probably they bought it along with  
the DOS itself ;-) as CR and LF are in fact separate functions and  
treating them as such does make a lot of sense - still I can't agree  
that "most" systems or screen drivers use it that way.


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Mar 4 11:07:21 2008

This archive was generated by hypermail 2.1.8 : 2008-03-04 11:07:24 CET