mirror of
https://github.com/hazemKrimi/jack-vm-translator.git
synced 2026-05-01 18:00:27 +00:00
More fixing of functions logic wip
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
int callCounter = 0;
|
int callCounter = 1;
|
||||||
|
|
||||||
string translateFunction(string name, int args)
|
string translateFunction(string name, int args)
|
||||||
{
|
{
|
||||||
@@ -12,7 +12,7 @@ string translateFunction(string name, int args)
|
|||||||
|
|
||||||
output << "(" << name << ")" << endl;
|
output << "(" << name << ")" << endl;
|
||||||
|
|
||||||
for (int i = 0; i < args; i++)
|
for (int i = 0; i < args; ++i)
|
||||||
{
|
{
|
||||||
output << "@0" << endl;
|
output << "@0" << endl;
|
||||||
output << "D=A" << endl;
|
output << "D=A" << endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user