[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help diagnosing an Apple IIe, please.



In article <ptCdnZQz98iO5TXUnZ2dnUVZ_r-WnZ2d@giganews.com>,
 "Michael J. Mahon" <mjmahon@aol.com> wrote:

> John B. Matthews wrote:
> > In article 
> > <52bcece6-7077-4ded-8858-2f1218d727b6@q30g2000prq.googlegroups.com>,
> >  adric22 <adric22@yahoo.com> wrote:
[...]
> > 10  HOME :A$ = " ": ONERR  GOTO 90
> > 20  PRINT "Press any key; ^C exits."
> > 30  KB = -16384 : KC = KB +16
> > 40  IF PEEK(KB) >  128 THEN POKE KC,0 : A$ = CHR$(PEEK(KB))
> > 50  VTAB 12: PRINT ">  ";A$
> > 60  VTAB 12: PRINT "-> ";A$
> > 70  VTAB 12: PRINT "-->";A$
> > 80  GOTO 30
> > 90  END
> 
> You can also GET the key after determining that one has
> been pressed:
> 
> 40 IF PEEK(KB)>127 THEN GET A$

Thanks, Michael and David. I started from a program that did

ON PEEK(KB) < 128 GOTO 240: POKE KC,0:A$ = CHR$(PEEK(KB))

and incorrectly inverted the logic.

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>