Skip to content

Instantly share code, notes, and snippets.

@matutter
Created December 6, 2014 07:41
Show Gist options
  • Select an option

  • Save matutter/452649878e81e68bf5cb to your computer and use it in GitHub Desktop.

Select an option

Save matutter/452649878e81e68bf5cb to your computer and use it in GitHub Desktop.
ATROBOTS fastest Fibonacci
#def N
#def F
#def I
#def FP
#def TMP
mov N 20
;non recursive fib
!fib
cmp N 1
jle !done
mov F 1
mov FP 1
mov I 2
!for
mov TMP F
add F FP
mov FP TMP
inc I
cmp I N
jge !done
jmp !for
!done
err F
jmp !done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment