Created
January 7, 2014 19:24
-
-
Save tadzik/8305231 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
┌─[tadzik@yavin]─[~/src/compiler] (master) | |
└─[%]─> cat test3.cal | |
2 / 3 | |
┌─[tadzik@yavin]─[~/src/compiler] (master) | |
└─[%]─> ./calc test3.cal | |
┌─[tadzik@yavin]─[~/src/compiler] (master) | |
└─[%]─> cat a.in | |
section .text | |
global _start | |
_start: | |
push rbp | |
mov rbp, rsp | |
add rsp, 0 | |
mov rax, 2 | |
push rax | |
mov rax, 3 | |
pop rbx | |
div rbx | |
mov rsp, rbp | |
pop rbp | |
mov rbx, rax | |
mov rax, 1 | |
int 80h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment