I'm trying to get some c & ASM sample code I found running in Visual Studio 2008. I don't think the problem is the difference between VS 2005-2008. This example is supposed to get the CPUID on 64-bit systems. (My attempts getting the ASM-only 32-bit examples to compile failed too)
I can copy and paste this code into a new project, but I have not been able to build it. I've tried a few different VS project templates with no success. I believe I followed the instructions all the way. Can someone provide a step-by-step to get this running in Visual Studio 2008 with the project template and project settings?
One thing I've noticed is that although I can make the environment be 64-bit, I can't seem to target x64 for this project - the only options for adding new platforms are mobile platforms. And I've had to manually define _M_X64 in the command-line options, which I suspect I shouldn't have to do.
Not to be debugged directly, but just for your info - Errors, as far as I got, are as follows:
1> Assembling: .\cpuid64.asm
1>.\cpuid64.asm(4) : error A2013:.MODEL must precede this directive
1>.\cpuid64.asm(5) : error A2034:must be in segment block
1>.\cpuid64.asm(7) : error A2034:must be in segment block : cpuid64
1>.\cpuid64.asm(11) : error A2034:must be in segment block
1>.\cpuid64.asm(12) : error A2008:syntax error : .
1>.\cpuid64.asm(13) : error A2034:must be in segment block
1>.\cpuid64.asm(14) : error A2008:syntax error : .
1>.\cpuid64.asm(15) : error A2008:syntax error : .
1>.\cpuid64.asm(17) : error A2034:must be in segment block
1>.\cpuid64.asm(18) : error A2085:instruction or register not accepted in current CPU mode
1>.\cpuid64.asm(19) : error A2085:instruction or register not accepted in current CPU mode
1>.\cpuid64.asm(20) : error A2085:instruction or register not accepted in current CPU mode
1>.\cpuid64.asm(21) : error A2085:instruction or register not accepted in current CPU mode
1>.\cpuid64.asm(22) : error A2085:instruction or register not accepted in current CPU mode
1>.\cpuid64.asm(23) : error A2085:instruction or register not accepted in current CPU mode
1>.\cpuid64.asm(24) : error A2085:instruction or register not accepted in current CPU mode
1>.\cpuid64.asm(26) : error A2034:must be in segment block
1>.\cpuid64.asm(27) : error A2034:must be in segment block
1>.\cpuid64.asm(29) : error A2034:must be in segment block
1>.\cpuid64.asm(30) : error A2034:must be in segment block
1>.\cpuid64.asm(31) : fatal error A1010:unmatched block nesting : cpuid64