aboutsummaryrefslogtreecommitdiff
path: root/Semestr 4/ask/lista5/zad1.asm
diff options
context:
space:
mode:
authorFranciszek Malinka <franciszek.malinka@gmail.com>2021-10-05 21:49:54 +0200
committerFranciszek Malinka <franciszek.malinka@gmail.com>2021-10-05 21:49:54 +0200
commitc5fcf7179a83ef65c86c6a4a390029149e518649 (patch)
treed29ffc5b86a0d257453cedcf87d91a13d8bf3b0d /Semestr 4/ask/lista5/zad1.asm
parentf8a88b6a4aba1f66d04711a9330eaba49a50c463 (diff)
Duzy commit ze smieciami
Diffstat (limited to 'Semestr 4/ask/lista5/zad1.asm')
-rw-r--r--Semestr 4/ask/lista5/zad1.asm15
1 files changed, 0 insertions, 15 deletions
diff --git a/Semestr 4/ask/lista5/zad1.asm b/Semestr 4/ask/lista5/zad1.asm
deleted file mode 100644
index 22aef29..0000000
--- a/Semestr 4/ask/lista5/zad1.asm
+++ /dev/null
@@ -1,15 +0,0 @@
-puzzle: testl %esi, %esi
- je .L4 ; jesli esi == 0, skocz do L4
- xorl %edx, %edx ; edx := 0
- xorl %eax, %eax ; eax := 0
-.L3: movl %edi, %ecx ; ecx := edi
- andl $1, %ecx ; ecx &= 1
- addl %ecx, %eax ; eax += eax
- sarq %rdi ; rdi >>= 1
- incl %edx, ; edx++
- cmpl %edx, %esi ; edx - esi != 0? <=> edx != esi
- jne .L3 ; jesli tak, skocz do L3
- ret
-.L4 movl %esi, %eax ; return esi
- ret
-