From b8b8cec1ba22f5cc23bea02b0a253a8eb67628a9 Mon Sep 17 00:00:00 2001
From: Robert Grancsa <robert.grancsa2002@gmail.com>
Date: Sun, 23 Mar 2025 22:41:51 +0200
Subject: [PATCH] Added last changes

Signed-off-by: Robert Grancsa <robert.grancsa2002@gmail.com>
---
 README.md                     |  4 ++--
 checker/ref/18-transpiler.ref |  8 ++++++--
 checker/ref/19-transpiler.ref | 12 ++++++++++--
 3 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 39a083b..8d96325 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,9 @@
 
 ## Assignment: Simple C-to-Assembly Compiler
 
-**Deadline soft**: 4 aprilie 2025, 11:55PM
+**Deadline soft**: 6 aprilie 2025, 11:55PM
 
-**Deadline hard**: 9 aprilie 2025, 11:55PM
+**Deadline hard**: 11 aprilie 2025, 11:55PM
 
 **Authors**
 
diff --git a/checker/ref/18-transpiler.ref b/checker/ref/18-transpiler.ref
index 8c4b0bf..9e0ba8d 100644
--- a/checker/ref/18-transpiler.ref
+++ b/checker/ref/18-transpiler.ref
@@ -1,13 +1,15 @@
 MOV edx, 0
 start_loop:
 CMP edx, 65
+JGE end_label
 SHL ecx, 13
 ADD edx, 1
 JMP start_loop
 end_loop:
 MOV eax, 0
 start_loop:
-CMP eax, = 70
+CMP eax, 70
+JG end_label
 SUB edx, 23
 MOV eax, ecx
 DIV 5
@@ -21,6 +23,7 @@ end_loop:
 MOV edx, 0
 start_loop:
 CMP edx, 14
+JGE end_label
 SHR edx, 5
 SUB edx, eax
 ADD edx, 1
@@ -28,7 +31,8 @@ JMP start_loop
 end_loop:
 MOV ecx, 0
 start_loop:
-CMP ecx, = 23
+CMP ecx, 23
+JG end_label
 MOV eax, ecx
 DIV 5
 MOV ecx, eax
diff --git a/checker/ref/19-transpiler.ref b/checker/ref/19-transpiler.ref
index dc32ac4..e210623 100644
--- a/checker/ref/19-transpiler.ref
+++ b/checker/ref/19-transpiler.ref
@@ -1,6 +1,7 @@
 MOV edx, 0
 start_loop:
-CMP edx, = 54
+CMP edx, 54
+JG end_label
 XOR eax, 24
 SHR edx, 10
 MOV eax, ebx
@@ -12,6 +13,7 @@ end_loop:
 MOV ebx, 0
 start_loop:
 CMP ebx, 75
+JGE end_label
 ADD ecx, 11
 XOR ebx, 80
 SUB edx, ecx
@@ -21,7 +23,8 @@ JMP start_loop
 end_loop:
 MOV ebx, 0
 start_loop:
-CMP ebx, = 86
+CMP ebx, 86
+JG end_label
 MUL 2
 ADD ebx, 1
 JMP start_loop
@@ -29,6 +32,7 @@ end_loop:
 MOV eax, 0
 start_loop:
 CMP eax, 66
+JGE end_label
 ADD ebx, 28
 MOV eax, 92
 SHR ebx, 21
@@ -38,6 +42,7 @@ end_loop:
 MOV edx, 0
 start_loop:
 CMP edx, 79
+JGE end_label
 MOV eax, ebx
 MUL ebx
 MOV ebx, eax
@@ -53,6 +58,7 @@ end_loop:
 MOV edx, 0
 start_loop:
 CMP edx, 47
+JGE end_label
 MOV eax, ecx
 MUL 10
 MOV ecx, eax
@@ -62,6 +68,7 @@ end_loop:
 MOV ecx, 0
 start_loop:
 CMP ecx, 29
+JGE end_label
 OR edx, eax
 ADD ebx, 93
 SHL edx, 30
@@ -72,6 +79,7 @@ end_loop:
 MOV ecx, 0
 start_loop:
 CMP ecx, 94
+JGE end_label
 MOV eax, ecx
 DIV 7
 MOV ecx, eax
-- 
GitLab