"Lu, Felix Tao" wrote:
If you have an assembler language _file_ as such, it should be
named <something>.s specify this file as an input to gcc and
it will be handled automagically. If you are talking about embedding
assembly into a C or C++ file, the syntax is
asm {
assembly stuff
}
Speaking only for myself,
Joe Durusau
gcc -c qqtmp.s
qqtmp.s: Assembler messages:
qqtmp.s:1: Error: Unknown opcode: `bits'
qqtmp.s:2: Error: Unknown opcode: `extern'
qqtmp.s:3: Error: Unknown opcode: `extern'
qqtmp.s:4: Error: Unknown opcode: `extern'
qqtmp.s:5: Error: Unknown opcode: `extern'
qqtmp.s:6: Error: Unknown opcode: `extern'
qqtmp.s:7: Error: Unknown opcode: `extern'
qqtmp.s:8: Error: Unknown opcode: `global'
qqtmp.s:9: Error: Unknown opcode: `global'
qqtmp.s:10: Error: Unknown opcode: `global'
qqtmp.s:11: Error: Unknown opcode: `global'
qqtmp.s:13: Error: Unknown opcode: `section'
qqtmp.s:14: Fatal error: Unknown opcode: `dword_570d08 dd 0'
Did I need any options for the gcc command?
--
Best Regards,
Lu, Felix Tao
Component Engineer
Lucent Qingdao
(Tel)532-8702000-3151
joe durusau <dur...@bellsouth.net> wrote in message
news:3C95D24C...@bellsouth.net...
You should give some more information, but since you talk about nasm,
I guess you want to compile x86 files.
If so, you gonna have to change the file, since the syntax of gas (the
GNU assembler) and nasm are different.
E.g.: Loading AX with 100
nasm:
mov ax,100
gas:
mov $100,%ax
Got it ?
42Bastian
> And when I compile the file, it shows the error message as follows:
>
> gcc -c qqtmp.s
> qqtmp.s: Assembler messages:
> qqtmp.s:1: Error: Unknown opcode: `bits'
> qqtmp.s:2: Error: Unknown opcode: `extern'
> qqtmp.s:3: Error: Unknown opcode: `extern'
> qqtmp.s:4: Error: Unknown opcode: `extern'
> qqtmp.s:5: Error: Unknown opcode: `extern'
> qqtmp.s:6: Error: Unknown opcode: `extern'
> qqtmp.s:7: Error: Unknown opcode: `extern'
> qqtmp.s:8: Error: Unknown opcode: `global'
> qqtmp.s:9: Error: Unknown opcode: `global'
> qqtmp.s:10: Error: Unknown opcode: `global'
> qqtmp.s:11: Error: Unknown opcode: `global'
> qqtmp.s:13: Error: Unknown opcode: `section'
> qqtmp.s:14: Fatal error: Unknown opcode: `dword_570d08 dd 0'
>
>
> Did I need any options for the gcc command?
>
>
No, Just don't work with 'C' syntax like extern or global
Hauke Reese
tel.: 0481/8555-321
fax.: 0481/8555-301
email : re...@fh-westkueste.de
NO! New GAS also supports Intel Syntax.
rg
Benjamin
> > And when I compile the file, it shows the error message as follows:
> >
> > gcc -c qqtmp.s
> > qqtmp.s: Assembler messages:
> > qqtmp.s:1: Error: Unknown opcode: `bits'
> > qqtmp.s:2: Error: Unknown opcode: `extern'
> > qqtmp.s:3: Error: Unknown opcode: `extern'
> > qqtmp.s:4: Error: Unknown opcode: `extern'
> > qqtmp.s:5: Error: Unknown opcode: `extern'
> > qqtmp.s:6: Error: Unknown opcode: `extern'
> > qqtmp.s:7: Error: Unknown opcode: `extern'
> > qqtmp.s:8: Error: Unknown opcode: `global'
> > qqtmp.s:9: Error: Unknown opcode: `global'
> > qqtmp.s:10: Error: Unknown opcode: `global'
> > qqtmp.s:11: Error: Unknown opcode: `global'
> > qqtmp.s:13: Error: Unknown opcode: `section'
> > qqtmp.s:14: Fatal error: Unknown opcode: `dword_570d08 dd 0'
> >
> >
> > Did I need any options for the gcc command?
> >
> >
>
> No, Just don't work with 'C' syntax like extern or global
How can I correct the errors? I should use "extern" and "global" keys.