0
votes
__asm {
                xor eax, eax 
                cpuid 
                mov vendor_id, ebx
                mov vendor_id + 4, edx
                mov vendor_id + 8, ecx
                mov eax, 1 
                cupid 
                mov reg_eax, eax <--this line
                mov reg_edx, edx 
            }

It shows Error C2400 inline assembler syntax error in 'opcode'; found 'newline'

and

if (Is_HT_Supported())
        {   __asm { 
            mov eax, 1
            cpuid mov reg_ebx, ebx <-- this line
            }
            return (unsigned char)((reg_ebx & NUM_LOGICAL_BITS) >> 16);
        }
        else
        {
            return (unsigned char)1;
        }

Shows Error C2400 inline assembler syntax error in 'first operand'; found ','

How to fix it? I'm using VS 2015

1
First one has a typo cupid (LOL) the second has two instructions on the same line.Jester
Home to replace/change cupid?Karolina
Fix the typo, it should of course be cpuidJester
Thanks, it was so dumb mistake. Please, add your answer as other post, I want to "tick" itKarolina

1 Answers

1
votes

I had the same problem with the same part of code. And changing cupid to cpuid in

cupid 
mov reg_eax, eax <--this line

solved this