Hello,
To check if your processor supports the instruction movbe :
include movbeCheck.inc
.data
m1 db 'The processor does not support the instruction movbe.',0
m2 db 'The processor supports the instruction movbe.',0
StrTable dd OFFSET m1,OFFSET m2
.code
start:
mov eax,1
cpuid
bt ecx,22
mov eax,0 ; This instruction does not clear the carry flag.
adc eax,eax
invoke printf,DWORD PTR [StrTable+4*eax]
invoke ExitProcess,0
END start
Here is the 64-bit version :
include movbeCheck.inc
.data
m1 db 'The processor does not support the instruction movbe.',0
m2 db 'The processor supports the instruction movbe.',0
StrTable dq OFFSET m1,OFFSET m2
.code
start:
sub rsp,8+4*8
call main
invoke ExitProcess,0
main PROC PARMAREA=4*SIZEOF QWORD
LOCAL _rax:QWORD
xor rax,rax
mov _rax,rax
mov rax,1
cpuid
bt rcx,22
mov rax,_rax
adc rax,0
mov rdx,OFFSET StrTable
lea rcx,[rdx+8*rax]
invoke printf,QWORD PTR [rcx]
ret
main ENDP
END start
Shorter 32-bit version and new upload above.
Attached is the 64-bit GUI example.