diff --git a/gui.c b/gui.c index 4620b29..624fcbc 100644 --- a/gui.c +++ b/gui.c @@ -358,7 +358,11 @@ int update_general_registers(struct simdata_t *simdata){ while(y!=lines_used){ for(int i=0;iregisters->GPR[n],(double)simdata->registers->GPR[n]); + float float_equiv=*(float*)(simdata->registers->GPR+n); + if(float_equiv<9999999999&&float_equiv>-9999999999) + mvwprintw(general_registers,1+y+center_y_offset,1+i*35+center_x_offset,"R%d: %08X (%08f) ",n,simdata->registers->GPR[n],float_equiv); + else + mvwprintw(general_registers,1+y+center_y_offset,1+i*35+center_x_offset,"R%d: %08X (%cinf) ",n,simdata->registers->GPR[n],(float_equiv>0)?'+':'-'); n++; } }