views:

1173

answers:

2

For a school assignment I have to write x86 assembly code, except I can't use gcc to compile it since my computer is an x64 machine, and gcc is only excpecting x86 code. Is there a command that'll make gcc accept it x86 assembly code? Thanks

P.S. I know my code is valid since it compiles just fine on x86 machines.

+13  A: 

Just pass the -m32 option to gcc.

Martin v. Löwis
A: 

install 32-bit gcc compiler via distro-specific package manager or build it yourself.

HTH

plan9assembler