[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?

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

> >And should I do "ld (FE6Fh-200)" or ld (FE6Fh+198)" ?
> 
> The stack grows downwards, so you would want to do ld (fe6fh+199).

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...

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...

	Henk Poley <><






Follow-Ups: