diff --git a/README.md b/README.md index 39a083b2eb0ef5afa60ba1ebb5236846f3b60fe8..8d9632503ba3986937f6630081445b0625b5c137 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 8c4b0bf85f96a4a1059b5fe9ff23a57313770f67..9e0ba8d7261a4539a26b5192f89ec1238ea3ecdb 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 dc32ac48ae44b262fdb85bc57b933ff85ed91cf3..e21062312f976aca2c33cd8bc54e212577bf20c2 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