REGISTER | LOGIN
Breaking News
Comments
Newest First | Oldest First | Threaded View
<<   <   Page 4 / 8   >   >>
Flurmy
User Rank
Author
Scrap paper
Flurmy   1/13/2014 2:50:51 AM
NO RATINGS
betajet: in C you can write "y = x >= 0? x: -x;" which much nicer than Pascal.

Yuk! That's exactly what I try to avoid like hell.
As you said, chacun a son goût, but I think I'm in good company.
MISRA and alike strictly forbid mumbo jumbo like this.

If their program got into a loop (but not a hard Sys) and printed one character and a page feed continuously, well, there would be a pile of scrap paper.

I worked on a CDC6600 via punched cards and batch processing.
When, hours later, I went to pick up the result of my program I met a friend who told me: "Ha, ha, ha! Someone printed a pile of paper so high full of numbers! Ha, ha, ha!"
Surprise: someone was... me!
I mistakenly swapped the job control cards, putting the "load and run" before the "link" one. obviously the "program" crashed violating the memory fence and I got the dump of the whole memory in octal (each location was 60 bits, i.e. 20 octal digits)...

herbissimus
User Rank
Author
Re: scanner?
herbissimus   1/10/2014 8:56:30 PM
NO RATINGS
one only needs a single led and the array of photodetectors, just spread the light into a plane. the rows of holes passing by do the rest.

sorry, this was already suggested earlier. p.s. i have manuals and tty which has been resting unmaintained since 1977.

betajet
User Rank
Author
Re: PROGRAM
betajet   1/10/2014 7:55:20 PM
NO RATINGS
Thank you for contributing this week's dose of nostalgia.

Dr. Wirth intended Pascal as a language for teaching good programming practices.  I still think it's a terrific first programming language.  OTOH, Modula-2 was intended as a serious programming language.

Teaching a programming language isn't easy, particularly if you haven't mastered it.  Not understanding semicolons in Pascal is pretty lame.  A Pascal semicolon is a statement separator.  You put it between statements.  Thou shalt never place a semicolon in front of "else".  In contrast, a C semicolon is a statement terminator.  It also converts an expression like "x = 3" into a statement like "x = 3;"  Go ahead an put a semicolon in front of "else".  Go ahead and write "if (x >= 0) y = x; else y = -x;"  So what it it's ever so much uglier than "if x >= 0 then y:= x else y:= -x".  OTOH, in C you can write "y = x >= 0? x: -x;" which much nicer than Pascal.

While FORTH is something of a write-only language, it does make a nice intermediate language and is dirt simple.  But APL is the epitome of the write-only language.

Stargzer
User Rank
Author
Carriage-return Linefeed
Stargzer   1/10/2014 7:38:50 PM
NO RATINGS

@MAX:  "Although the paper tape reader appears to work fine, the carriage-return / line-feed needs some attention."

If it's a problem when the print head returns to the left, there is an adjustment.

Under the lid, on the left side, where the print head returns, is a cylinder call the dash-pot.  The print head has a sort of a piston with a rubber ring (or something) that is supposed to go into the cylnder.  A lever on the outside head of the cylinder can be moved over a hole in the end of the cylinder to set the amount of air allowed to escape and fine-tune the cushioning effect.  As I recall there are a couple of screws on top to loosen and adjust the cylinder.  You'll get a nice little "pop" sound when it's adjusted correctly.  I had to do that on an ASR-33 when I had a part-time job teaching programming to 4th, 5th, and 6th graders back in 1973-1974.

If it's not returning, I'm not sure what the problem is.  Some have an autoreturn set so the print head automatically returns after 72 or 80 characters.  Sometimes the autoreturn is not set and it just keeps piling up characters in the last positon.

But, if it's doing a line feed an printing a character in the middle of the line, you need to send two chariage returns and a line feed to the print.  This was the standard -- it's a matter of timing.  I've also seen specs for other printers that call for varying numbers of carriage returns or nulls, depending on the bit rate and how far over to the right the print head is (it takes longer to return from 132 characters than from 80, and no printer in the old days could print 960 chars/sec (9600 bps - 10 bits/char).

