Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Last login: Sat Oct 7 10:23:23 on ttys001
- ^[[A% (base) denisryapolov@MacBook-Air-2 ~ % ssh carantire@student1.myltsev.ru
- Welcome to Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-73-generic x86_64)
- * Documentation: https://help.ubuntu.com
- * Management: https://landscape.canonical.com
- * Support: https://ubuntu.com/advantage
- System information as of Sat Oct 7 11:05:20 AM UTC 2023
- System load: 1.5419921875 Processes: 633
- Usage of /: 71.4% of 196.76GB Users logged in: 3
- Memory usage: 72% IPv4 address for docker0: 172.17.0.1
- Swap usage: 0% IPv4 address for eth0: 10.128.0.23
- * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
- just raised the bar for easy, resilient and secure K8s cluster deployment.
- https://ubuntu.com/engage/secure-kubernetes-at-the-edge
- 130 updates can be applied immediately.
- To see these additional updates run: apt list --upgradable
- *** System restart required ***
- Last login: Sat Oct 7 07:23:28 2023 from 37.204.18.181
- carantire@caos-2022-students-1:~$ cd caos
- carantire@caos-2022-students-1:~/caos$ cd sm02
- carantire@caos-2022-students-1:~/caos/sm02$ cd 5
- carantire@caos-2022-students-1:~/caos/sm02/5$ micro sm02-5.S
- 1 .global supersum.
- 2 supersum:
- 3 xor %edx, %edx // буфер для промежуточной суммы
- 4 cmp %esi, %edi
- 5 jle swap
- 6 push %ebx
- 7 mov $-1, %ebx 8 jmp put 9 10 put: 11 xor %edx, %edx 12 inc %ebx 13 cmp %ebx, %esi 14 jle prepare_loop 15 movb (%eax, %ebx, 1), %edx 16 movb %edx, (%ecx, %ebx, 1) 17 jmp loop 18 19 prepare_loop: 20 mov $-1, %ebx 21 xor %edx, %edx 22 loop: 23 inc %ebx 24 cmp %eax, %edi 25 jg add_remain 26 addw (%ecx, %ebx, 1), %dx 27 addw (%eax, %ebx, 1), %dx 28 mov %dl, (%ecx, %ebx, 1) 29 mov %dh, %dl 30 xor %dh, %dh 31 jmp loop 32 33 swap: 34 xchg %eax, %ebx 35 xchg %esi, %edi 36 jmp supersum 37 38 add_remain: 39 addw (%ecx, %ebx, 1), %dx 40 mov %dl, (%ecx, %ebx, 1) 41 mov %dh, %dl 42 xor %dh, %dh ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement