Last active
March 29, 2020 20:42
-
-
Save lf94/07587cad9f5a20b4310bf78dcc171a2e 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
.intel_syntax noprefix | |
.include "std.macro" | |
.section .text | |
fib: op1 = rdi; op2 = rsi; iterations = rcx | |
xadd op2, op1 | |
loop fib | |
ret | |
.global main | |
main: | |
λ fib 1, 1, 100 | |
λ exit, 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment