CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009
    Posts
    1

    assembly noob, error: junk at end of line

    Hey, i just started a class in assembly language and im receiving a strange error. When ever I attempt to compile the program, I get an error that says "Error: junk at end of line, first recognized character is valued: 0xffffffc2" (lines 5 and 7). I am using the gcc compiler as provided by the latest version of ubuntu.

    the problem appears to only occur after attempting to declare a string.

    Here is the code:

    .section .data
    values:
    .int 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60
    output:
    .asciz "The value is %d\n"
    sum:
    .asciz "The sum is %d\n"
    .section .text
    .globl _start
    _start:
    nop
    movl $0, %edi
    loop:
    movl values(, %edi, 4), %eax
    addl %eax, %ecx
    pushl %eax
    pushl $output
    call printf
    addl $8, %esp
    inc %edi
    cmpl $11, %edi
    jne loop
    pushl %ecx
    call printf
    addl $4, %esp
    movl $0, %ebx
    movl $1, %eax
    int 0x80

  2. #2
    Join Date
    Jun 2009
    Posts
    16

    Re: assembly noob, error: junk at end of line

    gcc able to assembler ?
    i thought it only support inline assembly
    try gas or nasm

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts



HTML5 Development Center

Click Here to Expand Forum to Full Width