How Do ya convert 2 WORDS to a DWORD????? :evil:
mov ax, bx
shl eax, 16
mov ax, cx
If size is of importance you could also do (using the same registers as the above post):
push bx
push cx
pop eax
what size advantage does your methode give? you mean of the compiled code?
Yeah, compiled code.
vs.
If you're concerned about size (which I imagine the OP probably isn't), then you save four bytes. It's certainly a hack (the code you provided is the correct way to do it), but may be useful to consider.
00000000 6653 push bx
00000002 6651 push cx
00000004 58 pop eax
vs.
00000000 6689D8 mov ax,bx
00000003 C1E010 shl eax,0x10
00000006 6689C8 mov ax,cx
If you're concerned about size (which I imagine the OP probably isn't), then you save four bytes. It's certainly a hack (the code you provided is the correct way to do it), but may be useful to consider.
Oops, never mind... :oops: