From c5fcf7179a83ef65c86c6a4a390029149e518649 Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Tue, 5 Oct 2021 21:49:54 +0200 Subject: Duzy commit ze smieciami --- semestr-4/ask/lista6/puzzle7.s | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 semestr-4/ask/lista6/puzzle7.s (limited to 'semestr-4/ask/lista6/puzzle7.s') diff --git a/semestr-4/ask/lista6/puzzle7.s b/semestr-4/ask/lista6/puzzle7.s new file mode 100644 index 0000000..6d26961 --- /dev/null +++ b/semestr-4/ask/lista6/puzzle7.s @@ -0,0 +1,29 @@ + .global puzzle7 + + .text +puzzle7: + movq %rsi, -40(%rsp) + movq %rdx, -32(%rsp) + movq %rcx, -24(%rsp) + movq %r8, -16(%rsp) + movq %r9, -8(%rsp) + movl $8, -72(%rsp) + leaq 8(%rsp), %rax + movq %rax, -64(%rsp) + leaq -48(%rsp), %rax + movq %rax, -56(%rsp) + movl $0, %eax + jmp .L2 +.L3: movq -64(%rsp), %rdx + leaq 8(%rdx), %rcx + movq %rcx, -64(%rsp) +.L4: addq (%rdx), %rax +.L2: subq $1, %rdi + js .L6 + cmpl $47, -72(%rsp) + ja .L3 + movl -72(%rsp), %edx + addq -56(%rsp), %rdx + addl $8, -72(%rsp) + jmp .L4 +.L6: ret -- cgit v1.2.3