Handle function commands

This commit is contained in:
Hazem Krimi
2024-05-06 18:36:25 +01:00
parent 0171464197
commit e0ef0a9850
6 changed files with 178 additions and 29 deletions
+3 -3
View File
@@ -95,7 +95,7 @@ string translateEq()
srand(static_cast<unsigned int>(time(nullptr)));
string LABEL = generateRandomLabel();
string LABEL = generateRandomLabel(8);
output << "@SP" << endl;
output << "M=M-1" << endl;
@@ -147,7 +147,7 @@ string translateGt()
srand(static_cast<unsigned int>(time(nullptr)));
string LABEL = generateRandomLabel();
string LABEL = generateRandomLabel(8);
output << "@SP" << endl;
output << "M=M-1" << endl;
@@ -201,7 +201,7 @@ string translateLt()
srand(static_cast<unsigned int>(time(nullptr)));
string LABEL = generateRandomLabel();
string LABEL = generateRandomLabel(8);
output << "@SP" << endl;
output << "M=M-1" << endl;