Problem:Embed C code in GAS language file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I saw Gnu C code embedded in gnu assembly file. I've a simple code like below:

.section .data
int i = 1;

.section .text
.globl main
main:
   nop
   movl $2, i
   movl $1, %eax
   movl $0, %ebx
   int  $0x80


But when i try to compile with gcc -c i get the message:

test1.s: Assembler messages:
test1.s:2: Error: invalid character '=' in operand 1

Am i missing something obvious? Thanks.
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies]     [Security]     [Linux C Programming]     [Linux for Hams]     [DCCP]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux