I want to move that number in CX(counter register). And it's not possible to move al into Cx.
1 Answer
You can move al into cl and then zero out ch:
mov cl,al
xor ch,ch
1 Comment
Peter Cordes
I'd prefer
xor cx, cx / mov cl, al. That pattern still works for 32-bit registers where you can't zero the upper halves separately. It also avoids partial-register stalls on Intel P6-family microarchitectures.
MOVZX