Fibonacci Ex Added
This commit is contained in:
parent
95a23482a5
commit
dbdf71f35b
1 changed files with 19 additions and 0 deletions
19
008-fibonacci.s
Normal file
19
008-fibonacci.s
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
.global _start
|
||||||
|
.intel_syntax noprefix
|
||||||
|
|
||||||
|
// first 5 series of fibonnacci using stack
|
||||||
|
|
||||||
|
_start:
|
||||||
|
mov ax, 1
|
||||||
|
mov bx, 0
|
||||||
|
push bx
|
||||||
|
cmp cx, 00H
|
||||||
|
je son
|
||||||
|
|
||||||
|
dongu:
|
||||||
|
add bx, ax
|
||||||
|
push ax
|
||||||
|
xchg ax, bx
|
||||||
|
loop dongu:
|
||||||
|
//exit
|
||||||
|
syscall
|
Loading…
Add table
Add a link
Reference in a new issue