Re: A82: Re: Pointers and shells


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

Re: A82: Re: Pointers and shells



Because the functions which handles mode,enter,... are different for
differnt parts of the calc you do not have one function which handles these
calls, but you have several input handlers placed on different rom pages. So
after having called KEY_HAND the system calls a function which starts the
current inputhandler. This function does some thing like this:

LD A,(Input_rompage)
OR %10001000
OUT (PAGE_PORT),A
LD HL,(Input_addr)
JP (HL)

Since Ash is in the RAM we do not care about the rom page, but by chaning
Input_addr we can make this function (which is executed after each key
press) call Ash.

To change Input_addr L1 holds a pointer to the Ash object code, and L2 is
the location Input_addr.

DInes
-----Original Message-----
From: Matt Maurano <maurano@best.com>
To: assembly-82@lists.ticalc.org <assembly-82@lists.ticalc.org>
Date: 8. november 1997 00:33
Subject: Re: A82: Re: Pointers and shells


>Based on what Dines just said, and what I've seen in the Ash 2.0 file, here
is
>what I think happens:
>
>When in the home screen, the calc is in a KEY_HAND loop. There is a table
in
>memory, like this:
>
>K_MODE    $2335
>K_ENTER    $2453
>
>If it gets the scan code for mode, it will do a call $2335. If it gets that
of
>enter, it will do a call $2453. The matrix L1 is the location of the ash
object
>code, a couple bytes into user memory. L2 is the location in memory of the
>right side of the table for K_ENTER. L1 is loaded into L2, so the next time
you
>press enter, it will not compute the answer, but it will call ash. Get it?
>
>Eric O'Connell wrote:
>
>> >Dines
>> >
>> >BTW I hope you understud the part about how shells are implemented, if
not
>> >just ask :)
>>
>> Hmm.. i understand everything but how exactly you change the input
handler
>> only by running the ASH program.  i know this has something to do with
the
>> hacking of the backup file, but if it's an input handler.. hmm.  do you
>> understand what i'm asking? :)
>>
>> eric
>>
>> +----------------+------------------+
>> | Eric O'Connell |  Mac Programmer  |
>> +----------------+    Guitarist     |
>> | titan@gate.net |  Math Hobbiest   |
>> | drdistort(irc) | Insensitive Male |
>> +----------------+------------------+
>> | web:  http://www.gate.net/~titan  |
>> +-----------------------------------+
>
>
>
>