From e1a0aecf189adf6befb6ad708685813191af48bc Mon Sep 17 00:00:00 2001 From: Justin Wind Date: Sun, 13 May 2012 10:04:02 -0700 Subject: [PATCH] fixed typo in POP looking at wrong register --- dcpu16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dcpu16.c b/dcpu16.c index ea0ee26..616237d 100644 --- a/dcpu16.c +++ b/dcpu16.c @@ -178,7 +178,7 @@ void value_decode_(struct dcpu16 *vm, DCPU16_WORD value, unsigned int value_is_a assert(value <= 0x3f); DCPU16_WORD pc = (DCPU16_WORD)(vm->reg[DCPU16_REG_PC] + *pc_adjust), - sp = (DCPU16_WORD)(vm->reg[DCPU16_REG_PC] + *sp_adjust); + sp = (DCPU16_WORD)(vm->reg[DCPU16_REG_SP] + *sp_adjust); TRACE("%s>> is_a:%u pc:0x%04x sp:0x%04x value_data:0x%04x\n", __func__, -- 2.45.2