The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: raleeper on August 21, 2011, 04:15:46 PM

Title: Assemble While Running
Post by: raleeper on August 21, 2011, 04:15:46 PM
Is there a way to run a program, testp.exe for example, while leaving the file testp.exe open for writing?

If I try to assemble, testp.asm, while I have an instance of testp.exe running, ml fails with "fatal error: cannot open testp.exe for writing".  This is generally a good thing, I think.

But there are times I would like to get around it, keeping the last working version running, while assembling a new one.

I think I could rename testp.exe as eg. tplast.exe and run that, but is there a better way?

Thanks and best wishes, Robert

Title: Re: Assemble While Running
Post by: dedndave on August 21, 2011, 04:26:04 PM
the simple solution it to make a copy of the exe in a batch file and run it under a different exe file name
Title: Re: Assemble While Running
Post by: raleeper on August 21, 2011, 04:57:47 PM
Quote from: dedndave on August 21, 2011, 04:26:04 PM
the simple solution it to make a copy of the exe in a batch file and run it under a different exe file name

Exactly what I was about to post a never-mind saying I was going to do.

I apologize for the false alarm

Thanks, robert
Title: Re: Assemble While Running
Post by: clive on August 21, 2011, 11:30:16 PM
Actually I think you can rename a running file, and then replace it with one of the same original name. The running image is tied to a "file object", which is disconnected with the name, but it also why you can't delete it. This allows you to replace a driver with a newer copy that will be used at the next boot, for instance.
Title: Re: Assemble While Running
Post by: raleeper on August 22, 2011, 12:11:25 AM
Quote from: clive on August 21, 2011, 11:30:16 PM
Actually I think you can rename a running file, and then replace it with one of the same original name. The running image is tied to a "file object", which is disconnected with the name, but it also why you can't delete it. This allows you to replace a driver with a newer copy that will be used at the next boot, for instance.
Interesting.  Thanks