1
Fork 0

chapter 0x01 explained

This commit is contained in:
Jan-Erik Rediger 2023-09-15 11:57:47 +00:00
parent e42b567df7
commit 5b069057fa

13
0x01.asm Normal file
View file

@ -0,0 +1,13 @@
BITS 64
SECTION .text
global main
; calculate the fibonacci sequence.
; n_2 = n_1 + n_0
main:
mov rax, 1 ; inital values
mov rdx, 1
.loop: ; a label
xadd rax, rdx ; swap rdx and rax, store rdx+rax into rax
loop .loop ; jump back to the .loop label