There once was a Star Trek program that would print out S T A R   T R   K in the middle of the line, space out to 80 characters, and then print a carriage return with no line feed followed by the E, which would print out between the R and the K. 

The listing is somewhere in the basement ...

Stargzer
User Rank
Author
Re: PROGRAM
Stargzer   1/10/2014 7:16:18 PM
NO RATINGS

betajet:"Pascal ..."

I was in a Pascal class for a day or two before I was pulled out to troubleshoot a hardware problem with the new equipment.  I do remember having trouble remembering when a semicolon was required and when it was not.  The instructor said there was sometimes a certain feel to when it was needed.  Not my kind of language ....  Another time he pointed out that you could stomp on the first byte of a string to change it's length, which was quicker than using the built-it function.  When I ask why bother to use the function, he said anyone on his staff would be fired for doing that (I guess because it was not as obvious as using the function).  Finally, when I asked why the printer diagnostic was so slow printing a sliding alpha test, he said the programmer was recreating the line each time, incrementing the initial character.  When I asked why he didn't just create the full set of characters twice and step across it with a substring function, he replied it was written by a trainee.  It thought to myself, "Why is Uncle Sucker paying to train your people?"

Pascal was "Wirth" so much he had to write Modula-2.  ;- ) 

betajet:  "I blame the Model 026 keypunch, which influenced Fortran.  The creators of Fortran were mathematicians, so I'm sure they would have loved to use the proper mathematical symbols instead of .GE. and .LT. for ">=" and "<".  I'm sure glad we've left those silly notations behind!  [What?  You say they're still around in HTML?  'Strewth!]"

There were only so many keys on the keyboard of a teletype or keypunch, and only so many characters in the character set (7 bits plus pairity).  Even IBM mainframe printers didn't always have a full character set.  Our college used Assembler, RPG, Fortran and PL/1.  PL/1 used a semi-colon to end a statement, but our print train didn' t have the character.  The IBM PL/1 compiler had an option which we set as default so we could terminate lines with a comma and a period (",."), as if the semicolon fell over on its side. 

Knowing how old FORTRAN is, it may be that they didn't have the ">" and "<" symbols available on printers.  The IBM 029 Keypunch did have the > and < characters on the keyboard.

By contrast, IBM's EBCDIC code had a cent sign ("¢") which their mainframe terminals had but that teletypes and ASCII-based equipment didn't have (we Americans are so Jingoistic!).

:-Þ

On the PC one can use CHARMAP.EXE to find it or type Alt-0162 (using the numbers on the Numeric Keypad) to enter it (Like this:  ¢).

 

And if you're really a gutton for mathematical notation, there's always APL

I think glutton is too mild of a term.  Masochist comes to mind ... but if you want arcane notation, try FORTH (which I did play with on my TI-99).

David Ashton
User Rank
Author
Re: Working!
David Ashton   1/10/2014 6:30:51 PM
NO RATINGS
@stargzer...thanks for all that..   I did know what BASIC stood for but not about its origins.    And I didn't use any of the very early ones much, though I do remember working on something that needed LET for assignments.  (Maybe that would have made more sense to your dad, @Chesler?)

The original BASIC didn't have a DO WHILE

Just looked up in GWBASIC's manual and it does not either.  I was probably thinking of QBASIC which I used a lot.  Never used DO WHILE much, I preferred the other conditionals.

Gotta love the bazillions of lights (and sometimes switches) on the old computers...

I liked FORTRAN at the time, but I'd be hard pressed to remember any of it now :-)

Stargzer
User Rank
Author
Re: Working!
Stargzer   1/10/2014 6:10:46 PM
NO RATINGS
Dave,

The name BASIC came from Beginner's All-purpose Symbolic Instruction Code and it was developed at Dartmouth (not Microsoft!).  It really was pretty basic at first.

The original BASIC didn't have a DO WHILE construct, only FOR...NEXT loops and GOTO and GOSUB statements.  I don't remember if the version I used had the ON...GOTO/GOSUB statement.  In the earlier versions every statement had to have a keyword at the beginning, so to assign a value it was LET Y=3 or LET X=X+1.  It was great day for typists when BASIC interpreters finally made the LET part of an assignment statement optional! 

