Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .equ EXIT, 1
- .equ READ, 3
- .equ WRITE, 4
- .equ CLOSE, 6
- .equ PIPE, 42
- .equ STDOUT, 0
- .equ PIPE_WRITE, 4
- .equ PIPE_READ, 0
- .section .data
- hello:
- .ascii "Hello\n"
- .section .bss
- .lcomm buf, 6
- .lcomm pipes, 8
- .section .text
- .globl _start
- _start:
- movl $PIPE, %eax
- movl $pipes, %ebx
- int $0x80
- movl $WRITE, %eax
- movl $pipes, %ecx
- movl PIPE_WRITE(%ecx), %ebx
- movl $hello, %ecx
- movl $6, %edx
- int $0x80
- movl $CLOSE, %eax
- int $0x80
- movl $READ, %eax
- movl $pipes, %ecx
- movl PIPE_READ(%ecx), %ebx
- movl $buf, %ecx
- movl $6, %edx
- int $0x80
- movl $CLOSE, %eax
- int $0x80
- movl $WRITE, %eax
- movl $STDOUT, %ebx
- movl $buf, %ecx
- movl $6, %edx
- int $0x80
- movl $EXIT, %eax
- movl $0, %ebx
- int $0x80
Add Comment
Please, Sign In to add comment