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

GAS and int $0x80




The following code works on plain P4 Linux but fails
on AMD Linux with 'Segmentation fault' at the instruction:

   int $0x80

Any ideas?
-ishwar
---
/* Hello, world in assembly.. */

       .data
hello: .string "Hello, world!\n"
       .text
       .global main
main:  movl    $4,%eax
       movl    $1, %ebx
       movl    $hello,%ecx
       movl    $14,%edx
       int     $0x80

       movl    $1, %eax
       xorl    %ebx,%ebx
       int     $0x80
       ret
---------


Reply to: