Last active
January 15, 2016 01:55
-
-
Save drnickallgood/72eee5d9989ca1ccc149 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global start | |
section .data | |
prompt db "Enter Something... " | |
section .bss | |
buffer: resw 4 | |
outstring: resw 4 | |
section .text | |
start: | |
mov rax, 0x2000004 ; sys write | |
mov rdi, 1 ; stdout | |
mov rsi, prompt ; address of prompt | |
mov rdx, 32 | |
syscall | |
mov rax, 0x2000003 ; sys read | |
mov rdi, 0 ; stdin | |
mov rsi, buffer | |
mov rdx, 32 | |
syscall | |
mov rax, 0x200004 | |
mov rdi, 1 | |
mov rsi, buffer | |
mov rdx, 32 | |
syscall | |
mov rax, 0x200001 ;sys exit | |
mov rdi, 0 ; clean exit | |
syscall | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment