jacob navia
7/28/2011 7:31:00 PM
Le 28/07/11 21:04, buck a écrit :
> I haven't programmed in a VERY long time and I never was much good at
> it anyway. From this you can accurately imply that I'm the wrong
> person to be doing this. However:
>
> I have been tasked to determine the feasibility of updating 13 year
> old (pre ANSI) ASM and C source code for the purpose of compiling a
> 64-bit executable.
>
> The source code was last modified in November of 1998 and was compiled
> using C88 v3.03 and ASM88 v1.5, which are copyright Mark DeSmet 1987
> and 1986 respectively.
>
All this doesn't look very fresh...
> Are there any utilities that examine old C code and suggest how to
> make it compliant with current compilers?
No, you need a human to do that. And you have to pay gim/her a
significant amount of money since it is a significant effort.
> I tried splint v3.1.2, but
> it crashes on line 110 of 824 lines and does not tell me how to
> correct the errors and warnings it does find.
>
Well, you need someone that knows C and assembly.
> Are there any utilities that examine 8086 ASM code and explain what to
> change to make it compile for a 64-bit CPU?
From this question I understand that you have really no clue...
:-)
Compiling/Assembling is not really that difficult. But I suppose that
you want that it RUNS correctly afterwards isn't it?
> I type 'debug' in a CMD
> prompt in Vista in order to see the register names, but (of course)
> Vista has no DEBUG...
>
Vista has very good debugger though... But you will need a 16 bit
debugger and those beasts disappeared something like 15 years or more
ago.
> One of the things I'm completely stuck on is the difference in char.
> In the existing source code and with C88,
>
> 'static char v[]={-20,-124,-180,-93,-88,-73,-27,-146,9,-38,-179 ...'
>
> works, but the values obviously violate current char (and unsigned
> char) rules.
No, this is valid code. Why should be wrong? You are probably compiling
with char defaulting to unsigned char. Change that.
If char is changed to long, the values seem to be
> accepted, but the function is called with a char variable.
>
Normally, a char variable is changed to int when passed to a function
that receives a char anyway since in modern CPUs you never push a
single char into the stack.
> Any suggested resources other than utilities would be appreciated,
> too. Google hasn't been much help, so the above includes a request
> for suggested search phrases.
> --
> buck
Look buck, the only real solution is to get somebody that knows the
stuff and pay him $$$ to do the job. You can't do it, I fear, you would
need months of work just to get started into it.