Solved

Random "Missing Operator In Expression" error

Posted on 2011-03-23
3
934 Views
Last Modified: 2012-05-11
I'm converting a C++ function with a huge _asm block into pure assymbly code.  

I have a huge .data section that defines all my constant array values (basically a bunch of lookup tables).

I've been able to get all the code in the .code section to compile, but I'm getting the following error multiple times in the .data section where there is not any syntax error:

"error A2206: missing operator in expression"

Interestingly enough, If I cause a syntax error somewhere in the .code section, the syntax error in the code is reported before the above error in the .data.

The problem doesn't seem to be associated with the syntax of my .data section because if I rearange the order of the tables, the starting location of the error changes with no apparent rhyme or reason.

Shown below is an example of how I'm defining these lookup tables.
.data

eolmasks	DWORD 0x000000FF, 0x00000080, 0x000000C0, 0x000000E0, 0x000000F0, 0x000000F8, 0x000000FC, 0x000000FE

pass_maskw	DWORD 0xFFFFFF7F, 0xFFFFFF3F, 0xFFFFFF1F, 0xFFFFFF0F
            DWORD 0xFFFFFF07, 0xFFFFFF03, 0xFFFFFF01, 0xFFFFFF00
            DWORD 0xFFFF7F00, 0xFFFF3F00, 0xFFFF1F00, 0xFFFF0F00
            DWORD 0xFFFF0700, 0xFFFF0300, 0xFFFF0100, 0xFFFF0000
            DWORD 0xFF7F0000, 0xFF3F0000, 0xFF1F0000, 0xFF0F0000
            DWORD 0xFF070000, 0xFF030000, 0xFF010000, 0xFF000000
            DWORD 0x7F000000, 0x3F000000, 0x1F000000, 0x0F000000
            DWORD 0x07000000, 0x03000000, 0x01000000, 0x00000000

pass_maskb	DWORD 0x00000080, 0x000000C0, 0x000000E0, 0x000000F0
            DWORD 0x000000F8, 0x000000FC, 0x000000FE, 0x000000FF
            DWORD 0x000080FF, 0x0000C0FF, 0x0000E0FF, 0x0000F0FF
            DWORD 0x0000F8FF, 0x0000FCFF, 0x0000FEFF, 0x0000FFFF
            DWORD 0x0080FFFF, 0x00C0FFFF, 0x00E0FFFF, 0x00F0FFFF
            DWORD 0x00F8FFFF, 0x00FCFFFF, 0x00FEFFFF, 0x00FFFFFF
            DWORD 0x80FFFFFF, 0xC0FFFFFF, 0xE0FFFFFF, 0xF0FFFFFF
            DWORD 0xF8FFFFFF, 0xFCFFFFFF, 0xFEFFFFFF, 0xFFFFFFFF

Open in new window

0
Comment
Question by:HooKooDooKu
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
kbens0n earned 500 total points
ID: 35203391
You're probaly not intending to using the hexadecimal notation of C/C++ (where hexadecimal numbers are written as 0x000000FF). In Intel-derived assembly languages, hexadecimal is denoted with a suffixed H or h (FFh).
0
 
LVL 16

Author Closing Comment

by:HooKooDooKu
ID: 35207821
That was it...

The way I was moving code arround, the error didn't simply follow and therefore I never though it was the syntax of the numbers themselves.

But once I got rid of ALL the 0xFF style constants, the errors went away.
0
 
LVL 6

Expert Comment

by:kbens0n
ID: 35208194
Totally understand. One of the gotchas we all experience. Glad you're moving forward. Thanks very much !
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
restoring epb 1 365
A computer system has 16K of memory, a segmented Memory Management Unit, and the following segment table 2 526
IE9 Blank pages 5 629
BufferBomb Phase 0 4 1,360
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
There's a lot of hype surrounding blockchain technology. Here's how it works and some of the novel ways it' s now being used - including for data protection.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question