Add output enable to example
This commit is contained in:
parent
74ea060849
commit
b0f92beaed
|
|
@ -26,7 +26,7 @@ The instructions can be split into 4 categories, which can be distinguished by t
|
|||
* Immediate 🔴🔴🟤🟤🟤🟤🟤🟤
|
||||
These instructions represent a number between 0 and 63 (inclusive), which will be put into register 0
|
||||
|
||||
Assembly Mnemonics
|
||||
** Assembly Mnemonics
|
||||
Generally, these instructions are represented directly by using the value (a number between 0 and 63) directly, since they represent the actual number.
|
||||
|
||||
* Calculate 🔴🟢🟤🟤🟤🟤🟤🟤
|
||||
|
|
|
|||
3
main.c
3
main.c
|
|
@ -252,6 +252,7 @@ void cpu_diagnostics(overture* cpu) {
|
|||
|
||||
printf("input: %d\n", cpu->input);
|
||||
printf("output: %d\n", cpu->output);
|
||||
printf("Output enabled?: %d\n", cpu->output_enable);
|
||||
|
||||
printf("Current instruction: %d\n\n", cpu->current_instruction);
|
||||
}
|
||||
|
|
@ -283,7 +284,7 @@ void overture_start_clock(overture* cpu, uint8_t rom[256]) {
|
|||
}
|
||||
|
||||
int main() {
|
||||
uint8_t rom[256] = { 63, 129, 7, 130, 68 };
|
||||
uint8_t rom[256] = { 63, 129, 7, 130, 68 , 158 };
|
||||
overture cpu = {
|
||||
.step_mode = true,
|
||||
.clock_speed_hz = 1,
|
||||
|
|
|
|||
Loading…
Reference in New Issue