A 'asm' problem?

Hi all,

when i compile a program, it shows that:

Invalid ‘asm’ statement:
fixed or forbidden register 3(bx) was spilled for class BREG.

Has someone met the problem before?How can i solve it?

Thanks very much!

So how does this come about. Are you compiling a C and/or C++ program and this just shows up? Is there embedded asm in your code?

The I386 instruction set is highly asymmetric. That is certain instructions require or limit the registers it works with. Obvious examples are loop, which requires a count in the cx register and inp which requires a port in the dx register. The bx register is generally used for indexing off of an offset in the DS segment.

If your code has embedded asm, then the problem is probably the improper use of bx. If this comes out of compiled code, then either code generator or the assembler has a bug, very unlikely but possible. You might want to try to isolate the code that is causing the problem and post it.

Thanks very much!

could you take a look at my program? i got it from another people,i don’t know what it exactly means.But after i compile, a new error shows:
suffix or operands invalid for ‘setz’. That made me confused.