Created
December 12, 2020 08:02
-
-
Save codekittie/7ded576f323a844b17c3e5ecc7f884c3 to your computer and use it in GitHub Desktop.
asm program to multiple 6 by 5 ~recursively~
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
global _start | |
section .text | |
multiply: | |
xor rax, rax | |
cmp rsi, 0 | |
je base_case | |
dec rsi | |
call multiply | |
add rax, rdi | |
base_case: | |
ret | |
_start: | |
mov rdi, 6 | |
mov rsi, 5 | |
call multiply | |
push rax | |
mov rax, 60 | |
mov rdi, [rsp] | |
syscall |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment