AngoLinux |
80386 Programmer's Reference Manual -- Opcode CBW |
CBW/CWDE -- Convert Byte to Word/Convert Word to Doubleword
OperationIF OperandSize = 16 (* instruction = CBW *) THEN AX := SignExtend(AL); ELSE (* OperandSize = 32, instruction = CWDE *) EAX := SignExtend(AX); FI; DescriptionCBW converts the signed byte in AL to a signed word in AX by extending the most significant bit of AL (the sign bit) into all of the bits of AH. CWDE converts the signed word in AX to a doubleword in EAX by extending the most significant bit of AX into the two most significant bytes of EAX. Note that CWDE is different from CWD. CWD uses DX:AX rather than EAX as a destination.Flags AffectedNoneProtected Mode ExceptionsNoneReal Address Mode ExceptionsNoneVirtual 8086 Mode ExceptionsNone
[Home Page dell'ITIS "Fermi"] [80386 Programmer's Reference Manual Index] [Previous] [Next] |