Follow 12 BIT address bus.

This commit is contained in:
lux 2017-08-17 20:50:36 +02:00
parent a907e23f9c
commit bc97f5bd79

View File

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