[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Apple II Emulation in HyperCard
> So I just do this:
>
> if addr=49249 then
> -- hollow apple key
> put 0 into res
> if the commandkey is down then add 128 to res
> add random(127) to res
> return res
> end if
>
> Right?
>
> (By the way, the above code is 100% valid in the programming language I'm
> using!)
Right... ?
It all looks greek to me :), but why add garbage if you don't need it ?
I assume you are testing for the presence or absence of the Open-Apple key
in your program. Or are you writing an emu ???
I would do it this way:
if peek(49249)>127 then
begin
{do stuff if Open Apple key was down}
end;
else
begin
{do other stuff}
end;
end; {if}
{carry on with rest of program}
BTW I tested reading 49249 on my two Apple IIe's and they both gave random
results for the lower 7 bits, although mostly high. I forgot to mention
before that floating inputs are normally seen as hi (1's).
Mark