Update reinette.c

This commit is contained in:
ArthurFerreira2 2019-03-09 14:36:22 +01:00 committed by GitHub
parent b0ce503feb
commit 229f3f89ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -546,9 +546,9 @@ int main(int argc, char *argv[]) {
// main loop // main loop
while(1){ while(1){
for (i=0; i<100; i++){ // executes 100 instructions before a kbd scan for (i=0; i<100; i++){ // executes 100 instructions before a kbd scan
opcode = readMem(reg.PC++); // fetch and increment the Program Counter opcode = readMem(reg.PC++); // FETCH and increment the Program Counter
addressing[opcode](); // decode operands against the addressing mode addressing[opcode](); // DECODE operands against the addressing mode
instruction[opcode](); // execute the instruction instruction[opcode](); // EXEC the instruction
} }
// keyboard controller // keyboard controller