I seem to recall that Dartmouth BASIC had built-in functions to perform matrix manipulations (MAT INV to invert, something I never understood or used; math was not a strong point).  After all, it was invented by two Math professors using student labor.  The professors (Kemeny and Kurtz) wrote a book called "BASIC Programming" that gave examples of how to us the language in various academic disciplines.

As for piles of paper ...

The control panel on the IBM 360 Model 25 had half a bazillion lights, but two of them were Wait and Sys.  A hard Wait was when something got farbled and the program just sat there; it was called a Hard Wait.  When a student's program started looping somewhere in core, the Sys light came on and stayed on, so we nicknamed it a Hard Sys.

A good source of large piles of paper occured when a FORTRAN student tried to print to a channel that wasn't punched on the printer's control tape (IBM 1403 printer).  Then it was a contest to see if the operator could stop the printer before it slewed through a whole box of paper before he cancelled the program!  At least we could recover the paper in that instance.  If their program got into a loop (but not a hard Sys) and printed one character and a page feed continuously, well, there would be a pile of scrap paper.

 

betajet
User Rank
Author
Re: GWBasic
betajet   1/10/2014 3:06:12 PM
NO RATINGS
Flurmy wrote: Think about the C syntax: it's made almost unreadable just to save some bytes IN THE SOURCE CODE!

If did your editing using ed on a 10 char/sec teletype, you'd want concise source code too :-)

Personally, I mostly like C's syntax, especially assignment operators like "+=" and the conditional expression "a? b: c".  However, chacun a son goût (YMMV).  As Flurmy said, there's always Cobol if you really like to type.

Flurmy
User Rank
Author
GWBasic
Flurmy   1/10/2014 4:33:50 AM
NO RATINGS
Yes, normally the program was saved with keywords tokenized to save memory.

You have the option to save it in "explicit" mode but I can't remember what it is.

At the time many BASICs did so. For example, the Sinclair Spectrum.

 

Think about the C syntax: it's made almost unreadable just to save some bytes IN THE SOURCE CODE!

At the opposite side lies the COBOL...

David Ashton
User Rank
Author
Re: Lower case letters
David Ashton   1/9/2014 5:47:58 PM
NO RATINGS
@Chesler....I'm glad Betajet came back to you and advised about the ASRs, as I know next to nothing about them.

As Betajet also remarked, the tape has even parity, ie bit 8 is always such that you have an even number of bits.  So only bits 1-7 are used, as you say, true 7-bit ASCII.

When I was playing with GWBasic I noticed that it always displays commands in uppercase.  If you look at a program file in (eg) Notepad, it looks like gobbledegook - I suspect they tokenised everything to save memory.

< ...codes 0141 to 0172..."  I take it those are Octal?  Long time since I have seen that.  reminds me of what I think is the first story I ever wrote for EE Times:

http://www.eetimes.com/author.asp?section_id=30&doc_id=1284451

<<   <   Page 4 / 8   >   >>


Like Us on Facebook
EE Life
Frankenstein's Fix, Teardowns, Sideshows, Design Contests, Reader Content & More
Martin Rowe

Test Tool Finds Ethernet Wiring Errors
Martin Rowe
Post a comment
When my house was renovated several years ago, I had the electrician install network outlets in numerous places, then run the LAN cables to a wiring closet. But he didn't document the ends ...

Martin Rowe

Local Electronics Store Supplies Engineers and Hobbyists
Martin Rowe
5 comments
Rochester, N.Y. — Tucked away in this western New York city known for its optics is Goldcrest Electronics, a local store that's supplied businesses and individuals with electronic ...

Martin Rowe

How to Transform a Technology University (Book Review)
Martin Rowe
1 Comment
The Presiding Genius of the Place by Alison Chisolm. WPI, Worcester, Mass., 234 pp., 2016. Engineers love to discuss, and often criticize, engineering education. They often claim ...

Max Maxfield

Aloha from EEWeb
Max Maxfield
Post a comment
Just a few minutes ago as I pen these words, I posted this blog about this month's Cartoon Punchline Competition over on EEWeb.com.