Newsgroups: comp.sys.cbm Path: utzoo!utgpu!jarvis.csri.toronto.edu!godzilla.eecg!leblanc From: leblanc@eecg.toronto.edu (Marcel LeBlanc) Subject: Re: Where's the load file name? Message-ID: <1989Jun12.152744.19066@jarvis.csri.toronto.edu> Summary: It's not saved Organization: EECG, University of Toronto References: <7000016@silver> In article <7000016@silver> rschofie@silver.bacs.indiana.edu writes: > 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) The filename is not saved anywhere, it's found in the command buffer when the file is opened (the first step in the LOAD process). If the file is not found in the directory, nothing is saved, but if it is found, the DOS saves the track and sector of the 1st block in the file (and it reads that sector). The only way to find out what filename was sent by looking at DRIVE memory is to have a program that is already in drive memory copy the command buffer to a safe place. You can't do this from the computer, because as soon as you send a MEMORY-READ, you will have overwritten the filename. Good luck. Let me know if you succeed! > Robert B. Schofield Marcel A. LeBlanc | University of Toronto -- Toronto, Canada leblanc@eecg.toronto.edu | also: LMS Technologies Ltd, Fredericton, NB, Canada ------------------------------------------------------------------------------- UUCP: uunet!utai!eecg!leblanc BITNET: leblanc@eecg.utoronto (may work)