Tuesday, March 9, 2021

PTR instruction

  • Allows moving data between source and destination operands even though they are of different sizes
  • A common example is to move a part of larger operand to a smaller operand.

.data
bigVar DWORD 12345678h

.code
; mov ax,bigVar
; This will not be allowed.

mov ax,WORD PTR bigVar
; This will move 5678h into ax (remember little endian format)

No comments:

Post a Comment