From ae34c01c77c10006212b140889b8f7c20122f721 Mon Sep 17 00:00:00 2001 From: Lucia Ceionia Date: Sat, 16 Dec 2023 19:30:47 -0600 Subject: [PATCH] skip printing for speed --- 16/main.s | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/16/main.s b/16/main.s index 8e853b1..7273268 100644 --- a/16/main.s +++ b/16/main.s @@ -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