X-Git-Url: http://git.subgeniuskitty.com/ned1/.git/blobdiff_plain/91c220b6831b5fb24d4f8945004b83a08fb3abe1..b534dfa24f97d29ca672db9c60e7558ba2bf328b:/nedsim/nedsim.c diff --git a/nedsim/nedsim.c b/nedsim/nedsim.c index aa9b7c4..b88328b 100644 --- a/nedsim/nedsim.c +++ b/nedsim/nedsim.c @@ -18,7 +18,7 @@ #include "../common/a.out.h" -#define VERSION 3 +#define VERSION 4 /* Bytes per word. */ #define BPW 4 @@ -437,7 +437,8 @@ void ned_instruction_brz(struct NEDstate * state) { uint32_t new_pc = stack_pop(state->active_thread); - if (state->active_thread->psw->zero == true) { + uint32_t test_word = stack_pop(state->active_thread); + if (test_word == 0) { state->active_thread->pc = new_pc; /* TODO: Find better way to communicate we're skipping ahead to the next word. */ state->active_thread->sc = 4;