Unnamed
public text v1 · immutable;kompilacja:
;nasm -f elf laczenie.asm
;gcc -o test laczenie.o
section .text use32
global main
extern printf
extern scanf
main:
push dword napis_pocz
call printf
push bufor
push wyrazenie
call scanf
push dword [bufor]
push napis_kan
call printf
add esp, 20 ;5*4
ret
section .data
napis_pocz db "Podaj "
db "liczbe calkowita "
db ":)", 10 , 0
napis_kan db "Podana "
db "liczba to %d", 10
db 0
wyrazenie db "%d"
bufor times 10 dw 0