[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simple Typewriter program
Jerry Levinson (levinson@uhunix.uhcc.Hawaii.Edu) wrote:
: I need a simple applesoft basic program dthat will turn an Apple iie
: into a typewriter. Any ideas? I tried using prn#0 but it prints
: the line numbers as well as the test. I mean text.
Under ProDOS and Basic.System, the PR#X command (X=1 for printer
[usually], X=3 for 80-column mode) will always print line numbers when
issued from within a program unless it is preceded by CHR$(4). An old
programming trick is to LET D$=CHR$(4) so that you can enter PRINT
D$;"PR#1" to access the printer. The reason is that BASIC.SYSTEM
requires the TRACE function to be turned on to perform special tasks, but
it normally hides the output from reaching the screen or printer. By
giving the CHR$(4) command, you are telling Basic.System that you are
about to issue a command that was modified for use with Basic.System.
A very small and simple typewriter program would look like this.
10 D$=CHR$(4) : PRINT D$;"PR#1"
20 GET X$
30 IF X$=CHR$(26) THEN GOTO 50
40 GOTO 20
50 PRINT D$;"PR#0"
60 END
This program is very easy to follow. Replace the one after PR# in line
10 with the slot of your printer. To exit the typewriter program, type
^Z (ctrl-Z.)
-Mox
--
_____ _____ _____ __ _____
| | | | |__| ___| Mark Mentovai |Finger and Talk Requests:
| | | | | |- -| | ___| moxie@panix.com| moxie@panix2.panix.com
|_|_|_|_____|__|__|__|_____| If you want a coolsig like this, mail me.