Merge branch 'main' of https://chookspace.com/SpookyDervish/MyLittleCPU
This commit is contained in:
@@ -15,4 +15,4 @@ asmSources = files(
|
|||||||
args = ['-Wall', '-Wextra']
|
args = ['-Wall', '-Wextra']
|
||||||
|
|
||||||
executable('emu', sources, c_args: args)
|
executable('emu', sources, c_args: args)
|
||||||
execuatble('assembler', asmSources, c_args: args)
|
executable('assembler', asmSources, c_args: args)
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
|
|
||||||
inline Instruction fetchInst(Emulator* emu) {
|
static inline Instruction fetchInst(Emulator* emu) {
|
||||||
Instruction inst = decodeInstruction(emu->mem, &emu->pc);
|
Instruction inst = decodeInstruction(emu->mem, &emu->pc);
|
||||||
printf("%s\n", instructionToCStr(inst));
|
printf("%s\n", instructionToCStr(inst));
|
||||||
return inst;
|
return inst;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void updateFlagsRegister(Emulator* emu, int32_t value) {
|
static inline void updateFlagsRegister(Emulator* emu, int32_t value) {
|
||||||
if (value == 0) {
|
if (value == 0) {
|
||||||
emu->regs[REG_F] = FLAG_ZERO;
|
emu->regs[REG_F] = FLAG_ZERO;
|
||||||
} else if (value < 0) {
|
} else if (value < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user