Last change
on this file since 21 was 21, checked in by Mattia Monga, 11 years ago |
Esempio chiamata syscall in Linux
|
File size:
305 bytes
|
Line | |
---|
1 | segment .text
|
---|
2 | global main
|
---|
3 |
|
---|
4 | main: mov ecx, msg ; stringa
|
---|
5 | mov edx, msg_size ; dimensione stringa
|
---|
6 | mov ebx, 1 ; file descriptor (stdout)
|
---|
7 | mov eax, 4 ; syscall 4 (write)
|
---|
8 | int 0x80
|
---|
9 |
|
---|
10 | mov eax, 1 ; syscall 1 (exit)
|
---|
11 | int 0x80
|
---|
12 |
|
---|
13 |
|
---|
14 | segment .rodata
|
---|
15 | msg db 'Ciao solabbisti!',10,0
|
---|
16 | msg_size equ $ - msg
|
---|
17 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.