35.3.5.8. INTEGER CONVERSIONS ON X86





	(Move with Sign Extend) ===========
MOVSX	r16,r/m8		0F BE /r	
MOVSX	r32,r/m8		0F BE /r
MOVSX	r32,r/m16		0F BF /r

	DEST <- sign_extend(SRC)



	(Move with Zero Extend) ===========
MOVZX	r16,r/m8		0F BE /r	
MOVZX	r32,r/m8		0F BE /r
MOVZX	r32,r/m16		0F BF /r

	DEST <- zero_extend(SRC)


Note:
	Also exist old commands which is used for compatibility
or for preparing for divide...


	(Convert Byte into word) =====
CBW				98
	AX <- sign_extend(AL)


	(Convert Word into Doubleword extended) ==
CWDE				98
	EAX <- sign_extend(AX)

	(Conert Word into Doubleword) =====
CWD				99
	DX:AX <- sign_extend(AX)


	(Convert Doubleword into Quadword)==== 
CDQ				99
	EDX:EAX <- sign_extend(EAX)






Index Prev Next