RandomUser123
RandomUser123

Reputation: 77

How to mov a 64-bit binary literal into rax? error A2071: initializer magnitude too large for specified size

Here is my code. If I half the size of the binary value to 32-bits, it works, but as soon as I try 33 bits or higher, I get "error A2071: initializer magnitude too large for specified size"

Here is my code:

.data

.code
    ASM_ADD proc
        mov rax, 1111111111111111111111111111111111111111111111111111111111111111b
        mov rbx, 1
        
        add rax, rbx
        ret
    ASM_ADD endp
end

As far as I know, rax is a 64-bit register and if I use the actual numeric representation of this binary number (i.e 18,446,744,073,709,551,615 = 2^64 - 1), then it works...but if I try with 33 or more actual bit values, the program won't assemble

Does anyone know how to fix this?

Thanks

Upvotes: 1

Views: 242

Answers (0)

Related Questions