Re: A85: FIND_PIXEL


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

Re: A85: FIND_PIXEL



Terry Peng wrote:
> 
> JUSTIN BOSCH wrote:
> >
> > OK, this is my LAST question about FIND_PIXEL.  After using it, or any
> > other rom call that uses mem page 4, do you need to set it to whatever
> > it was before?  Thanks.
> 
> Nope. I should explain how the TI's Rom works. The ROM is 128k, but 16 bit
> addressing would only allow 64k to be accessed! So the 64k is divided into
> 32k RAM, 16k ROM, and 16K paged ROM. The ROM is divided into 8 pages: page 0
> holds the important functions (all ROM_CALLS except FIND_PIXEL). So the first
> 16k of ROM is page 0, and it is always present! by changing to page 4 you
> change the 2nd 16K of ROM. Of course, since FIND_PIXEL is the only ROM_CALL
> NOT on page 0, you do not need to change it back, until you exit the shell.
> 
> Terry Peng

Actually, I believe that if you look in TI-ROM.TXT you'll find that
_ALL_ the ROM routines used in ZShell/CShell/WhateverShell are located
on ROM pages other than page 0.  The thing is, all but FIND_PIXEL have
an entry in a table at the end of Page 0 which sets the correct ROM page
(I think most are on page 1, but some may not be..) then jumps to the
routine.  When the routine exits, it returns the ROM page to where it
was before, and executes a RET command.

It is that table that all routines but FIND_PIXEL make a call to..

-- 
* * * * * * * * * * * * * * *
*  Wolfgang Amadeus Mozart  *
* <mozart@technologist.com> *
* * * * * * * * * * * * * * *


References: