Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
inOut.asm
;File: inOut.asm ;read from standard in and write to standard out ;assemble using NASM: nasm -felf64 inOut.asm -o inOut.o ;link with ld: ld –o inOut inOut.o ;execute with ./inOut %define STDIN 0 %define STDOUT 1 %define EXIT 60 %define WRITE 1 %define READ 0 %define BUFLEN 256 section .data msg1: db "Enter string: " len1: equ $-msg1 ;length of first message section .bss buf: resb BUFLEN section .text global _start _start: mov rax, WRITE mov rdi, STDOUT mov rsi, msg1 mov rdx, len1 syscall mov rax, READ mov rdi, STDIN mov rsi, buf mov rdx, BUFLEN syscall mov rax, WRITE mov rdi, STDOUT mov rsi, buf mov rdx, BUFLEN syscall mov rax,EXIT xor rdi,rdi syscall
run
|
edit
|
history
|
help
0
dssdffdsafsd
lec4.asm
subtract
ASCII TO HEX (Accept and Display)
hkvhkvhk
sadffsdfdsafsd
intmain.asm
dsafdafdfds
fdsafsfsdfs
Fib