diff options
author | Franciszek Malinka <franciszek.malinka@gmail.com> | 2021-10-05 21:49:54 +0200 |
---|---|---|
committer | Franciszek Malinka <franciszek.malinka@gmail.com> | 2021-10-05 21:49:54 +0200 |
commit | c5fcf7179a83ef65c86c6a4a390029149e518649 (patch) | |
tree | d29ffc5b86a0d257453cedcf87d91a13d8bf3b0d /semestr-4/ask/lista6/puzzle7.s | |
parent | f8a88b6a4aba1f66d04711a9330eaba49a50c463 (diff) |
Duzy commit ze smieciami
Diffstat (limited to 'semestr-4/ask/lista6/puzzle7.s')
-rw-r--r-- | semestr-4/ask/lista6/puzzle7.s | 29 |
1 files changed, 29 insertions, 0 deletions
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 |