Билобрам Денис P3219
10 unresolved threads
assigned to @RayRelax
- Last updated by Denis Bilobram
1 %include "lib.inc" 2 section .text 3 global find_word 4 5 find_word: 6 ; rdi Указатель на нуль-терминированную строку. 7 ; rsi Указатель на начало словаря. 8 push rbp 9 push rbx 10 push rcx 11 push rdx changed this line in version 2 of the diff
- Last updated by Denis Bilobram
1 lib.o: lib.asm 2 nasm -f elf64 -o lib.o lib.asm 3 4 dict.o: dict.asm lib.inc lib.asm changed this line in version 2 of the diff
- Last updated by Denis Bilobram
1 lib.o: lib.asm 2 nasm -f elf64 -o lib.o lib.asm 3 4 dict.o: dict.asm lib.inc lib.asm 5 nasm -f elf64 -o dict.o dict.asm 6 7 main.o: main.asm dict.asm dict.inc lib.inc lib.asm word.inc changed this line in version 2 of the diff
- Last updated by Denis Bilobram
10 main: main.o dict.o lib.o 11 ld -o main main.o dict.o lib.o 12 13 test: 14 @echo "Printing value of the key1 (first word explanation):" 15 ./main < key1 16 @echo "\n" 17 @echo "Printing value of the key2 (second word explanation):" 18 ./main < key2 19 @echo "\n" 20 @echo "Printing value of the key3 (third word explanation):" 21 ./main < key3 22 @echo "\n" 23 @echo "Printing value of the key4 (---):" 24 ./main < key4 25 @echo "\n" changed this line in version 2 of the diff
- Last updated by Denis Bilobram
1 lib.o: lib.asm 2 nasm -f elf64 -o lib.o lib.asm 3 4 dict.o: dict.asm lib.inc lib.asm 5 nasm -f elf64 -o dict.o dict.asm 6 7 main.o: main.asm dict.asm dict.inc lib.inc lib.asm word.inc 8 nasm -f elf64 -o main.o main.asm 9 10 main: main.o dict.o lib.o 11 ld -o main main.o dict.o lib.o 12 13 test: 14 @echo "Printing value of the key1 (first word explanation):" changed this line in version 2 of the diff
- Last updated by Denis Bilobram
2 %include "lib.inc" 3 section .data 4 buffer db 255 dup(0) 5 buffer_size equ $-buffer 6 error_message: db "Error: key wasn't found in dict", 0 7 %include "word.inc" 8 9 section .text 10 global _start 11 12 _start: 13 mov rax, 0 14 mov rdi, 0 15 mov rsi, buffer 16 mov rdx, buffer_size 17 syscall changed this line in version 2 of the diff
17 syscall 18 mov rdi, buffer 19 mov rsi, node%[prev_counter] 20 call find_word 21 test rax, rax 22 jz .error 23 lea rdi, [rax+8] 24 call string_length 25 inc rax 26 add rdi, rax 27 call print_string 28 mov rdi, 0 29 call exit 30 .error: 31 mov rdi, error_message 32 call print_string - Last updated by Denis Bilobram
18 mov rdi, buffer 19 mov rsi, node%[prev_counter] 20 call find_word 21 test rax, rax 22 jz .error 23 lea rdi, [rax+8] 24 call string_length 25 inc rax 26 add rdi, rax 27 call print_string 28 mov rdi, 0 29 call exit 30 .error: 31 mov rdi, error_message 32 call print_string 33 mov rdi, 0 changed this line in version 2 of the diff
- Last updated by Denis Bilobram
1 %include "dict.inc" 2 %include "lib.inc" 3 section .data 4 buffer db 255 dup(0) changed this line in version 2 of the diff
- Last updated by Denis Bilobram
1 %include "dict.inc" 2 %include "lib.inc" 3 section .data 4 buffer db 255 dup(0) 5 buffer_size equ $-buffer 6 error_message: db "Error: key wasn't found in dict", 0 changed this line in version 2 of the diff
@RayRelax внёс правки.