skip printing for speed
This commit is contained in:
parent
83f5ba9fae
commit
ae34c01c77
@ -10,6 +10,7 @@ global _start
|
|||||||
;%define FILENAME "input_test"
|
;%define FILENAME "input_test"
|
||||||
|
|
||||||
;%define ITER_PRINT
|
;%define ITER_PRINT
|
||||||
|
;%define FINAL_PRINT
|
||||||
|
|
||||||
_start:
|
_start:
|
||||||
|
|
||||||
@ -420,6 +421,7 @@ xor esi, esi ; top line
|
|||||||
test al, al
|
test al, al
|
||||||
jz .prnt_char
|
jz .prnt_char
|
||||||
inc ebp
|
inc ebp
|
||||||
|
%ifdef FINAL_PRINT
|
||||||
p_string ansi_color_highbold_green
|
p_string ansi_color_highbold_green
|
||||||
cmp bl, '.'
|
cmp bl, '.'
|
||||||
jne .prnt_char
|
jne .prnt_char
|
||||||
@ -448,25 +450,32 @@ xor esi, esi ; top line
|
|||||||
mov eax, edx
|
mov eax, edx
|
||||||
call print_dec
|
call print_dec
|
||||||
jmp .prnt_done
|
jmp .prnt_done
|
||||||
|
%endif
|
||||||
.prnt_char:
|
.prnt_char:
|
||||||
|
%ifdef FINAL_PRINT
|
||||||
mov al, [esi+ecx+file]
|
mov al, [esi+ecx+file]
|
||||||
call print_char
|
call print_char
|
||||||
.prnt_done:
|
.prnt_done:
|
||||||
p_string ansi_color_reset
|
p_string ansi_color_reset
|
||||||
|
%endif
|
||||||
.for_chars_cont:
|
.for_chars_cont:
|
||||||
inc ecx
|
inc ecx
|
||||||
cmp ecx, LINE_LEN-2
|
cmp ecx, LINE_LEN-2
|
||||||
jbe .for_chars
|
jbe .for_chars
|
||||||
.for_chars_done:
|
.for_chars_done:
|
||||||
.for_lines_cont:
|
.for_lines_cont:
|
||||||
|
%ifdef FINAL_PRINT
|
||||||
call newline
|
call newline
|
||||||
|
%endif
|
||||||
add esi, LINE_LEN
|
add esi, LINE_LEN
|
||||||
cmp esi, len(file)
|
cmp esi, len(file)
|
||||||
jb .for_lines
|
jb .for_lines
|
||||||
|
%ifdef FINAL_PRINT
|
||||||
mov eax, ebp
|
mov eax, ebp
|
||||||
call print_dec
|
call print_dec
|
||||||
call newline
|
call newline
|
||||||
call newline
|
call newline
|
||||||
|
%endif
|
||||||
cmp [final_value], ebp
|
cmp [final_value], ebp
|
||||||
cmova ebp, [final_value]
|
cmova ebp, [final_value]
|
||||||
mov [final_value], ebp
|
mov [final_value], ebp
|
||||||
|
Loading…
Reference in New Issue
Block a user