Egor Glotov, P3232
10 unresolved threads
- Last updated by Egor Glotov
10 %endmacro 11 12 section .bss 13 buffer resb BUFFER_SIZE ;reserve space for buffer 14 15 section .rodata 16 read_error_msg db "Error while reading from stdin", 0 17 not_found_error_msg db "Key was not found in dictionary", 0 18 19 section .text 20 global _start 21 _start: 22 .cycle: 23 mov rdi, buffer 24 mov rsi, 255 ;taking into account null-termination 25 call read_word changed this line in version 2 of the diff
- Last updated by Egor Glotov
24 mov rsi, 255 ;taking into account null-termination 25 call read_word 26 test rax, rax 27 jz .read_error 28 29 mov rdi, rax 30 mov rsi, next_entry 31 call find_word 32 test rax, rax 33 jz .not_found 34 35 ;if found -> stdout value by key 36 mov rdi, rax 37 call get_value 38 mov rdi, rax 39 print_and_exit print_string changed this line in version 2 of the diff
- Last updated by Egor Glotov
30 mov rsi, next_entry 31 call find_word 32 test rax, rax 33 jz .not_found 34 35 ;if found -> stdout value by key 36 mov rdi, rax 37 call get_value 38 mov rdi, rax 39 print_and_exit print_string 40 .read_error: 41 mov rdi, read_error_msg 42 print_and_exit print_error 43 .not_found: 44 mov rdi, not_found_error_msg 45 print_and_exit print_error changed this line in version 2 of the diff
1 import subprocess as sb 2 from subprocess import PIPE 3 inputs = "tests/input.txt" 4 outputs = "tests/output.txt" 5 executable = "./dict" 6 7 inputs_file = open(inputs, 'r') 8 outputs_file = open(outputs, 'r') 9 10 result = True - Last updated by Egor Glotov
1 apple_pie_butterfly_sunshine 2 mountain_river_forest_sunset 3 fireflies_buttercups_rainbow 4 laughter_happiness_kindness_love 5 garden_blossoms_sunflowers_bees changed this line in version 2 of the diff
@ArslanEfimovLev сделал правки
Претензий больше нет, все верно! Прошу посмотреть вас @andrew
- Last updated by Andrey Zhdanov
3 3 %include "dict.inc" 4 4 %define BUFFER_SIZE 256 5 5 6 %macro print_and_exit 1 6 %macro print_and_exit 2 7 7 call %1 8 8 call print_newline 9 mov rdi, %2 9 10 call exit - Last updated by Egor Glotov
1 ASM=nasm 2 EFLAGS=-f elf64 -g 3 4 .PHONY: all clean test 5 all: dict 6 %.o: %.asm 7 $(ASM) $(EFLAGS) -o $@ $< 8 9 main.o:main.asm lib.inc words.inc dict.inc 10 $(ASM) $(EFLAGS) -o $@ $< 11 dict:main.o lib.o dict.o 12 ld -o $@ $^ 13 test: changed this line in version 3 of the diff
- Last updated by Egor Glotov
1 ASM=nasm 2 EFLAGS=-f elf64 -g 3 4 .PHONY: all clean test 5 all: dict 6 %.o: %.asm 7 $(ASM) $(EFLAGS) -o $@ $< 8 9 main.o:main.asm lib.inc words.inc dict.inc 10 $(ASM) $(EFLAGS) -o $@ $< changed this line in version 3 of the diff
@ilestegor есть несколько комментариев
@andrew сделал фиксы