WCU / Cybersecurity
~/CSC 471/Class 02/KP 10
Class 02 · KP 10 / 23

Data Movement

mov   eax, ecx      ; copy
movzx eax, bl       ; zero-extend  8->32 (upper bits = 0)
movsx eax, bl       ; sign-extend  8->32 (preserves sign)
lea   rax, [rbx+4]  ; address arithmetic (no load)
  • mov is the workhorse — copy, not "move".
  • movzx / movsx convert small types to larger ones; the choice tells you whether the source was unsigned or signed.
  • You cannot mov directly memory-to-memory in one instruction.