The MASM Forum

64 bit assembler => UASM Assembler Development => Topic started by: Biterider on February 17, 2019, 03:00:41 AM

Title: Immediate too large
Post by: Biterider on February 17, 2019, 03:00:41 AM
Hi
It seems that UASM 2.47 in 64 bit mode accepts such a line

mov PPP, 01122334455667788h

00007FF6B8582BA2 48 C7 05 D3 91 00 00 88 77 66 55 mov         qword ptr [PPP (07FF6B858BD80h)],55667788h 


without warning that the value is too large, but an error is issued when passing an offset.

I think that this behavior is not intended ...

Biterider
Title: Re: Immediate too large
Post by: johnsa on February 18, 2019, 12:13:38 AM
Hi,

Added a fix for this. It's been hanging around a long time in the parser!

2.48 packages and github branch updated.

John
Title: Re: Immediate too large
Post by: Biterider on February 18, 2019, 01:15:57 AM
Thank you
Title: Re: Immediate too large
Post by: Mikl__ on February 18, 2019, 02:01:44 AM
Hi, Biterider!
mov rax, 01122334455667788h
mov PPP, rax
Title: Re: Immediate too large
Post by: Biterider on February 18, 2019, 02:19:54 AM
Hi Mikl__
Thanks, I know. The 64 bit architecture don't let you do that directly, so you are forced to load first a register and then transfer the content to the memory location, like you showed in your post.
The point here is that UASM don't warn you that it truncates the value of the immediate. Using a reference it shows you a nice error message  :biggrin: .

Biterider