Add NOP instruction

This commit is contained in:
g1n 2021-10-08 16:45:02 +03:00
parent bf8b5bb2e2
commit 021a46c4aa
3 changed files with 6 additions and 2 deletions

View File

@ -32,6 +32,8 @@ typedef unsigned short word; // 16 bit
#define INS_JSR 0x20 // JSR
#define INS_RTS 0x60 // RTS
#define INS_NOP 0xEA // NOP
struct MEMORY {
byte memory[MAX_MEMORY];
};

View File

@ -148,7 +148,9 @@ void execute() {
case INS_RTS:
// TODO
break;
case 0xFF: // EOF
case INS_NOP:
break;
case 0x00: // EOF
return;
default:
printf("%04X: Unhandled instruction: %04X\n", cpu.PC, instruction);

View File

@ -1 +1 @@
Uィ
<EFBFBD>Uィ