Sign Extension and Negation (movsx, neg): Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

20 October 2025

  • curprev 14:4714:47, 20 October 2025Bfh-sts talk contribs 2,132 bytes +2,132 Created page with "= Sign Extension and Negation (movsx, neg) = This page explains how to handle signed numbers of different sizes and how to change their sign in x86-64 assembly. == Copying signed numbers == When using mov to copy signed numbers, the sign bit is not automatically extended to the larger register size. This can lead to incorrect values when moving smaller signed values into larger registers. Example: mov ax, -42 mov bx, ax ; bx = -42 (ok, same size) mov ecx, bx..."