flat assembler
Message board for the users of flat assembler.
Index
> Main > How To Conveter A 8/16(fx ah/dx) to a 32(fx esi) |
Author |
|
beppe85 21 Jan 2005, 10:33
Depends if the number is signed or not.
Code: Signed: movsx eax, al ; move sign-extended Unsigned: movzx eax, al ; move zero-extended Note that both source and dest registers can be (part of) the same. |
|||
21 Jan 2005, 10:33 |
|
MCD 24 Jan 2005, 16:55
for signed registers, you should better use
Code: cbw cwde Note that these instructions only work for the accumulators. You will have use additional move instructions if you want the result in other registers. |
|||
24 Jan 2005, 16:55 |
|
vid 24 Jan 2005, 22:58
Quote:
really?!? i can't believe that. Too bad i can't try now |
|||
24 Jan 2005, 22:58 |
|
mike.dld 24 Jan 2005, 23:14
Calm down, man movsx fills higher part with source operand' sign bit
See Intel's manual "Volume 1: Basic architecture", Chapter 7.2.1.4, Figure 7-6 |
|||
24 Jan 2005, 23:14 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.