source: trunk/syscall.asm@ 22

Last change on this file since 22 was 22, checked in by Mattia Monga, 11 years ago

Chiamata di libreria vs. syscall

File size: 368 bytes
RevLine 
[21]1segment .text
2 global main
[22]3 extern printf
[21]4
[22]5main: push msg
6 call printf ; chiamata di libreria
7
8 mov ecx, msg ; stringa
[21]9 mov edx, msg_size ; dimensione stringa
10 mov ebx, 1 ; file descriptor (stdout)
11 mov eax, 4 ; syscall 4 (write)
12 int 0x80
13
14 mov eax, 1 ; syscall 1 (exit)
15 int 0x80
16
17
18segment .rodata
19msg db 'Ciao solabbisti!',10,0
20msg_size equ $ - msg
21
Note: See TracBrowser for help on using the repository browser.