Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
pushpop.asm
extern printf,scanf section .data msg db "Enter birthyear: ",0 format db '%d',0 msg1 db "In the year %d your age is %d",10,0 section .bss x resd 1 age resd 1 section .text global _start _start: mov rdi,msg ;first parameter mov rax,0 call printf scan: mov rdi, format ;first parameter mov rsi, x ;second parameter mov rax, 0 call scanf mov rax,2020 push rax ;store 2020 on the stack mov rbx,[x] sub rax,rbx ;rax is changed mov [age],rax print: mov rax,0 mov rdi, msg1 pop rsi mov rdx,[age] call printf mov rax, 60 mov rdi, 0 syscall
run
|
edit
|
history
|
help
0
Output in a bit more true assembly
fgsgdgfsdgfsdfd
fdsafddfsafd
Hello World
dsasdfdsdfs
Frequency_of_an_element_from_an_array
lec4bb
mortgage
gfsdfgdgfdgdgfdfgd
tarea1