A86: can one program be on two pages?


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

A86: can one program be on two pages?




Hi,

Once again I'm going to annoy you all with my lame newbie questions..
but seeing as how the TI-86 uses a paged RAM (as well as ROM, of
course) system, isn't it possible to have programs start on, say,
page 2 and overflow into page 3? In theory I could load page 2
into the low 16k and page 3 into the high 16k - that would
accomodate programs up to 32k (in theory). Is there a ROM call to do
this? If not, does the byte receive code in the ROM check after
-every byte- to see if its overflowed the current RAM page and in
that case swap in a new page? I know I can use _load_ram_ahl to
automatically swap in the RAM page where a program begins... but
what happens if the program is bigger than 16k? Is there a limit
on the calc of 16k, 32k, or none at all? If programs can be more than
32k (and I believe somebody said they can be up to 64k) then the
calc has to do some checking in link routines as to whether or not
it needs to swap onto a new page. This could potentially get very
messy... I'd need some kind of routine to convert between an absolute
address and a RAM page/hl combo (like _load_ram_ahl)

For reading (I.E. sending to the E2) I suppose I could use the
_get_word_ahl call (which returns a word pointed to by ahl in
de, if I recall) instead of a simple ld a,(hl) or whatever. That would
mean I could just do a 24 bit inc on ahl and handle files as large as
the entire memory. But what about writing (I.E. receiving from the E2)?
Will I need to write a kind of _put_word_ahl?

Is it just a matter of calling _load_ram_ahl after every single byte
and inc'ing ahl between bytes? That may work on both send and
receive, but it seems awefully slow. Swapping RAM pages must take
quite a few CPU cycles. Will _load_ram_ahl still swap pages if the
right page is already swapped in?

I think TI really bombed on this paged memory thing. If it can't
be done easily with a z80, its time to find another processor. They
could have spent another $2 and put a 68k into the damn thing...
I think they finally got a clue with the TI-89. Don't get me wrong,
there are a lot of very dedicated and intelligent z80 people who
swear by the chip... but they've created a real programming mess with
paged RAM.

Thanks for all your help, this list is an awesome resource.

-- 
Bryan Rittmeyer
mailto:bryanr@flash.net
http://www.bridges.edu/horizon/


Follow-Ups: