Friday, September 19, 2014

Use MkLink to Solve the MASM611 EXE at 8.3 Directory Name

The title is shorten from "How to use MkLink to solve the problem that the EXE file built by MASM611 cannot be workable at the directory named with 8.3 format in Windows environment."

Sometimes we use MASM611 to write Assembly code in our Windows 7+ environment. If your name of source code directory is long (non 8.3 format), it will be a problem. For example,


Below is the content of Hellow.asm.


Before compiling the ASM with MASM611, please set the MASM611 path as follows.
>set path=%path%;c:\MASM611\BIN;c:\MASM611\BINR

Then please run ml to compile Hellow.asm. (Sometimes the system hangs because the you run it in the long directory.)


The HELLO.EXE is generated. Please run it.


Unfortunately, it cannot be workable. I guess that it is caused by the EXE file built by MASM611 cannot be workable at the long directory. How do you keep the long directory and make it workable?  You can 1) copy the EXE file to the root directory and run it, or 2) use MkLink to create a link directory, Hello, with 8.3 format.
>mklink /d "D:\Test\Hello" "D:\My Personal Data\範例程式\Hello World"

The link Hello is created in the Test directory.


Then you can run HELLO.exe in the link directory.


Finally you can edit the Hello.asm, compile it, and run it again in the link directory. All of your changes will impact the original directory.

-Count

No comments:

Post a Comment