[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] -mshort executables have no command line



On 16/01/2013 16:22, Miro Kropáček wrote:
'int argc' is interpreted as 16-bit it, so I changed it to long and
voila, command line is back. Probably not 100% clean solution but
what else can go wrong, it doesn't matter how the init code is
compiled, there's only one jsr _main with the mentioned argc and argv
on stack.

Good hack.

However, be careful.
Everything which is int in your program must be converted to long when talking to the outside. Not only argc, but also printf() as Alan stated. And beware of system structures containing ints.

Of course this kind of trick can be used for small test programs, but this is very dangerous for bigger programs.

--
Vincent Rivière