Small bug in GForth.050 for DOS 
Author Message
 Small bug in GForth.050 for DOS

Small bug in newline in DOS version of GForth.050

Newline has only LF in it instead of CR+LF

This is true even after a make

Bruce



Mon, 14 Apr 2003 12:21:37 GMT  
 Small bug in GForth.050 for DOS


Quote:
>Small bug in newline in DOS version of GForth.050

>Newline has only LF in it instead of CR+LF

>This is true even after a make

Thanks.  Looks like DJGPP thinks it's Unix:-)

- anton
--
M. Anton Ertl                    Some things have to be seen to be believed

http://www.complang.tuwien.ac.at/anton/home.html



Tue, 15 Apr 2003 18:12:27 GMT  
 Small bug in GForth.050 for DOS

Quote:


>>Small bug in newline in DOS version of GForth.050

>>Newline has only LF in it instead of CR+LF

>>This is true even after a make

>Thanks.  Looks like DJGPP thinks it's Unix:-)

>- anton

Although my distaste for Dos et al is absolute, CRLF is one Dos
got right and UNIX got wrong.

Rick Hohensee

Quote:
>--
>M. Anton Ertl                    Some things have to be seen to be believed

>http://www.complang.tuwien.ac.at/anton/home.html



Fri, 18 Apr 2003 02:20:48 GMT  
 Small bug in GForth.050 for DOS

Quote:




> >>Small bug in newline in DOS version of GForth.050

> >>Newline has only LF in it instead of CR+LF

> >>This is true even after a make

> >Thanks.  Looks like DJGPP thinks it's Unix:-)

> >- anton

> Although my distaste for Dos et al is absolute, CRLF is one Dos
> got right and UNIX got wrong.

> Rick Hohensee

> >--
> >M. Anton Ertl                    Some things have to be seen to be believed

> >http://www.complang.tuwien.ac.at/anton/home.html

Back when my UNIX disk was 10 Mb -- recently up from 5 -- and the whole
spelling dictionary was cleverly compressed into a 64 K hash table and a
64K exception list, the saving of room might have been justified. Now
it's a matter of being bound to backward compatibility.

Jerry
--
Engineering is the art of making what you want from things you can get.
-----------------------------------------------------------------------



Fri, 18 Apr 2003 02:34:05 GMT  
 Small bug in GForth.050 for DOS

Quote:



>>>Small bug in newline in DOS version of GForth.050

>>>Newline has only LF in it instead of CR+LF

>>>This is true even after a make

>>Thanks.  Looks like DJGPP thinks it's Unix:-)

>>- anton

>Although my distaste for Dos et al is absolute, CRLF is one Dos
>got right and UNIX got wrong.

Personally I think they *both* got it wrong and the Mac got it right
with just a CR.

From the ASCII Standard info I have here:

ASCII Char CR   Control M  Decimal 12  Hex 0D   Carriage Return    <--

A format effector that controls the movement of the printing position to the
first printing postion on the same printing line.  In some cases, the CR will
incorporate an automatic line feed (LF) as either a default or an option. This
feature, called a New Line (NL), is used to make computer keyboards more like
those of typewriters.

AFAIK this is from X3.4-1977

