Added debug hardware IRQ to replace non standard HLT opcode

This commit is contained in:
Maurizio Porrato 2020-01-22 08:01:09 +00:00
parent 48867686a6
commit 56eae1aca1
1 changed files with 7 additions and 7 deletions

14
dsim.c
View File

@ -62,8 +62,13 @@ struct dev_entry {
void (*tick)();
};
void debug_irqh()
{
running = false;
}
struct dev_entry iodevs[] = {
{ 0, 0, 0, NULL, NULL, NULL, NULL}
{ 0x6d53647c, 0x62e037d3, 0x00000000, debug_irqh, NULL, NULL, NULL }, /* Debug device */
};
uint16_t lit[] = {
@ -421,11 +426,6 @@ void oHWI(uint16_t *a, uint16_t *b)
}
}
void oHLT(uint16_t *a, uint16_t *b)
{
running = false;
}
typedef void (*op_t)(uint16_t *, uint16_t *);
const op_t ops[] = {
@ -439,7 +439,7 @@ const op_t sops[] = {
oNOP, oJSR, oNOP, oNOP, oNOP, oNOP, oNOP, oNOP, /* 00-07 */
oINT, oIAG, oIAS, oRFI, oIAQ, oNOP, oNOP, oNOP, /* 08-0f */
oHWN, oHWQ, oHWI, oNOP, oNOP, oNOP, oNOP, oNOP, /* 10-17 */
oNOP, oNOP, oNOP, oNOP, oNOP, oNOP, oNOP, oHLT /* 18-1f */
oNOP, oNOP, oNOP, oNOP, oNOP, oNOP, oNOP, oNOP /* 18-1f */
};
void dumpregs()