The MASM Forum

Projects => MasmBasic & the RichMasm IDE => Topic started by: jj2007 on November 06, 2019, 07:20:59 PM

Title: Can command lines be longer than 260 characters?
Post by: jj2007 on November 06, 2019, 07:20:59 PM
Yes, of course:

include \masm32\MasmBasic\MasmBasic.inc         ; download (http://masm32.com/board/index.php?topic=94.0)
  Init
  Launch "MyMsgBox.exe Есть много причин, почему опытные программисты предпочитают писать ассемблерный код, проблемы производительности, где важна скорость, архитектурная свобода компоновки кода любым способом, способность делать то, что не может быть сделано во многих компиляторах, но главная причина - просто потому, что вы можете. Многие вызывают образ собирания вместе нескольких DOS прерывания в непонятной нотации, чтобы исправить недостатки компиляторов, но современный ассемблер, как MASM имеет диапазон языка высокого уровня. А UAsm еще лучше!!"
EndOfCode


To test it, extract the archive to a folder and launch ShowLongCommandLine.exe, or open the *.asc in RichMasm and hit F6.
Title: Re: Can command lines be longer than 260 characters?
Post by: TimoVJL on November 06, 2019, 09:06:12 PM
Command prompt (Cmd. exe) command-line string limitation (https://support.microsoft.com/en-us/help/830473/command-prompt-cmd-exe-command-line-string-limitation)
Raymond Chen - What is the command line length limit? (https://devblogs.microsoft.com/oldnewthing/?p=41553)
Title: Re: Can command lines be longer than 260 characters?
Post by: jj2007 on November 07, 2019, 02:05:42 AM
Thanks, Timo. I wonder what the prepending //?/ stuff is good for, apparently it's not needed for UTF-16 file names.

Here is another test: extract the files to C:\ or whatever your Masm32 drive is so that you get

C:\Masm32\MasmBasic\Res\Let's have some fun with an incredibly long folder name that clearly exceeds the official MAX_PATH limitation imposed by Windows 7 and other not so recent versions of Windows that could possibly be present on a computer\MyLongTest.asc

Then open the *.asc file in RichMasm and hit F6.