Skip to content
Snippets Groups Projects
Commit b8b8cec1 authored by Robert Grancsa's avatar Robert Grancsa
Browse files

Added last changes


Signed-off-by: default avatarRobert Grancsa <robert.grancsa2002@gmail.com>
parent c4a2d8b4
No related branches found
No related tags found
No related merge requests found
......@@ -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**
......
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
......
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment