OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [monitor/] [monitor/] [common/] [command.c] - Diff between revs 201 and 257

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 201 Rev 257
Line 278... Line 278...
    }
    }
  } else {
  } else {
    help02();
    help02();
    return;
    return;
  }
  }
  addr &= ~0x00000003;
  addr &= 0xFFFFFFFC;
  psw = cpuGetPSW();
  psw = cpuGetPSW();
  while (1) {
  while (1) {
    sprintf(prompt, "ASM # %08X: ", addr);
    sprintf(prompt, "ASM # %08X: ", addr);
    line = getLine(prompt);
    line = getLine(prompt);
    if (*line == '\0' || *line == '\n') {
    if (*line == '\0' || *line == '\n') {
Line 329... Line 329...
    }
    }
  } else {
  } else {
    help03();
    help03();
    return;
    return;
  }
  }
  addr &= ~0x00000003;
  addr &= 0xFFFFFFFC;
  psw = cpuGetPSW();
  psw = cpuGetPSW();
  for (i = 0; i < count; i++) {
  for (i = 0; i < count; i++) {
    instr = mmuReadWord(addr);
    instr = mmuReadWord(addr);
    printf("%08X:  %08X    %s\n",
    printf("%08X:  %08X    %s\n",
            addr, instr, disasm(instr, addr));
            addr, instr, disasm(instr, addr));
Line 355... Line 355...
  } else if (n == 2) {
  } else if (n == 2) {
    if (!getHexNumber(tokens[1], &addr)) {
    if (!getHexNumber(tokens[1], &addr)) {
      printf("illegal address\n");
      printf("illegal address\n");
      return;
      return;
    }
    }
    addr &= ~0x00000003;
    addr &= 0xFFFFFFFC;
    cpuSetBreak(addr);
    cpuSetBreak(addr);
    showBreak();
    showBreak();
  } else {
  } else {
    help04();
    help04();
  }
  }
Line 419... Line 419...
  } else if (n == 2) {
  } else if (n == 2) {
    if (!getHexNumber(tokens[1], &addr)) {
    if (!getHexNumber(tokens[1], &addr)) {
      printf("illegal address\n");
      printf("illegal address\n");
      return;
      return;
    }
    }
    addr &= ~0x00000003;
    addr &= 0xFFFFFFFC;
    cpuSetPC(addr);
    cpuSetPC(addr);
    showPC();
    showPC();
  } else {
  } else {
    help07();
    help07();
  }
  }
Line 560... Line 560...
  } else {
  } else {
    help10();
    help10();
    return;
    return;
  }
  }
  psw = cpuGetPSW();
  psw = cpuGetPSW();
  lo = addr & ~0x0000000F;
  lo = addr & 0xFFFFFFF0;
  hi = addr + count - 1;
  hi = addr + count - 1;
  if (hi < lo) {
  if (hi < lo) {
    /* wrap-around */
    /* wrap-around */
    hi = 0xFFFFFFFF;
    hi = 0xFFFFFFFF;
  }
  }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.