Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
lec4c
;nasm -felf64 -g lec4c.asm -o lec4.0 ;gcc -m64 -nostartfiles -o lec4c lec4c.o ;./lec4c extern printf section .data count dq 0 value dq 15 format db "%s %d",10,0 str1 db "count is: ",0 str2 db "value is: ",0 section .text global _start _start: inc byte [count] dec byte [value] mov rbx, count inc byte [rbx] mov rcx,value dec byte [rcx] print1: mov rdi,format ;first argument mov rsi,str2 ;second argument mov rdx, [value] ;third argument mov rax,0 call printf ;call the C function print2: mov rdi,format mov rsi,str1 mov rdx, [count] mov rax,0 call printf exit: mov rax,60 xor rdi, rdi syscall
run
|
edit
|
history
|
help
0
mortgage
fgsgdgfsdgfsdfd
qw
intarith
sdfsfasfsdfsd
dfsfsfsfsafd
FirstProject
countingnumbers
dsadsadasdsa
mult