Priming the Pump: How TRS-80 Enthusiasts Helped Spark the PC Revolution by Theresa Welsh David Welsh
Author:Theresa Welsh David Welsh [Welsh, Theresa Welsh David]
Language: eng
Format: mobi
Tags: vl-nfcompvg
Publisher: The Seeker Books
Published: 2013-12-13T05:00:00+00:00
Controlling Printers
One of the problems that I was staying up late to solve was controlling the printer to format the look of the text on the page. Lazy Writer had a menu to set page margins and page length. But what if you wanted to change margins between paragraphs? There had to be a way for the user to indent a paragraph and return to former margins when the indent was no longer needed. You didn’t want to have to stop the printer midway through the page, change the margin on a menu, then stop again and change back. Computers were made to automate such tasks. What was needed was a way for the user to indicate a change in the text using a non-printing code. The most obvious place to do this was at the start of a new paragraph. What was needed was an escape code. It wasn’t hard to have the program look at the first character after a paragraph marker to see if it was the escape character and then call a routine to look for a command letter which could then be followed by a value. For example:
>l10 could set the left margin.
>r10 could set the right margin.
Once the program had detected a command letter, it could change the value on the printer menu. The program then looked for a terminator…another paragraph marker…to tell it that the command was over and it could go back to printing text. The idea here is simple, but programming it so Lazy Writer was forgiving of a user mistake and did not print the line, lose the line count, or ignore text after the command that it was not meant to ignore, proved challenging. Take a simple case, for example:
> l 10
The above means the same thing to a user as:
> l10
But the program has to discard the spaces and still do the right thing when it gets to the command and the value. A command like this is easier to program as:
> 10 l
But users aren’t used to this “value first” order and that means you have to do it the other way. I still remember my Dad’s struggles with the “pre-select” mechanical store where users selected the wrong item because they naturally thought they could deposit their money and then make a selection. They thought that because that is the way most vending machines work. When you think about it, selection first and then paying is more logical, but not to a public trained the other way. To most people, “left margin 10” sounds better and is easier to remember than “10 left margin.”
Another case that I had to work out was:
>l 10
>r 10
Two commands in a row. This is something I thought that users would do – and why not? Very frequently, you would want to change several settings at once. In fact, I thought, it would be nice if you could do it all on one line. In BASIC, you could write:
10 PRINT “HI”
20 A=10
30
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(14695)
The Mikado Method by Ola Ellnestam Daniel Brolund(11954)
Hello! Python by Anthony Briggs(11869)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(11296)
Dependency Injection in .NET by Mark Seemann(11060)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10525)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(9895)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(9494)
Grails in Action by Glen Smith Peter Ledbrook(9223)
Hit Refresh by Satya Nadella(9038)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(8850)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(8675)
The Kubernetes Operator Framework Book by Michael Dame(8472)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(8331)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8292)
Robo-Advisor with Python by Aki Ranin(8246)
Practical Computer Architecture with Python and ARM by Alan Clements(8220)
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(8190)
Building Low Latency Applications with C++ by Sourav Ghosh(8095)