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

Re: UltraMacros Manual?



appleworks51@yahoo.com wrote:

I found the UltraMacros 4 manual and here is what it says about ifkey
and other discontinued commands:
---------------------------------------

Chapter 3
UltraMacros 4 Reference

This reference documents the commands built-in to UltraMacros 4. It
assumes that you have some familiarity with UltraMacros 3.x commands.
See page 48 of the TimeOut UltraMacros 3.x manual for an introduction
to macro syntax, tokens, local vs global macros, etc.

Discarded Commands

UltraMacros 4 discarded or replaced several UltraMacros 3x commands in
order to make room for new features. See the file Changes in UM to see
how to simulate the functions of the old commands. Here are commands
discarded or changed so that they won't compile:

Replaced:	els- .els, id#- .id, findpo- .findpo, menu- .makemenu
Dropped:	dec, elseoff, getvar, ifkey, inc, putvar, &
Changed:	call (page 42), clear (page 31)

------------------------

When you look for the file "Changes" on the UM4 disk, it isn't there.
But there is another file named "Key Test Macro" which tells you what
to do about ifkey. I'm not going to type it all in here (I no longer
have an Apple connected to my PC), but it has you use Peek $C000 to
substitute for ifkey.  (That's peek $C zero zero zero).

x = Peek $C000      // Get last keypress

if x = 27 Escape was pressed
if x= 13 Return was pressed
if x > 128 OA key is down, etc.

Use x=peek c000 when you need to know what key was already presssed.

Use k=key when you want to wait for a key, then see what it was.

Curious--so PEEK special cases the $C000 address?  Because that's
not what you see if you just load that address.

If, for example, you PEEK $C000 in Applesoft, the high bit is the
strobe bit ("1 if strobe not yet reset"), and there is no information
regarding the Apple keys (which would require extra PEEKs).

I find it easy to believe that KEY does this processing, but am
surprised to see special keyboard processing attached to PEEK.

-michael

New, faster SUDOKU v2.0 solver for Apple II's!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it's seriously underused."