Assembler - some basic commands



 

add dest, src dest := dest + src
adc dest, src  dest := dest + src + C
SUB dest, src  dest := dest - src
sbb dest, src  dest := dest - src - C
mul src  acc := acc * src
imul src  acc := acc * src
imul dest, src1, imm_src dest := src1 * imm_src
imul dest, imm_src dest := dest * imm_src
imul dest, src dest := dest * src
div src  acc := xacc /-mod src
idiv src  acc := xacc /-mod src
cmp dest, src  dest - src (and set flags)
neg dest dest := - dest
inc dest dest := dest + 1
dec dest dest := dest - 1
cmp dest, src is dest = src ?
test dest, source  is dest = source ?
Instruction 
Description 
Condition 
Comments 
SETC  Set if carry  Carry = 1  Same as SETB, SETNAE
SETNC  Set if no carry  Carry = 0 Same as SETNB, SETAE
SETZ  Set if zero  Zero = 1  Same as SETE
SETNZ  Set if not zero  Zero = 0  Same as SETNE
SETS  Set if sign  Sign = 1 
SETNS  Set if no sign  Sign = 0 
SETO  Set if overflow  Ovrflw=1 
SETNO  Set if no overflow  Ovrflw=0 
SETP  Set if parity  Parity = 1  Same as SETPE 
SETPE  Set if parity even  Parity = 1  Same as SETP 
SETNP  Set if no parity  Parity = 0  Same as SETPO 
SETPO  Set if parity odd  Parity = 0  Same as SETNP 
Instruction 
Description 
Condition
Comments
SETA  Set if above (>)  Carry=0, Zero=0  Same as SETNBE 
SETNBE  Set if not below or equal (not <=)  Carry=0, Zero=0  Same as SETA 
SETAE  Set if above or equal (>=)  Carry = 0  Same as SETNC, SETNB 
SETNB  Set if not below (not <)  Carry = 0  Same as SETNC, SETAE 
SETB  Set if below (<)  Carry = 1  Same as SETC, SETNAE 
SETNAE  Set if not above or equal (not >=)  Carry = 1  Same as SETC, SETB 
SETBE  Set if below or equal (<=)  Carry = 1 or Zero = 1  Same as SETNA 
SETNA  Set if not above (not >)  Carry = 1 or Zero = 1  Same as SETBE 
SETE  Set if not above (not >)  Zero = 1  Same as SETZ 
SETNE  Set if not equal ()  Zero = 0  Same as SETNZ
Instruction
Description
Condition
Comments
SETG  Set if greater (>)  Sign = Ovrflw or Zero=0  Same as SETNLE 
SETNLE  Set if not less than or equal (not <=)  Sign = Ovrflw or Zero=0  Same as SETG 
SETGE  Set if greater than or equal (>=)  Sign = Ovrflw  Same as SETNL 
SETNL  Set if not less than (not <)  Sign = Ovrflw  Same as SETGE 
SETL  Set if less than (<)  Sign Ovrflw  Same as SETNGE 
SETNGE  Set if not greater or equal (not >=)  Sign Ovrflw  Same as SETL 
SETLE  Set if less than or equal (<=)  Sign Ovrflw or Zero = 1  Same as SETNG 
SETNG  Set if not greater than (not >)  Sign Ovrflw or Zero = 1  Same as SETLE 
SETE  Set if equal (=)  Zero = 1  Same as SETZ 
SETNE  Set if not equal ()  Zero = 0  Same as SETNZ
Instruction  Description  Condition  Aliases  Opposite 
JC  Jump if carry  Carry = 1  JB, JNAE  JNC 
JNC  Jump if no carry  Carry = 0  JNB, JAE  JC 
JZ  Jump if zero  Zero = 1  JE  JNZ 
JNZ Jump if not zero  Zero = 0  JNE  JZ 
JS  Jump if sign  Sign = 1  JNS 
JNS  Jump if no sign  Sign = 0  JS 
JO  Jump if overflow  Ovrflw=1  JNO 
JNO  Jump if no Ovrflw  Ovrflw= 0 JO 
JP  Jump if parity  Parity = 1  JPE  JNP 
JPE  Jump if parity even  Parity = 1  JP  JPO 
JNP  Jump if no parity  Parity = 0  JPO  JP 
JPO  Jump if parity odd  Parity = 0  JNP  JPE 
 
Instruction Description Condition Aliases Opposite
JA  Jump if above (>)  Carry=0, Zero=0  JNBE  JNA 
JNBE  Jump if not below or equal (not <=)  Carry=0, Zero=0  JA  JBE 
JAE  Jump if above or equal (>=)  Carry = 0  JNC, JNB  JNAE 
JNB  Jump if not below (not <)  Carry = 0  JNC, JAE  JB 
JB  Jump if below (<)  Carry = 1  JC, JNAE  JNB 
JNAE  Jump if not above or equal (not >=)  Carry = 1  JC, JB  JAE 
JBE  Jump if below or equal (<=)  Carry = 1 or Zero = 1  JNA  JNBE 
JNA  Jump if not above (not >)  Carry = 1 or Zero = 1  JBE  JA 
JE  Jump if equal (=)  Zero = 1  JZ  JNE 
JNE  Jump if not equal ()  Zero = 0  JNZ  JE
Instruction Description Condition Aliases Opposite
JG  Jump if greater (>)  Sign = Ovrflw or Zero=0  JNLE  JNG 
JNLE  Jump if not less than or equal (not <=)  Sign = Ovrflw or Zero=0  JG  JLE 
JGE  Jump if greater than or equal (>=)  Sign = Ovrflw  JNL  JGE 
JNL  Jump if not less than (not <)  Sign = Ovrflw  JGE  JL 
JL  Jump if less than (<)  Sign Ovrflw  JNGE  JNL 
JNGE  Jump if not greater or equal (not >=)  Sign Ovrflw  JL  JGE 
JLE  Jump if less than or equal (<=)  Sign Ovrflw or Zero = 1  JNG  JNLE 
JNG  Jump if not greater than (not >)  Sign Ovrflw or Zero = 1  JLE  JG 
JE  Jump if equal (=)  Zero = 1  JZ  JNE 
JNE  Jump if not equal ()  Zero = 0  JNZ  JE
    If you have comment or you need to ask me something send me e-mail !

    WWW address : www.come.to/fr1c

    Web Master : Fr1c