Add SEC and CLC ocpu instructions

This commit is contained in:
g1n 2022-04-19 17:38:05 +03:00
parent cad208e9c8
commit 4a18c50bdc
Signed by: g1n
GPG Key ID: 8D352193D65D4E2C
2 changed files with 8 additions and 0 deletions

View File

@ -49,6 +49,8 @@
#define INS_INC 0x15
#define INS_DEC 0x16
#define INS_OCPU_NOP 0x90
#define INS_OCPU_SEC 0x61
#define INS_OCPU_CLC 0x62
struct OCPU_MEMORY {
byte memory[MAX_MEMORY];

View File

@ -352,6 +352,12 @@ void ocpu_execute() {
break;
case INS_OCPU_NOP:
break;
case INS_OCPU_SEC:
ocpu.CF = 1;
break;
case INS_OCPU_CLC:
ocpu.CF = 0;
break;
case 0x00:
return;
default: