[A83] Re: Special ram areas?


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

[A83] Re: Special ram areas?




> 
> > Van: Ronald Teune <rtwolf@gmx.net>
> >
> > 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.
> 
> Loading a two bytes 'program' to the stack? Just a jr??? 

No, just a mem location where I store my font.

> Well anyways,
> then
> I'd do:
> 
> #define first_byte	$00
> #define second_byte	$00
> 
> 	ld	hl,$FE6F-2
> 	ld	(hl),first_byte
> 	inc	hl
> 	ld	(hl),second_byte

I was thinking of something like that too.

> > >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.
> 
> Then you just need to know where the TIOS stores the
> 'backup-stackpointer',
> overwrite that with your value, et voilá.

Not possible, I think: ld (sp),xxxx (I don't remember the address anymore)

> 	Henk Poley <><
> 
> 

-- 
    Ronald Teune @School
    http://www.zeekoe.cjb.net
    http://ti.zeekoe.cjb.net
    Anything that's good&useful is made of chocolats

Sent through GMX FreeMail - http://www.gmx.net




References: