Re: A86: More (sqrt) KEY questions


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

Re: A86: More (sqrt) KEY questions




Matt2000 wrote:

> >There was an error in how I used .org, but I just fixed it, so take
> >another look.
>
> There is still an error, even with the -2 part. It works best when you
> remove it all together,
>  I think it is because you cant have two .org addresses starting at $D748,
> how would it know where to jump?

I think that if the label is under the first org, it uses the 1st org, and if
the label is under the other one, it uses that one.  Maybe not...  It might
clear it up if you used blocks (or whatever they're called)

> >_CREATEPROG outputs the abs address of the new program in bde.  Each of
> >the abs set addr calls input ahl.  The abs source is on page 0 (doesn't
> >need an abs addr), so we just put 0 into a.  Also, the number of bytes
> >(prog length) is less than 64K (you've got problems if it's not ... and
> >not just on your calc!  :-), so we can xor a there, too.
> >$4c3f increments ahl twice.  We need to do this because when we get bde
> >and switch it to ahl, we are pointing to the token ($8e28) and we want
> >to point instead to the start of the code.  It beats me why we have to
> >define the token at the beginning of our code and also skip over it (it
> >seems like you would have the token twice), but it crashes if you don't.
>
> Why do you have to define a token at all? What is a token? Why is is there?
> So you
> copy the token and the rest of the program 2 bytes after the ABS address of
> the newly
> created program. What is this 2 bytes you need to skip on the newly created
> program? The size? Why do  you need a token at all? I tried to remove it but
> yes, it crashed with an error 10 data type.

The $8E28 token is "AsmPrgm" basically...  it tells the calc that it's a
compiled asm program.

> Does anyone know what the format of a PROGRAM file?

Program var:.dw size
;code here

i think it is run just like a basic program at the beggining, so when it
encounters the $8E28 token, it checks to see if it was run with an Asm( to make
sure that it wasn't put in there accidently and freeze your calc.  Then it goes
into asm mode and jumps right into it.  My point being that the 1st two bytes of
the code need to be the $8E28 token.

> Another thing I cant seem to figure out. What are the equates for the
> keypresses?? I checked all the.INC files but they are completely different,
> even for the geykey, getky, and any function around. I cant figure it out..
> How do you know what keypress is which? Like on Yugi2 $09 was the equate for
> the enter key. How did you know this (not in the .inc files) and what are
> the other key equates?

Can anyone post all the (known) get key routines, how they are used, the key
equates, whether or not they wait for a keypress or just ret out if there is
none, etc...?

> Thanks,
>
> BTW I got the program working. I have it now so it wont let you press the
> enter key. But I really need to know the other keys. I think it would be
> cool if I wrote a program that turned the PGRM button into a CUSTOM button,
> that way I can make it so my friends cant access my games, and then have
> another key like the colon key fix it so you can access the program menu
> again.
>
> Thanks for you help Dux,
>
> - Matt



--
Stephen Hicks
mailto:shicks@mindspring.com
ICQ:5453914
IRC/AIM:Kupopo
Hopemage:http://www.mindspring.com/~shicks/



References: