Fix first line of disassembly

This commit is contained in:
Guy Perfect 2024-10-30 15:12:38 -05:00
parent 52838e4a6d
commit b134903878
1 changed files with 2 additions and 2 deletions

View File

@ -637,8 +637,8 @@ static VBU_DasmLine* dasmDisassemble(VB *sim, uint32_t address,
} }
/* Begin decoding from at least 10 lines before first/reference */ /* Begin decoding from at least 10 lines before first/reference */
addr = (address & 0xFFFFFFFE) + addr = (address & 0xFFFFFFFE) -
(int32_t) ((line < 0 ? -line : 0) - 10) * 4; (int32_t) (line <= 0 ? 10 : line + 10) * 4;
/* Locate the address of the line containing the reference address */ /* Locate the address of the line containing the reference address */
pc = vbGetProgramCounter(sim); pc = vbGetProgramCounter(sim);