Page 3 of 3
Re: Calling C function from assembly
Posted: Thu Jan 31, 2013 4:16 am
by Combuster
BMW wrote:Your two accusations are based on an assumption
I wrote:especially not in the likely case your unposted code screwed something up again.
Q.E.D. Your posting habits force me into doing "guesswork", and the worst thing of it all is that it still happens to be more accurate than your own more "scientific" method.
After all, based on the description of the fix, the bug is still there. As per Occams Razor, the technology behind it is too advanced for you so that you treat it like magic and implement a workaround (bound to bite you later) instead of actually getting rid of the thing.
As for you being able to write C: Turn GCC's friendly-and-all-compatible mode off for a change and see for yourself how bad all your existing code is. The magic command line flags are
Code: Select all
-std=c99 -pedantic -Werror -Wall -Wextra
Point in case: your last two lines of code don't compile anymore and gcc perfectly explains why.
Re: Calling C function from assembly
Posted: Fri Feb 01, 2013 4:52 am
by BMW
Combuster wrote:
After all, based on the description of the fix, the bug is still there. As per Occams Razor, the technology behind it is too advanced for you so that you treat it like magic and implement a workaround (bound to bite you later) instead of actually getting rid of the thing.
Are you talking about the itoa fix or the Calling C function from assembly fix? If you are talking about the itoa fix, I believe there is nothing wrong with that method. Please explain.
Combuster wrote:
As for you being able to write C: Turn GCC's friendly-and-all-compatible mode off for a change and see for yourself how bad all your existing code is. The magic command line flags are
Code: Select all
-std=c99 -pedantic -Werror -Wall -Wextra
Point in case: your last two lines of code don't compile anymore and gcc perfectly explains why.
I posted earlier saying I changed it to:
Code: Select all
char a[16] = {0};
itoa(number, a, 10);
(if that's what you're talking about, there are no warnings/errors with all those command line flags)
Re: Calling C function from assembly
Posted: Fri Feb 01, 2013 5:22 am
by Combuster
BMW wrote:I posted earlier saying I changed it to:
Code: Select all
char a[16] = {0};
itoa(number, a, 10);
BMW actually wrote:Code: Select all
char a[16] = {NULL};
itoa(number, a, 10);
I do not appreciate liars.