mirror of
https://github.com/hazemKrimi/jack-vm-translator.git
synced 2026-05-01 18:00:27 +00:00
Handle function commands
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user