News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

How to make CMOVcc instructions available

Started by BetrunkenUhrmacher, July 04, 2012, 12:37:35 AM

Previous topic - Next topic

BetrunkenUhrmacher

Hello folks, I'm new on the forum. I have some troubles with CMOVcc. I don't know how to make it available.
I use MASM32.

this is code:

.686
.model flat, stdcall
include \masm32\include\masm32rt.inc

.data
.code
start:
    mov ax, 4
    mov bx, 8
    cmp ax, 0
    cmovz ax, bx

    inkey
    exit
end start


and after assembling I get this error message:
"D:\masm32\tbc\cmov.asm(14) : error A2085: instruction or register not accepted in current CPU mode".

thanks in advance

dedndave

include \masm32\include\masm32rt.inc
.686


the masm32rt.inc file sets the processor to 486
(it also takes care of model and casemap)
but - set the processor to 686 after the include

hutch--

Do the lot.


.686p
.mmx
.xmm


Unless you are writing code for a truly ancient processor, don't apply the restrictions of using old processor limits.

BetrunkenUhrmacher