Skip to content

first commit#208

Open
DavidBenavidez123 wants to merge 2 commits into
bloominstituteoftechnology:masterfrom
DavidBenavidez123:master
Open

first commit#208
DavidBenavidez123 wants to merge 2 commits into
bloominstituteoftechnology:masterfrom
DavidBenavidez123:master

Conversation

@DavidBenavidez123
Copy link
Copy Markdown

No description provided.

Comment thread ls8/cpu.c
//reading from the bitwise right shift will give you the number of operands:
unsigned char operandA = 0;
unsigned char operandB = 0;
unsigned int numOp = IR >> 6;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome job with this! Now you need to use it.

Comment thread ls8/cpu.c
running = 0;
break;
default:
printf("Error");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can make this error more verbose with the program counter and instruction code for better debugging.

Comment thread ls8/cpu.c
cpu->reg[7]--;
cpu->ram[cpu->reg[7]] = val;
}
unsigned char cpu_pop(struct cpu *cpu)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now you need to add PUSH and POP instructions to your switch statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants