Breaking News
Comments
Newest First | Oldest First | Threaded View
<<   <   Page 2 / 8   >   >>
Stargzer
User Rank
CEO
Re: Carriage-return Linefeed
Stargzer   2/7/2014 4:09:37 PM
NO RATINGS
@Wilton.Helm:  "... is why we have CR and LF in text files on MS to this day.  Contrast that with Linux (and default C behavior) where only the LF mattered, and we've been fighting conflicting standards for many years."

Wikipedia's Newline article has more information, including which systems used CR, LF or CRLF for a new line.  IBM mainframe EBCDIC code had a Newline (NL) in addition to CR and LF, but then, that's not ASCII.  In addition to Windows, some DEC systems and "... and most other early non-Unix and non-IBM OSes ..." used CRLF.

Also remember that on a TTY, the computer always sent CRCRLF (2CRs) to make sure the type head had enought time to return to the left before starting again.  An LF somewhere in the middle of the line would roll the platen up one line without moving the type head and resume printing from that position.  I think I mentioned it before, but there was a Star Trek game n BASIC that would go to the end of the line and do a Line Feed and then as it returned it would print a character in the middle of the blank line (I think it was the "A"), then start spacing over and printing the rest of the letters "S T   R   T R E K", spacing over the "A" that was already on the line.  A programmer showing off his knowledge of the hardware!

The CR without a LF was also used during logons, where the computer would do a CR without an LF while printing several lines of garbage, overprinting each other so no one could see what was typed.

"You have to understand how a starship works."
  Captain Kirk, "Star Trek: The Wrath Of Khan"

Max The Magnificent
User Rank
Blogger
Re: Carriage-return Linefeed
Max The Magnificent   2/5/2014 1:28:22 PM
NO RATINGS
@Wilton: The line feed key is just left of the Return key.

I'm kicking myself that I didn't think to look!!!

Wilton.Helm
User Rank
Rookie
Re: Carriage-return Linefeed
Wilton.Helm   2/5/2014 12:27:17 PM
NO RATINGS
Just for curiosity, I googled ASR-33 and pulled up a photo.  The line feed key is just left of the Return key.  Neither is large or special shaped, like we are used to on keyboards today (or even typewrites of the past).  Just one more round key to press.  It wasn't easy typing on those things.  The touch left a bit to be desired.

Often when connected to a computer, when the computer saw a CR it responded with CR and LF, so pressing LF was not necessary.  I did work on one OS (the HP OS that we ran Fortran and Assembly on) that expected just a LF and returned CR and LF.

The ASR-33 (and the original ASCII definition, which it followed)  is why we have CR and LF in text files on MS to this day.  Contrast that with Linux (and default C behavior) where only the LF mattered, and we've been fighting conflicting standards for many years.

Wilton

Max The Magnificent
User Rank
Blogger
Re: Carriage-return Linefeed
Max The Magnificent   2/5/2014 9:53:47 AM
NO RATINGS
@Wilton.Helm: No there should not be a line feed when you manually hit return

Interesting -- I'm working from home today, but when I get back to my office tomorrow I will look for a LF key

 

zeeglen
User Rank
Blogger
Re: Carriage-return Linefeed
zeeglen   2/4/2014 3:24:34 PM
NO RATINGS
@ Wilton.Helm   though that CR on an ASR33 is not supposed to roll the paper, only move the carrier to the left margin

IIRC the Model 19 (5 level Baudot) also had separate charcters for carriage return and paper roll.  The carriage was a massive affair with type bars, and the shift between letters/numbers caused the entire carriage to bump up and down.  A paper tape with repeating shift/unshift codes was the basis for a rather naughty joke...


Wilton.Helm
User Rank
Rookie
Re: Carriage-return Linefeed
Wilton.Helm   2/4/2014 2:18:26 PM
NO RATINGS
You are correct.  I was thinking decimal 13 and wrote hex 13.  0x0D is indeed CR.  The point still is, though that CR on an ASR33 is not supposed to roll the paper, only move the carrier to the left margin

betajet
User Rank
CEO
Re: Carriage-return Linefeed
betajet   2/4/2014 2:14:05 PM
NO RATINGS
< pendantry >

Carriage return is 13 decimal or 0x0D.  0x13 is control-S or DC3, which stops the paper tape reader.  Control-Q or DC1 starts the paper tape reader.  This is one of the "automatic" parts of ASR.

< /pendantry >

Wilton.Helm
User Rank
Rookie
Re: Carriage-return Linefeed
Wilton.Helm   2/4/2014 1:41:39 PM
NO RATINGS
No there should not be a line feed when you manually hit return.  The ASR uses 0x13 to move the carriage left, nothing else. It uses 0x0A to roll the paper up, nothing else.  I have forgotten if there is a LF key on the keyboard, but if there isn't , CTRL-J does it.  Like David I spend a lot of hours on an ASR-33 connected to a HP 2000 E basic interpreter on an HP 2100 A mini.

Stargzer
User Rank
CEO
Re: Carriage-return Linefeed
Stargzer   1/23/2014 12:34:25 PM
NO RATINGS
@Mr. Contractor:  "I remember a manual paper tape reader that me and Don Harrison hard wired it into an original IMSAI computer as we were tired with the teletype's 110 baud slow rate. We were amazed when we manally loaded the program and then started pulling the tape through the reader and the data appeared on the screen. The data was read by photocells under the tape and since the feedhole was smaller it was used to clock the data into the computer."

An IMSAI!  When you say manual, you mean it wasn't from an ASR, right?  I remember a BYTE Magazine article about making a tape reader with photocells, includine one to read the feed hole and use it for clocking in the data.  Kind of a combined start- and stop-bit!

Speaking of the slow data rate of the TTY, I remember one December when I worked at the Social Security Administration.  At that time a lot of our traffice went out over  a GSA TTY network that was also shared with other agencies (our online system with cluster controllers was only a year old then).  Someone had sent out a "MERRY CHRISTMAS AND HAPPY NEW YEAR!" message via paper tape, complete with ASCII art, that must have taken six or eight feet of paper to print out.  They sent it with the All Points Routing Indicator in the header, sending it not just to all SSA stations (of which there were very many), but to ALL stations on the network.  It took hours and hours for GSA to chase down and kill the traffic on the various relay points.  I don't know what happened to the hapless operator who did that!

Let's do the math!  At a conservative exstimate of 75 characters per line (72 characters per line (the usual for most TTYs) + 2 CR + 1 LF) × 6 lines per inch × 12 inches per foot × 6 feet (conservative) = 32,400 characters.  At 10 characters per second (110 bps / 11 bits per character) and 60 seconds per minutes, that's 54 minutes!  Eight feet would be another 18 minutes.  That's one LMF message, to say nothing of the cost to send it!

 

Mr. Contractor
User Rank
Rookie
Re: Carriage-return Linefeed
Mr. Contractor   1/17/2014 1:42:41 PM
NO RATINGS
STAR was dead on with the dashpot... it gets dirty with paper dust, oil from the mechanisms, and oily chad which gets everywhere.

This simplified shock absorber gets out of alignment due to the constant
slamming of the printhead back to the left side for every RETURN.

I think 2 screws on top of the cup mounted on the frame get loose and
you simply need to align it so the DASH plunger slids in freely... also adjust the
sliding handle thats over the vent hole on the right so you hear that nice
PHISSHH sound after every RETURN.

I remember a manual paper tape reader that me and Don Harrison hard wired it
into an original IMSAI computer as we were tired with the teletype's 110 baud slow rate.
We were amazed when we manally loaded the program and then started pulling the tape through the reader and the data appeared on the screen. The data was read by photocells under the tape and since the feedhole was smaller it was used to clock the data into the computer.

And yes, my ASR still works but is in the attic  and the EX got it along with the house...

 

<<   <   Page 2 / 8   >   >>


EE Life
Frankenstein's Fix, Teardowns, Sideshows, Design Contests, Reader Content & More
Max Maxfield

Feast Your Orbs on My Jiggly Exercise Machine
Max Maxfield
46 comments
Last weekend, I was chatting with my mother on the phone. She's all excited that I'm coming over to visit for a week in November. "I'll be seeing you in only seven weeks," she trilled ...

Glen Chenier

Missing Datasheet Details Can Cause Problems
Glen Chenier
3 comments
It is often said that "the devil is in the details." All too often those details are hidden deep within a datasheet, where you can easily overlook them. When a datasheet reference circuit ...

David Blaza

RadioShack: The End Is Nigh!
David Blaza
120 comments
I'm feeling a little nostalgic today as I read about what looks like the imminent demise of RadioShack, at least as we currently know it. An old ubiquitous cartoon image popped into my ...

Larry Desjardin

Engineers Should Study Finance: 5 Reasons Why
Larry Desjardin
46 comments
I'm a big proponent of engineers learning financial basics. Why? Because engineers are making decisions all the time, in multiple ways. Having a good financial understanding guides these ...

Flash Poll
Top Comments of the Week
Like Us on Facebook
EE Times on Twitter
EE Times Twitter Feed

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)