Errors in asm: invalid use of register, bad expression...

Linux specific questions.
Post Reply
Roland Chastain
Posts: 993
Joined: Nov 24, 2011 19:49
Location: France
Contact:

Errors in asm: invalid use of register, bad expression...

Post by Roland Chastain »

Hello!

I am trying to compile a project to 32-bit. I get many compilation errors, like "invalid use of register, bad expression"... There is no assembler in my source code, so I suspect a conflict in identifiers, but I don't know which identifiers are problematic.

When I compile to 64-bit the problem doesn't happen.

Could someone take a look in my code, or explain a method to find what is wrong?

The code is here: project.zip

Regards.

Roland
Xusinboy Bekchanov
Posts: 783
Joined: Jul 26, 2018 18:28

Re: Errors in asm: invalid use of register, bad expression...

Post by Xusinboy Bekchanov »

I have no problem compiling. What version of the compiler are you using?
Roland Chastain
Posts: 993
Joined: Nov 24, 2011 19:49
Location: France
Contact:

Re: Errors in asm: invalid use of register, bad expression...

Post by Roland Chastain »

Xusinboy Bekchanov wrote:I have no problem compiling. What version of the compiler are you using?
Thank you for your answer. Here is the version of my 32-bit compiler :

FreeBASIC Compiler - Version 1.07.1 (2019-09-27), built for linux-x86 (32bit)
Copyright (C) 2004-2019 The FreeBASIC development team.


As I said, I can compile to 64-bit without problem.
SARG
Posts: 1756
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Errors in asm: invalid use of register, bad expression...

Post by SARG »

Hi Roland,

Change OFFSET by OFSET (or other name). That's all.
Roland Chastain
Posts: 993
Joined: Nov 24, 2011 19:49
Location: France
Contact:

Re: Errors in asm: invalid use of register, bad expression...

Post by Roland Chastain »

SARG wrote:Hi Roland,

Change OFFSET by OFSET (or other name). That's all.
Hello. Yes, it solves the problem. Thank you.
SARG
Posts: 1756
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Errors in asm: invalid use of register, bad expression...

Post by SARG »

Roland Chastain wrote:Yes, it solves the problem. Thank you.
You're welcome.

A hint in such case : compile with -RR (or R) so you can see the faulty asm line using the line number given by the assembler.
Roland Chastain
Posts: 993
Joined: Nov 24, 2011 19:49
Location: France
Contact:

Re: Errors in asm: invalid use of register, bad expression...

Post by Roland Chastain »

SARG wrote:A hint in such case : compile with -RR (or R) so you can see the faulty asm line using the line number given by the assembler.
OK, I will try that next time.
Post Reply