Firmware: dis now allows an end address

Change-Id: Ie248760a48d6c7ed98770c947560961d23cfaccb
This commit is contained in:
David Banks 2019-11-11 11:32:58 +00:00
parent 849300b51c
commit e1bc7d1efa

View File

@ -1201,12 +1201,16 @@ void doCmdReset(char *params) {
// doCmdRegs is now in regs<cpu>.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) {