Created
November 25, 2011 05:59
-
-
Save dgalling/1392896 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| section .data | |
| filename: db 'begin.asm', 0x00 | |
| message: db 'Welcome to Reader', 0x0a, 0x00 | |
| section .bss | |
| buffer: resb 64 | |
| section .text | |
| global start | |
| start: | |
| mov rax, 0x2000003 | |
| mov rdi, 2 | |
| mov rsi, buffer | |
| mov rdx, 64 | |
| syscall | |
| mov rax, 0x2000004 ; write() | |
| mov rdi, 1 ; stdout | |
| mov rsi, buffer | |
| mov rdx, 64 | |
| syscall | |
| mov rax, 0x2000001 ; exit() | |
| mov rdi, 0 ; return 0 | |
| syscall | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment