X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=sim%2Fucsim%2Fs51.src%2Finterrupt.cc;h=f8a8f8d31f56907962d50c2beceb02e1877fac64;hb=90f4aedaef8a2310573eef905f95c671f84e5cde;hp=80aad40c9261b8364e10a5932a3620c609ec7510;hpb=0418f658ab70836d8dfec91839945d3b6eb45cb7;p=fw%2Fsdcc diff --git a/sim/ucsim/s51.src/interrupt.cc b/sim/ucsim/s51.src/interrupt.cc index 80aad40c..f8a8f8d3 100644 --- a/sim/ucsim/s51.src/interrupt.cc +++ b/sim/ucsim/s51.src/interrupt.cc @@ -63,9 +63,9 @@ void cl_interrupt::added_to_uc(void) { uc->it_sources->add(new cl_it_src(bmEX0, TCON, bmIE0, 0x0003, true, - "external #0", 1)); + "external #0", 1)); uc->it_sources->add(new cl_it_src(bmEX1, TCON, bmIE1, 0x0013, true, - "external #1", 3)); + "external #1", 3)); } void @@ -114,13 +114,13 @@ cl_interrupt::happen(class cl_hw *where, enum hw_event he, void *params) t_mem p3n= ep->new_pins & ep->new_value; t_mem p3o= ep->pins & ep->prev_value; if (bit_IT0 && - !(p3n & bm_INT0) && - (p3o & bm_INT0)) - cell_tcon->set_bit1(bmIE0); + !(p3n & bm_INT0) && + (p3o & bm_INT0)) + cell_tcon->set_bit1(bmIE0); if (bit_IT1 && - !(p3n & bm_INT1) && - (p3o & bm_INT1)) - cell_tcon->set_bit1(bmIE1); + !(p3n & bm_INT1) && + (p3o & bm_INT1)) + cell_tcon->set_bit1(bmIE1); bit_INT0= p3n & bm_INT0; bit_INT1= p3n & bm_INT1; } @@ -128,13 +128,13 @@ cl_interrupt::happen(class cl_hw *where, enum hw_event he, void *params) void -cl_interrupt::print_info(class cl_console *con) +cl_interrupt::print_info(class cl_console_base *con) { int ie= sfr->get(IE); int i; con->dd_printf("Interrupts are %s. Interrupt sources:\n", - (ie&bmEA)?"enabled":"disabled"); + (ie&bmEA)?"enabled":"disabled"); con->dd_printf(" Handler En Pr Req Act Name\n"); for (i= 0; i < uc->it_sources->count; i++) { @@ -143,8 +143,8 @@ cl_interrupt::print_info(class cl_console *con) con->dd_printf(" %-3s", (ie&(is->ie_mask))?"en":"dis"); con->dd_printf(" %2d", uc->it_priority(is->ie_mask)); con->dd_printf(" %-3s", - (sfr->get(is->src_reg)&(is->src_mask))? - "YES":"no"); + (sfr->get(is->src_reg)&(is->src_mask))? + "YES":"no"); con->dd_printf(" %-3s", (is->active)?"act":"no"); con->dd_printf(" %s", object_name(is)); con->dd_printf("\n"); @@ -155,14 +155,14 @@ cl_interrupt::print_info(class cl_console *con) { class it_level *il= (class it_level *)(uc->it_levels->at(i)); if (il->level >= 0) - { - con->dd_printf(" %2d", il->level); - con->dd_printf(" 0x%06x", il->addr); - con->dd_printf(" 0x%06x", il->PC); - con->dd_printf(" %s", (il->source)?(object_name(il->source)): - "nothing"); - con->dd_printf("\n"); - } + { + con->dd_printf(" %2d", il->level); + con->dd_printf(" 0x%06x", il->addr); + con->dd_printf(" 0x%06x", il->PC); + con->dd_printf(" %s", (il->source)?(object_name(il->source)): + "nothing"); + con->dd_printf("\n"); + } } }