[A83] Re: Special ram areas?


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

[A83] Re: Special ram areas?




>> Van: Joe Pemberton <dArkSk8eR@buffbody.com>
>> >
>> >>> Van: Ronald Teune <rtwolf@gmx.net>
>> >>>
>> >>>>The stack starts at FE6Fh. It is safe to use 200 bytes at least. Even
>> >>>>then, here's still room for about 50 pushes.
>> >>>
>> >>>Is that on 83 or +?
>> >>
>> >>It's for the Ti82, Ti83, Ti83+ and Ti83+ SE... And probably even for
>the
>> >>Ti85 and Ti86...
>> >
>> >The FE6Fh too?

Henk Poley:
>For the Ti82/83(+) it is... (as I said, dunno about 85/86)

okay, thanks.

>> >And should I do "ld (FE6Fh-200)" or ld (FE6Fh+198)" ?
>>

Joe Pemberton:
>> The stack grows downwards, so you would want to do ld (fe6fh+199).

That sounds weird to me. If I want something at the bottom of the stack,
thus the most 'growed' stack, and the stack grows downwards, shouldn't I do
(fe6fh-199) (just thinking)?

Henk Poley:
>Since you probably just want to put a 'patch' of code there I would use
>LDIR (or LDDR):
>
> ld hl,code_for_stack
> ld de,$FE6F
> ld bc,size
> ldir ; Load (HL) to (DE), BC bytes, increments
>
>That should be it...

for two bytes it's a bit crappy.

>Moving the SP down (and putting your code at >$FFFF) is not a good idea,
>the TIOS sometimes resets the system (and FP) stack. Don't know how often
>this happens. Plus at return from an asm program it restored the SP (saved
>by TIOS), you could off coarse 'manualy' change that value...

I once checked that, but TI restores the stack pointer after exiting, so it
won't help much probably.

> Henk Poley <><
>
>
>
>





Follow-Ups: