skip printing for speed

This commit is contained in:
Lucia Ceionia 2023-12-16 19:30:47 -06:00
parent 83f5ba9fae
commit ae34c01c77

View File

@ -10,6 +10,7 @@ global _start
;%define FILENAME "input_test"
;%define ITER_PRINT
;%define FINAL_PRINT
_start:
@ -420,6 +421,7 @@ xor esi, esi ; top line
test al, al
jz .prnt_char
inc ebp
%ifdef FINAL_PRINT
p_string ansi_color_highbold_green
cmp bl, '.'
jne .prnt_char
@ -448,25 +450,32 @@ xor esi, esi ; top line
mov eax, edx
call print_dec
jmp .prnt_done
%endif
.prnt_char:
%ifdef FINAL_PRINT
mov al, [esi+ecx+file]
call print_char
.prnt_done:
p_string ansi_color_reset
%endif
.for_chars_cont:
inc ecx
cmp ecx, LINE_LEN-2
jbe .for_chars
.for_chars_done:
.for_lines_cont:
%ifdef FINAL_PRINT
call newline
%endif
add esi, LINE_LEN
cmp esi, len(file)
jb .for_lines
%ifdef FINAL_PRINT
mov eax, ebp
call print_dec
call newline
call newline
%endif
cmp [final_value], ebp
cmova ebp, [final_value]
mov [final_value], ebp