Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!att!cbnewsc!carus From: carus@cbnewsc.ATT.COM (bryce.w.carus) Newsgroups: comp.sys.cbm Subject: Re: Where's the load file name? Summary: file name location Message-ID: <1235@cbnewsc.ATT.COM> Date: 13 Jun 89 11:29:40 GMT References: <7000016@silver> Organization: AT&T Bell Laboratories Lines: 42 In article <7000016@silver>, rschofie@silver.bacs.indiana.edu writes: > > I recently asked if anyone knew the name of the file that the Final > Cartridge III trys to load through its "DLINK" hook. Since I didn't > Where, if anywhere, is the name of the file being loaded stored in > memory? I've tried loading a file and then searching through drive > memory for the file name, but haven't been successful. I've looked at > the drive (I'm talking 1541 here) memory maps in "Inside Commodore DOS" > and haven't found anything helpful either. > > Does anyone know of a way to find the name of the most recently loaded > file? (Or most recently *attempted* file) > > Robert B. Schofield > > {pur-ee,ihnp4!inuxc,rutgers,pyramid}!iuvax!silver!rschofie > rschofie@silver.bacs.indiana.edu (192.12.206.2) > rschofie@iubacs.bitnet (forwarded) I'm not sure where you want to be looking, but if you want the most recent file then the 64's zero page location $B7 holds the number of characters and $BB,$BC points (lo by, hi by) to the file name location...typically to ram just short of $A000 or, with a cartridge, in the $0200 buffer. If an application is controlling the location, then $BB,$BC will still point to it. On the drive side, the drive's $0200 input buffer will also hold the file name as part of the load command that is sent across the bus. The problem you may have is reading either the drive's buffer, the 64's buffer, or the 64's zero page locations in real time. This because a reset will clobber those areas and wipe out any traceable information. Drive monitors pass their memory read commands through the drive's $0200 buffer so they will at least partially wipe out any trace of the name. If you can control the point in time where you wish to read the locations noted then you'll have no problems. If not, you may be able to use FC III's freeze capability and monitor to read them. Hope this helps....