Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-pcd!hpcvra.cv.hp.com!billw From: billw@hpcvra.cv.hp.com. (William C Wickes) Newsgroups: comp.sys.handhelds Subject: Re: HP 48 Faster PGDIR Message-ID: <25590171@hpcvra.cv.hp.com.> Date: 7 Jun 91 18:27:49 GMT References: <284dca48:3374comp.sys.handhelds@hpcvbbs.UUCP> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 27 Joe Horn requests: > Please post an example of how to lose memory with its use. I've tried, > and haven't been able to. Using FPGDIR gives the 48 a chance to execute code at a random address; what will actually happen is hard to predict--most of the time you just get a system halt, but you can get Memory Clear (it's just like executing SYSEVAL with random addresses). The easiest way to see the danger is to recall some objects from a directory you are going to purge, then execute FPGDIR. Everything looks fine, but now execute MEM and see your recalled objects turn to Externals. Try executing one, if you're brave. In a running program, of course, this can be disastrous--one example is to insert a MEM into FPGDIR after the directory PURGE, then use FPGDIR to purge the subdirectory that contains FPGDIR. I tried this on my HP48 (with everything archived, of course), and got a system halt. Another way is to use FPGDIR to purge a directory containing a suspended program, then execute MEM and CONT. (The use of MEM in these examples forces a garbage collection, which otherwise might happen most anytime, like a ticking time bomb.) > Thanx! Yer welcome! Bill Wickes HP Corvallis