Re: A86: questions


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

Re: A86: questions






Scalp wrote:

> (I know there a lot of question, but u said u're here to help newbies...
> and I'm still a newbie)
>
> I've look at the source of Kshell, and I have some question :
> why do u add 1546 with the size of you're prog ?
>         ld hl,code_end-code+$60a

I'm not sure what you're refering to, but it's probably only specific to
Kshell.

> the call that pop OP1 ($479f), does it pop OP1 to af ? ah ?

It pops the top 11 bytes of the floating point stack to OP1.  Every time
[sqrt]KEY is called, it pushes OP1 to the FPS while it calls _FINDSYM, so
you have to restore it in your [sqrt]KEY program.

> what is _asm_reg_a, why do we call it at the end of [sqr]KEY ?

_asm_reg_a is the RAM address where the a register is saved every time there
is a call to _asm_exec.  All registers are saved and you can use which ever
stored value is needed.  In the case of [sqrt]KEY, this saved register
contains the getkey, and you must return it to _getkey in the a reg.
([sqrt]KEY is called after the keypress is read from the port, but before it
is analized.)  Kshell doesn't work with keypresses (just menus) so it loads
the a reg with the saved value at the end... normally this would be at the
beginning, and you would check for a certain keypress.

> what's $C210 and $C21C ??

> can u explain why do u add 2 to ahl (call $4c3f) before copy the code to

> [sqr]KEY, the adresse given by _createprog is wrong ?

I don't know.  I copied it from the demo prog.

> what is ($c21c), the ptr to the ptr of the current menu ??? I don't
> understand ? Is it still valid if I call $49dc ??

I explain a few addresses dealing with menus and also the [sqrt]KEY prog
(just a little) here:

http://www.eden.rutgers.edu/~assets/86menu.htm

>
>
> what are that :
> current_basic   =       $
> current_asm     =       $ + $02
> counter_basic   =       $ + $04
> counter_asm     =       $ + $05
>
> basic_table     =       $ + $06
> asm_table               =       $ + $88
>
> prog_titles             =       $ + $10A
>
> what does it mean when u do :
> something = $ +something_else
> .db stuff
> .db stuff
>
> Thanx
> Nicolas




Follow-Ups: References: