Давид Григорьев Р3215
10 unresolved threads
- Last updated by David Grigorev
1 2 %include "assignment-1-io-library/lib.inc" 3 %include "words.inc" 4 5 global find_word 6 7 section .text 8 9 ; %rdi - указатель на ключ 10 ; %rax - указатель на возвращаемое значение (нуль если нет) 11 find_word: 12 mov r8, first ; указатель на ключ changed this line in version 2 of the diff
- Last updated by Andrey Zhdanov
6 ⣿⣿⣿⣿⣿⣿⣟⣫⡾⠛⠛⠛⠛⠛⠛⠿⣾⣽⡻⣿⣿⣿⣿⣿ 7 ⣿⣿⣿⣿⣿⡟⣼⠏⠀⠀⠀⠀⠀⠀⣀⣀⡀⣙⣿⣎⢿⣿⣿⣿ 8 ⣿⣿⣿⣿⣿⢹⡟⠀⠀⠀⣰⡾⠟⠛⠛⠛⠛⠛⠛⠿⣮⡻⣿⣿ 9 ⣿⡿⢟⣻⣟⣽⠇⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⡹⣿ 10 ⡟⣼⡟⠉⠉⣿⠀⠀⠀⠀⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⢟⣿ 11 ⣇⣿⠁⠀⠀⣿⠀⠀⠀⠀⠘⢿⣦⣄⣀⣀⣀⣀⣤⡴⣾⣏⣾⣿ 12 ⡇⣿⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠈⠉⠛⠋⠉⠉⠀⠀⢻⣿⣿⣿ 13 ⢃⣿⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣧⣿⣿ 14 ⡻⣿⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣧⣿⣿ 15 ⡇⣿⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⢹⣿⣿ 16 ⣿⡸⢷⣤⣤⣿⡀⠀⠀⠀⠀⢠⣤⣄⣀⣀⣀⠀⠀⢠⣿⣿⣿⣿ 17 ⣿⣿⣷⣿⣷⣿⡇⠀⠀⠀⠀⢸⡏⡍⣿⡏⠀⠀⠀⢸⡏⣿⣿⣿ 18 ⣿⣿⣿⣿⣿⢼⡇⠀⠀⠀⠀⣸⡇⣷⣻⣆⣀⣀⣀⣼⣻⣿⣿⣿ 19 ⣿⣿⣿⣿⣿⣜⠿⢦⣤⣤⡾⢟⣰⣿⣷⣭⣯⣭⣯⣥⣿⣿⣿⣿ 20 """ 21 - Last updated by David Grigorev
1 %include "assignment-1-io-library/lib.inc" 2 %include "dict.inc" 3 4 %define BUFFER_LENGTH 256 5 section .data 6 7 not_found_message: 8 db "Key is not found!😔", `\n`, 0 9 10 section .text 11 12 global _start 13 14 _start: 15 sub rsp, BUFFER_LENGTH changed this line in version 2 of the diff
12 global _start 13 14 _start: 15 sub rsp, BUFFER_LENGTH 16 mov rdi, rsp 17 mov rsi, BUFFER_LENGTH 18 19 call read_word 20 test rax, rax 21 je .not_found 22 23 mov rdi, rax 24 call find_word 25 test rax, rax 26 je .not_found 27 - Last updated by David Grigorev
1 2 %include "assignment-1-io-library/lib.inc" 3 %include "words.inc" 4 5 global find_word 6 7 section .text 8 9 ; %rdi - указатель на ключ 10 ; %rax - указатель на возвращаемое значение (нуль если нет) 11 find_word: 12 mov r8, first ; указатель на ключ 13 .loop: 14 mov rsi, r8 15 add rsi, 8 ; размер указателя на следующий changed this line in version 2 of the diff
- Last updated by David Grigorev
1 ASM=nasm 2 ASMFLAGS=-g -felf64 3 LD=ld 4 5 OBJDIR=obj 6 7 8 9 program: submodule-init main.o assignment-1-io-library/lib.o dict.o objdir changed this line in version 3 of the diff
17 push r8 18 sub rsp, 8 ; выравнивание стэка 19 call string_equals 20 add rsp, 8 21 pop r8 22 pop rsi 23 test al, al ; проверка на совпадение 24 25 jne .return_key ; строки ключей совпадают 26 27 mov r8, [r8] ; получить следующий элемент 28 test r8, r8 29 30 jne .loop 31 .not_found: 32 xor rax, rax @huji ждём фиксы
@andrew фиксы теперь есть
Edited by David Grigorev
added 5 commits
Toggle commit list