Skip to content

Trying to figure out Project 5 #17

Description

@gilmerc

`

const char *HardCodePrint1 =
"0: LDC 0,1(0)"
"1: OUT 0,0,0"
"2: HALT 0,0,0";

const char *HardCodeASTPrint1 = " ";

void Register(line, code, r1,r2,r3, comment = "") {
registerStr = r1",",r2,","r3;
cout << (line,code,registerStr,comment) <<
}
void Register2(line, code, r1,difference,r2,comment) {
registerStr2 = r1","difference"("r2")";
cout << (line,code,registerStr2,comment);
}

void args(node){
if (node == "program") {
//to do
}
}

void print(line,HardCodeASTPrint1) {
Register2(line,"LDC",0,1,0, "where comment should be")
line += 1;
for (i in range(2)) {
Register(line,"OUT",0,0,0,"comment");
line += 1;
}
Register(line,"HALT",0,0,0,"comment");
}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions