Author Topic: MOVQ  (Read 6692 times)

Offline Novice

  • New Member
  • Posts: 1
MOVQ
« on: August 21, 2014, 12:38:42 AM »
Hello Everyone,
I am using NASM ver 2.11.5 to run on Windows 7 64b.
The following when compiled & run is Ok;
   mov RAX, 02450252024102E1h
    mov qword [0B83E8h], RAX

However the following;
   mov qword [0B83E8h], 02450252024102E1h
when compiled generates an error message "warning: signed dword immediate exceeds bounds" although it happily moves the first 4-bytes into memory specified.

Question is; Does it have anything to do with the NASM version I am using (it's under win32/ folder of Download) ? or Moving an 8-byte constant value into memory is simply not allowed ?

Many thanks.

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 429
  • Country: us
Re: MOVQ
« Reply #1 on: August 21, 2014, 01:44:08 AM »
   mov qword [0B83E8h], 02450252024102E1h

Question is; Does it have anything to do with the NASM version I am using (it's under win32/ folder of Download) ?

Nope.

or Moving an 8-byte constant value into memory is simply not allowed ?

Correct.  In the x64 world you must move the immediate value to a register before moving the contents to memory.