[A83] Re: Getting lost RAM back


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

[A83] Re: Getting lost RAM back




Why don't you just try setting bit 7,(IY+28h) on the 83+ before a _getkey in
your program? :) It's usually easier to prevent memory leaks from occuring
in the first place...

Michael Vincent
Detached Solutions - www.detacheds.com
Radical Software - www.radicalsoft.org
----- Original Message -----
From: <tlutz@stevens-tech.edu>
To: <assembly-83@lists.ticalc.org>
Sent: Saturday, February 09, 2002 8:22 AM
Subject: [A83] Re: Getting lost RAM back


>
> Wait...I found a flaw in that idea... Any time a regular assembly program
is
> loaded, it MUST be at the userMem location. Correct? Otherwise, all the
jp's
> and call's would be messed up. Perhaps another useful piece of information
> would be to find out how Asm( works. My guess is that it pushes memory up
in
> RAM by inserting the appropriate amount at userMem. So I'd probably have
to do
> (in pseudo-code) ld hl,userMem + theLengthofMyProgram to get to the start
> location of the doubled program.
>
> Also, I don't see why memory leaks can't be exploited...If you can
manually
> allocate memory and you know where it starts, you could store a bunch of
> information there.
>
> If you have any information that invalidates any of my ideas, let me know!
> Thanks!
>
> -Tom
>
>
> Quoting tlutz@stevens-tech.edu:
>
> >
> > Maybe if I do a hex dump of the RAM before and after the memory leak I
> > can
> > figure out what I need to do to fix it... Is there a place in RAM that
> > stores
> > the location to the next place in RAM not used? How do InsertMem and
> > DelMem
> > work? Could I free the RAM by loading the program length into DE and
> > pointing
> > HL to userMem, then B_CALL DelMem? Just an idea.
> >
> > -Tom
> >
> >
> > Quoting Ronald Teune <rtwolf@gmx.net>:
> >
> > >
> > > Well, I don't know very much about it, but I'll try.
> > > The program is being copied to the progstart location, when it's
> > being
> > > executed.
> > > I imagine that it's double in memory, at that time, at the original
> > > place,
> > > and at the saferam place, and that it somehow stays double. The only
> > way
> > > I
> > > know to remove the extra bytes is clearing your ram...
> > >
> > > >Is there any way to recover lost memory, such as when the user
> > turns
> > > the
> > > >calculator off while in a GetKey ROM call in an ASM program? I'm
> > not
> > > >looking for alternative key entry routines, just an explanation of
> > > why
> > > >the memory is lost, where it goes, and how to get it back. Thanks a
> > > lot!
> > > >
> > > >-Tom
> > > >
> > > >
> > > >
> > >
> > >
> >
>
>




Follow-Ups: References: