Changes between Version 11 and Version 12 of Sperimentazione 2


Ignore:
Timestamp:
Mar 8, 2017, 1:58:11 PM (7 years ago)
Author:
Mattia Monga
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Sperimentazione 2

    v11 v12  
    11 
     2{{{#!nasm
     3segment .text                   ; segmento "testo" (istruzioni)
     4global main                     ; nome convenzionale
     5extern printf, exit
     6
     7main:
     8  mov eax, 24
     9  add eax, 42
     10  mov [x], eax
     11
     12  push dword [x]
     13  push fmt
     14  call printf
     15
     16  push 0
     17  call exit
     18
     19segment .data                   ; segmento dati
     20x: dw 0
     21
     22segment .rodata                 ; segmento dati in sola lettura
     23fmt: db 'Risultato: %d',10,0
     24
     25}}}
     26
     27
    228
    329  * [source:trunk/syscall.asm@21 Esempio chiamata syscall in Linux]