Page 1 of 1

Windows command size

Posted: Thu Aug 02, 2007 10:26 am
by artrecks
Does cmd.exe has a command size limit?
( I can't execute a command with more than 123 bytes )

Re: Windows command size

Posted: Thu Aug 02, 2007 1:51 pm
by Brendan
Hi,
artrecks wrote:Does cmd.exe has a command size limit?
( I can't execute a command with more than 123 bytes )
DOS executables expect to find a 256 byte data structure called the PSP before their code, which is constructed by the OS. The command line arguments are stored in this structure as an ASCII string, and the ASCII string is limited to 125 bytes or something.

Stop using DOS... ;)


Cheers,

Brendan

Posted: Fri Aug 03, 2007 10:56 am
by artrecks
I using DJGPP compiler for Windows and a bat file to compile my files, what could I use???

Posted: Fri Aug 03, 2007 11:41 am
by hanumant
Switch to cygwin , and make the cross compiler as per the instructions specified in the wiki page, I started with DJGPP but it gave me a lot of grief, so better switch to cygwin . Actually , if you are using a floppy image , then it might be better to switch to linux, you can use mtools to put your kernel image there, mtools is not available for cygwin i think

Posted: Fri Aug 03, 2007 12:22 pm
by jnc100
hanumant wrote:mtools is not available for cygwin i think
You could always compile it...

Regards,
John.

Posted: Fri Aug 03, 2007 12:28 pm
by artrecks
ok, i'll try cygwin
thank you very much!

Posted: Fri Aug 03, 2007 2:19 pm
by AJ
Alternatively, you can get quite a long way with filename wildcards (just ensure you link the entry-point file first if you are using flat binaries). You can also use DJGPP's make too...

Cheers,
Adam

Posted: Fri Aug 03, 2007 3:04 pm
by artrecks
I got some problems using Cygwin, I want to know what is the default file format for GCC in Cygwin, since files get bigger than using DJGPPs GCC compiler. =//

Posted: Fri Aug 03, 2007 6:02 pm
by hanumant
I am really not the expert on this. but i think by default it is ELF. Anyways there is a nice page on the wiki, with all linkers and the input and output file formats they support

Posted: Sun Aug 05, 2007 3:21 am
by AJ
You could try using objdump to find out :)

cheers,
Adam

Posted: Sun Aug 05, 2007 4:16 am
by jnc100
artrecks wrote:I got some problems using Cygwin, I want to know what is the default file format for GCC in Cygwin, since files get bigger than using DJGPPs GCC compiler. =//
By default, gcc in cygwin produces pe-i386 object files, and ld produces pei-i386 executables, PE being the file format used in modern Windows. If you want to target ELF, I suggest you look into building a GCC Cross-Compiler.

Any increase in size you see could be due to any number of reasons, e.g. more complex library functions, more debugging information, different alignment of sections etc.

Regards,
John.

Posted: Mon Aug 06, 2007 4:58 pm
by artrecks
yeah
was that ( the output is PE-i386 )
I'll try using a cross-compiler as you said
Thanks for the reply
bye