diff --git a/PDP11/pdp11_cpu.c b/PDP11/pdp11_cpu.c index 17a895a2..d783d59c 100644 --- a/PDP11/pdp11_cpu.c +++ b/PDP11/pdp11_cpu.c @@ -924,8 +924,7 @@ while (reason == 0) { } /* end else t */ if (trapea == 0) { /* nothing to do? */ trap_req = calc_ints (ipl, 0); /* recalculate */ - break; - //continue; /* back to fetch */ + continue; /* back to fetch */ } /* end if trapea */ /* Process a trap or interrupt @@ -975,8 +974,7 @@ while (reason == 0) { if ((cm == MD_KER) && (SP < (STKLIM + STKL_Y)) && (trapnum != TRAP_V_RED) && (trapnum != TRAP_V_YEL)) set_stack_trap (SP); - break; - //continue; /* end if traps */ + continue; /* end if traps */ } /* Fetch and decode next instruction */ diff --git a/PDP11/test.c b/PDP11/test.c index 096a536f..fd13361d 100644 --- a/PDP11/test.c +++ b/PDP11/test.c @@ -85,19 +85,20 @@ json_t *generate_test(uint16_t instruction, int *const id, struct mem_t *mem, si json_t *memory_i = json_array(); for(size_t i=0; i> 8)); + sprintf(buffer2, "%06o", mem[i].addr + 1); + json_object_set(put_mem_i_0, buffer2, json_integer(mem[i].value >> 8)); json_array_append_new(memory_i, put_mem_i_0); } @@ -503,15 +504,17 @@ void emit_misc_operations() saved_PC = 0100; randomize_registers_all_values(); - init_stack_registers(); + STACKFILE[0] = STACKFILE[1] = STACKFILE[2] = STACKFILE[3] = 07774; - struct mem_t mem[1] = { - { 0100, instr } + struct mem_t mem[3] = { + { 0100, instr }, + { 07776, 01234 }, + { 07774, 06420 } }; PSW = psw_val; - json_t *obj = generate_test(instr, &id, mem, 1); + json_t *obj = generate_test(instr, &id, mem, 3); if (obj) json_array_append_new(out, obj); }