aboutsummaryrefslogtreecommitdiff
path: root/Semestr 4/ask/lista5/zad1.asm
diff options
context:
space:
mode:
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
-