Assembler Error, Please Help

Windows specific forum
JustinJack
User
User
Posts: 89
Joined: Thu Feb 04, 2010 7:34 am
Location: Decatur, TX
Contact:

Assembler Error, Please Help

Post by JustinJack »

When I compile my program on x86, I have no problems, but when I compile it on x64 I get

-------------------------------------
PureBasic.asm [982397]
MP650
PureBasic.asm [226930] MP650 [404]
MOV rcx, dword [rbp + 32]
error: operand sizes do not match.

I've tried this on PBx64 4.51 and 4.60 and get the same error, but I don't have the foggiest idea where to look to solve the issue. The code's only 80k lines...
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Assembler Error, Please Help

Post by Trond »

Compile from the command line with the /commented switch and you will get a file "PureBasic.asm". Searching in this file for "MOV rcx, dword [rbp + 32]" you should find the relevant source code right above. This should help you.
JustinJack
User
User
Posts: 89
Joined: Thu Feb 04, 2010 7:34 am
Location: Decatur, TX
Contact:

Re: Assembler Error, Please Help

Post by JustinJack »

I use the command:
pbcompiler c:\users\justinjack\documents\newui.pb /commented
and it doesn't give me a PureBasic.asm file, it still shows the error, then stops.
I also tried:
pbcompiler /commented c:\users\justinjack\documents\newui.pb
same thing. Does it have to successfully compile the program to generate the .asm file?
JustinJack
User
User
Posts: 89
Joined: Thu Feb 04, 2010 7:34 am
Location: Decatur, TX
Contact:

Re: Assembler Error, Please Help

Post by JustinJack »

Nevermind. I was in a read-only directory when I ran it.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3943
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Assembler Error, Please Help

Post by wilbert »

Did you find the source of the problem ?

The reason for the error itself is clear.
rcx is a 64 bit register that needs to be filled with a qword and not a dword.
JustinJack
User
User
Posts: 89
Joined: Thu Feb 04, 2010 7:34 am
Location: Decatur, TX
Contact:

Re: Assembler Error, Please Help

Post by JustinJack »

Yes, but i didn't analyze it too much, it was actually a procedure I had forgotten to delete, that had code i didn't use, so i deleted it. I did however find a few more little bits of pain in the butt when compiling to 64 bits....like when my WNDCLASSEX\cbWndExtra was set to 4 and I did SetWindowLongPtr_(hWnd, 0, *miscPtr)
and then went to read it, I got bad pointers...so i have to upgrade all of those to 8. Ugh. I was hoping for the best and expecting the best! *That* always works, huh? It will be a tid-bit more involved than double-clicking on the 64 bit version of PB..


I wouldn't have it any other way, though! Thanks everyone!
buddymatkona
Enthusiast
Enthusiast
Posts: 252
Joined: Mon Aug 16, 2010 4:29 am

Re: Assembler Error, Please Help

Post by buddymatkona »

Nevermind. I was in a read-only directory when I ran it.
That looks like it might be one of the default GOTCHAs after installing in \Program Files\ on Vista/7.
Post Reply