I wish we could all agree on one method - I use Linux, Mac and DOS and I'm
forever having to convert documents ;-(
--
Cheers,

The future was never like this!



Fri, 18 Apr 2003 15:03:33 GMT  
 Small bug in GForth.050 for DOS

Quote:




>>>>Small bug in newline in DOS version of GForth.050

>>>>Newline has only LF in it instead of CR+LF

>>>>This is true even after a make

>>>Thanks.  Looks like DJGPP thinks it's Unix:-)

>>>- anton

>>Although my distaste for Dos et al is absolute, CRLF is one Dos
>>got right and UNIX got wrong.

I disagree. If CR is handled as CRLF you lose a lot of control by not
having a CR anymore. Or if LF is overloaded, etc.
"Factor factor factor."

Quote:
>Personally I think they *both* got it wrong and the Mac got it right
>with just a CR.

>From the ASCII Standard info I have here:

>ASCII Char CR   Control M  Decimal 12  Hex 0D   Carriage Return    <--

>A format effector that controls the movement of the printing position to the
>first printing postion on the same printing line.  In some cases, the CR will

                        ^^^^^^^^^^^^^^^^^^^^^^^^^

Quote:
>incorporate an automatic line feed (LF) as either a default or an option. This
>feature, called a New Line (NL), is used to make computer keyboards more like
>those of typewriters.

I don't see how it does that. I suspect UNIX is that way (LF = CRLF) for
some implementation shortcut.

Quote:

>AFAIK this is from X3.4-1977

>I wish we could all agree on one method - I use Linux, Mac and DOS and I'm
>forever having to convert documents ;-(
>--
>Cheers,

>The future was never like this!

Rick


Sat, 19 Apr 2003 10:25:19 GMT  
 Small bug in GForth.050 for DOS

Quote:

[snip]

>>A format effector that controls the movement of the printing position to the
>>first printing postion on the same printing line.  In some cases, the CR will
>                    ^^^^^^^^^^^^^^^^^^^^^^^^^

[snip]

Quote:
>I don't see how it does that. I suspect UNIX is that way (LF = CRLF) for
>some implementation shortcut.

It's a hangover from old mechanical printing devices and typewriters.
The only use I can see with computer printers is for overstriking.
I was hoping they would take the opportunity to tidy all this up, and give
the control characters names that made more sense with computers, when they
agreed Unicode.  But they left us with the same old mess ;-(

When did you last use anything with a Carriage to Return?

--
Cheers,

The future was never like this!



Sat, 19 Apr 2003 22:44:04 GMT  
 Small bug in GForth.050 for DOS

Quote:

> I disagree. If CR is handled as CRLF you lose a lot of control by not
> having a CR anymore. Or if LF is overloaded, etc.
> "Factor factor factor."

> >Personally I think they *both* got it wrong and the Mac got it right
> >with just a CR.

> >From the ASCII Standard info I have here:

> >ASCII Char CR   Control M  Decimal 12  Hex 0D   Carriage Return    <--

> >A format effector that controls the movement of the printing position to the
> >first printing postion on the same printing line.  In some cases, the CR will
>                         ^^^^^^^^^^^^^^^^^^^^^^^^^

> >incorporate an automatic line feed (LF) as either a default or an option. This
> >feature, called a New Line (NL), is used to make computer keyboards more like
> >those of typewriters.

> I don't see how it does that. I suspect UNIX is that way (LF = CRLF) for
> some implementation shortcut.

> >AFAIK this is from X3.4-1977

> >I wish we could all agree on one method - I use Linux, Mac and DOS and I'm
> >forever having to convert documents ;-(

ASR33's (one of the most common teletypes around some years ago and
wonderful machines) would expect a CR character then LF character to
be issued down the line. You issued the CR character first so that you
gave the apprpriate amount of time for the carriage to physically return
to the beginning of a line. LF actions would be taking place whilst the
carriage was still on the fly with bot CR and LF completing by the time
the carriage had returned.

By writing programmes that deliberately did not issue LF you could over
print some lines and, with an apprpriate pattern of characters, you could
get some quite brilliant pictures (original ASCII art).

The meanings of the character codes are clear and you only have to ensure
that both ends of the link use the same notions to effect good
communications.

--
********************************************************************

Forth based HIDECS Consultancy .....<http://www.amleth.demon.co.uk/>
Mob: +44 (0)7811-639972 .........NOW AVAILABLE:- HIDECS COURSE......
Tel: +44 (0)1235-814586 .... see http://www.feabhas.com for details.
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************



Sat, 19 Apr 2003 17:05:04 GMT  
 Small bug in GForth.050 for DOS

Quote:


> > I disagree. If CR is handled as CRLF you lose a lot of control by not
> > having a CR anymore. Or if LF is overloaded, etc.
> > "Factor factor factor."

> > >Personally I think they *both* got it wrong and the Mac got it right
> > >with just a CR.

> > >From the ASCII Standard info I have here:

> > >ASCII Char CR   Control M  Decimal 12  Hex 0D   Carriage Return    <--

> > >A format effector that controls the movement of the printing position to the
> > >first printing postion on the same printing line.  In some cases, the CR will
> >                         ^^^^^^^^^^^^^^^^^^^^^^^^^

> > >incorporate an automatic line feed (LF) as either a default or an option. This
> > >feature, called a New Line (NL), is used to make computer keyboards more like
> > >those of typewriters.

> > I don't see how it does that. I suspect UNIX is that way (LF = CRLF) for
> > some implementation shortcut.

> > >AFAIK this is from X3.4-1977

> > >I wish we could all agree on one method - I use Linux, Mac and DOS and I'm
> > >forever having to convert documents ;-(

> ASR33's (one of the most common teletypes around some years ago and
> wonderful machines) would expect a CR character then LF character to
> be issued down the line. You issued the CR character first so that you
> gave the apprpriate amount of time for the carriage to physically return
> to the beginning of a line. LF actions would be taking place whilst the
> carriage was still on the fly with bot CR and LF completing by the time
> the carriage had returned.

The spec called for three character times to allow the carriage to
return from a full line; The usual sequence was CR, LF, DEL. DEL, being
0xFF, is effectively a character-long BREAK, and allows time for
recovery from framing errors. Usually, at most part of one line was ever
garbled, except when a "clever" operator replaced DEL with NUL to avoid
weakening the tape on an ASR.

Quote:

> By writing programmes that deliberately did not issue LF you could over
> print some lines and, with an apprpriate pattern of characters, you could
> get some quite brilliant pictures (original ASCII art).

Dot-matrix and daisy-wheel printers can overstrike. Flexowriters, being
modified office typewriters, could not.

Quote:

> The meanings of the character codes are clear and you only have to ensure
> that both ends of the link use the same notions to effect good
> communications.

> --
> ********************************************************************

> Forth based HIDECS Consultancy .....<http://www.amleth.demon.co.uk/>
> Mob: +44 (0)7811-639972 .........NOW AVAILABLE:- HIDECS COURSE......
> Tel: +44 (0)1235-814586 .... see http://www.feabhas.com for details.
> Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
> ********************************************************************

Jerry
--
Engineering is the art of making what you want from things you can get.
-----------------------------------------------------------------------


Sun, 20 Apr 2003 07:58:16 GMT  
 Small bug in GForth.050 for DOS

Quote:



> [snip]

> >>A format effector that controls the movement of the printing position to the
> >>first printing postion on the same printing line.  In some cases, the CR will
> >                       ^^^^^^^^^^^^^^^^^^^^^^^^^

> [snip]

> >I don't see how it does that. I suspect UNIX is that way (LF = CRLF) for
> >some implementation shortcut.

> It's a hangover from old mechanical printing devices and typewriters.
> The only use I can see with computer printers is for overstriking.
> I was hoping they would take the opportunity to tidy all this up, and give
> the control characters names that made more sense with computers, when they
> agreed Unicode.  But they left us with the same old mess ;-(

> When did you last use anything with a Carriage to Return?

> --
> Cheers,

> The future was never like this!

About an hour ago. The printheads in my inkjet and dot-matrix printers
both ride on carriages. Even in the models 31 and 33 TeleTypes which
were the inspiration for this history lesson, it is the printhead,
rather than the paper, that rides the carriage. Only when the printing
device is the full width of the paper, as in laser and a few thermal and
electrostatic printers, can a carriage be dispensed with.

Jerry
--
Engineering is the art of making what you want from things you can get.
-----------------------------------------------------------------------



Sun, 20 Apr 2003 08:07:17 GMT  
 Small bug in GForth.050 for DOS

Quote:


>[snip]

>>>A format effector that controls the movement of the printing position to the
>>>first printing postion on the same printing line.  In some cases, the CR will
>>                        ^^^^^^^^^^^^^^^^^^^^^^^^^

>[snip]

>>I don't see how it does that. I suspect UNIX is that way (LF = CRLF) for
>>some implementation shortcut.

>It's a hangover from old mechanical printing devices and typewriters.
>The only use I can see with computer printers is for overstriking.

ncurses-like character graphics also.
Or for editing the line you just typed. That could be a useful mode, for
say working on a commandline repetitively, which I do quit often by other
means.

Quote:
>I was hoping they would take the opportunity to tidy all this up, and give
>the control characters names that made more sense with computers, when they
>agreed Unicode.  But they left us with the same old mess ;-(

>When did you last use anything with a Carriage to Return?

Last night. My dot-matrix printer.

Quote:

>--
>Cheers,

>The future was never like this!

Rick


Sun, 20 Apr 2003 10:54:56 GMT  
 Small bug in GForth.050 for DOS

Quote:

>>When did you last use anything with a Carriage to Return?

>Last night. My dot-matrix printer.

>Rick

Actually about 20 years ago before I got a computer and was still using a
typewriter. The carriage held the platten (roller) that held and moved the
paper, the print 'head' remained stationary. Near the end of the line a bell
sounded a warning. You then grabbed a lever thingy at the left end of the
carriage which ratcheted the platten one line up and pulled the carriage to
the right to start the newline. Therefore, a carriage return would also do a
linefeed.

You could also do linefeeds only by turning a knob at the end of the
platten.

Why the Standards Committee never thought to have a separate Newline code I
don't understand. Instead they just copied the teletype control codes and
left it at that.

Walter Rottenkolber



Sun, 20 Apr 2003 12:58:43 GMT  
 Small bug in GForth.050 for DOS

Quote:

>>When did you last use anything with a Carriage to Return?

>Last night. My dot-matrix printer.

Actually, the carriage was the thing with a {*filter*} roller and knob on the end
that held the paper in a typewriter and pre golf-ball printers -  but I see
what you mean ;-)

--
Cheers,

The future was never like this!



Sun, 20 Apr 2003 22:38:50 GMT  
 Small bug in GForth.050 for DOS
On Tue, 31 Oct 2000 20:58:43 -0800,

Quote:

>Why the Standards Committee never thought to have a separate Newline code I
>don't understand.

I think that was the idea behind specifying that CR could perform an
optional LF.  They did say "This feature, called a New Line (NL)...".
A new code would have been better though.

Quote:
>Instead they just copied the teletype control codes and
>left it at that.

Agreed.  The Standard has a lot of useful control characters that seem to be
rarely used though. Such as Shift Out, (Hex 0E) which indicates that the
following codes are not ASCII, terminated with Shift In (Hex 0F), and a whole
group of information separators.

I still think it's a pity they didn't update it all in the Unicode standard.
--
Cheers,

The future was never like this!



Sun, 20 Apr 2003 22:38:52 GMT  
 Small bug in GForth.050 for DOS

Quote:



>> [snip]

>> >>A format effector that controls the movement of the printing position to the
>> >>first printing postion on the same printing line.  In some cases, the CR will
>> >                       ^^^^^^^^^^^^^^^^^^^^^^^^^

>> [snip]

>> >I don't see how it does that. I suspect UNIX is that way (LF = CRLF) for
>> >some implementation shortcut.

>> It's a hangover from old mechanical printing devices and typewriters.
>> The only use I can see with computer printers is for overstriking.
>> I was hoping they would take the opportunity to tidy all this up, and give
>> the control characters names that made more sense with computers, when they
>> agreed Unicode.  But they left us with the same old mess ;-(

>> When did you last use anything with a Carriage to Return?

>> --
>> Cheers,

>> The future was never like this!

>About an hour ago. The printheads in my inkjet and dot-matrix printers
>both ride on carriages. Even in the models 31 and 33 TeleTypes which
>were the inspiration for this history lesson, it is the printhead,
>rather than the paper, that rides the carriage. Only when the printing
>device is the full width of the paper, as in laser and a few thermal and
>electrostatic printers, can a carriage be dispensed with.

>Jerry

Or a line printer.

I used a line printer for the tty of a Forth a few months back. That was
some fun retro-computing. This wasn't as retro as the Dos utility I was
investigating that was using the printer as a dongle, basically, and
making an awesome printer pitiful in the process. This mailing list
printing product was slowing the printer down by an order of magnitude.

Rick

- Show quoted text -

Quote:
>--
>Engineering is the art of making what you want from things you can get.
>-----------------------------------------------------------------------



Mon, 21 Apr 2003 01:56:26 GMT  
 
 [ 29 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Small DOS eForth bug

2. CRC-32 native code for DOS GForth 0.5.0

3. EKEY in gforth in DOS

4. Compiling Gforth for DOS; long

5. GForth for DOS -- HTML documentation

6. Low-Level I/O Primitives for GFORTH (for DOS)

7. Gforth, DOS and Win32 ports, Call for Volunteers

8. GForth for DOS

9. How to clear screen in Gforth Dos

10. Howto: 8M for GForth in DOS

11. gforth for MS-DOS

12. A blocks bug in GForth

 

 
Powered by phpBB® Forum Software