Follow 12 BIT address bus.

This commit is contained in:
lux 2017-08-17 20:50:36 +02:00
parent a907e23f9c
commit bc97f5bd79
1 changed files with 2 additions and 1 deletions

View File

@ -42,7 +42,8 @@ int main(int argc, char *argv[])
//CPU control flow
if(execute(op_code,data_addr,ram)) //EXECUTE instruction, jump if ALU says
pc=find_data(ram[pc]);
else pc++;
else pc++;
if(pc>4095) pc = pc % 4096; //TOY can only address 12 Bit
//Handele user output
printf("PROGRAM COUNTER: %" PRIu16 "\n",pc);