From e1bc7d1efade239c47a0fdb767c23e5b21988ddf Mon Sep 17 00:00:00 2001 From: David Banks Date: Mon, 11 Nov 2019 11:32:58 +0000 Subject: [PATCH] Firmware: dis now allows an end address Change-Id: Ie248760a48d6c7ed98770c947560961d23cfaccb --- firmware/AtomBusMon.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/firmware/AtomBusMon.c b/firmware/AtomBusMon.c index fc4651c..19976e6 100644 --- a/firmware/AtomBusMon.c +++ b/firmware/AtomBusMon.c @@ -1201,12 +1201,16 @@ void doCmdReset(char *params) { // doCmdRegs is now in regs.c void doCmdDis(char *params) { - uint8_t i; - sscanf(params, "%x", &memAddr); + uint8_t i = 0; + addr_t startAddr = memAddr; + addr_t endAddr = 0; + sscanf(params, "%x %x", &startAddr, &endAddr); + memAddr = startAddr; loadAddr(memAddr); - for (i = 0; i < 10; i++) { + do { memAddr = disassemble(memAddr); - } + i++; + } while ((!endAddr && i < 10) || (endAddr && memAddr > startAddr && memAddr <= endAddr)); } void doCmdFill(char *params) {