Added Missing OPCODE NOT
This commit is contained in:
parent
dc376ad606
commit
b14ab2c6a5
|
@ -204,11 +204,12 @@
|
|||
| 09 00 03 ab | SWAP a b | a <=> b |
|
||||
| 09 00 04 ab | COPY a b | a = b |
|
||||
| 09 00 05 ab | MOVE a b | a = b; b = 0 |
|
||||
| 09 00 06 ab | NOT a b | a = !b |
|
||||
|
||||
**** Reserved Block 0
|
||||
| Hex | Name |
|
||||
|-------------+----------|
|
||||
| 09 00 06 xx | Reserved |
|
||||
| 09 00 07 xx | Reserved |
|
||||
| ... | Reserved |
|
||||
| 09 00 FF xx | Reserved |
|
||||
|
||||
|
|
1
vm.h
1
vm.h
|
@ -220,6 +220,7 @@ void XORI(struct lilith* vm, struct Instruction* c);
|
|||
void NANDI(struct lilith* vm, struct Instruction* c);
|
||||
void NORI(struct lilith* vm, struct Instruction* c);
|
||||
void XNORI(struct lilith* vm, struct Instruction* c);
|
||||
void NOT(struct lilith* vm, struct Instruction* c);
|
||||
|
||||
/* Prototypes for functions in vm_decode.c*/
|
||||
struct lilith* create_vm(size_t size);
|
||||
|
|
11
vm_decode.c
11
vm_decode.c
|
@ -1189,6 +1189,17 @@ bool eval_2OP_Int(struct lilith* vm, struct Instruction* c)
|
|||
MOVE(vm, c);
|
||||
break;
|
||||
}
|
||||
case 0x0006: /* NOT */
|
||||
{
|
||||
#ifdef DEBUG
|
||||
strncpy(Name, "NOT", 19);
|
||||
#elif TRACE
|
||||
record_trace("NOT");
|
||||
#endif
|
||||
|
||||
NOT(vm, c);
|
||||
break;
|
||||
}
|
||||
case 0x0100: /* BRANCH */
|
||||
{
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -1953,3 +1953,8 @@ void XNORI(struct lilith* vm, struct Instruction* c)
|
|||
{
|
||||
vm->reg[c->reg0] = ~(vm->reg[c->reg1] ^ c->raw_Immediate);
|
||||
}
|
||||
|
||||
void NOT(struct lilith* vm, struct Instruction* c)
|
||||
{
|
||||
vm->reg[c->reg0] = ~(vm->reg[c->reg1]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue