IBMPC, IBMPCXT: Compiler suggested cleanup
This commit is contained in:
parent
d42dd707e9
commit
60bf7d5d12
4 changed files with 10 additions and 12 deletions
|
@ -128,8 +128,6 @@ DEVICE i8253_dev = {
|
||||||
|
|
||||||
t_stat i8253_svc (UNIT *uptr)
|
t_stat i8253_svc (UNIT *uptr)
|
||||||
{
|
{
|
||||||
int32 temp;
|
|
||||||
|
|
||||||
sim_activate (&i8253_unit[0], i8253_unit[0].wait); /* continue poll */
|
sim_activate (&i8253_unit[0], i8253_unit[0].wait); /* continue poll */
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,7 @@ uint8 RAM_get_mbyte(uint32 addr)
|
||||||
uint8 val;
|
uint8 val;
|
||||||
|
|
||||||
sim_debug (DEBUG_read, &RAM_dev, "RAM_get_mbyte: addr=%04X\n", addr);
|
sim_debug (DEBUG_read, &RAM_dev, "RAM_get_mbyte: addr=%04X\n", addr);
|
||||||
if ((addr >= RAM_unit.u3) && ((uint32) addr < (RAM_unit.u3 + RAM_unit.capac))) {
|
if ((addr >= (uint32)RAM_unit.u3) && ( addr < (uint32)(RAM_unit.u3 + RAM_unit.capac))) {
|
||||||
val = *((uint8 *)RAM_unit.filebuf + (addr - RAM_unit.u3));
|
val = *((uint8 *)RAM_unit.filebuf + (addr - RAM_unit.u3));
|
||||||
sim_debug (DEBUG_read, &RAM_dev, " val=%04X\n", val);
|
sim_debug (DEBUG_read, &RAM_dev, " val=%04X\n", val);
|
||||||
return (val & 0xFF);
|
return (val & 0xFF);
|
||||||
|
@ -133,7 +133,7 @@ uint8 RAM_get_mbyte(uint32 addr)
|
||||||
void RAM_put_mbyte(uint32 addr, uint8 val)
|
void RAM_put_mbyte(uint32 addr, uint8 val)
|
||||||
{
|
{
|
||||||
sim_debug (DEBUG_write, &RAM_dev, "RAM_put_mbyte: addr=%04X, val=%02X\n", addr, val);
|
sim_debug (DEBUG_write, &RAM_dev, "RAM_put_mbyte: addr=%04X, val=%02X\n", addr, val);
|
||||||
if ((addr >= RAM_unit.u3) && ((uint32)addr < RAM_unit.u3 + RAM_unit.capac)) {
|
if ((addr >= (uint32)RAM_unit.u3) && (addr < (uint32)(RAM_unit.u3 + RAM_unit.capac))) {
|
||||||
*((uint8 *)RAM_unit.filebuf + (addr - RAM_unit.u3)) = val & 0xFF;
|
*((uint8 *)RAM_unit.filebuf + (addr - RAM_unit.u3)) = val & 0xFF;
|
||||||
sim_debug (DEBUG_write, &RAM_dev, "\n");
|
sim_debug (DEBUG_write, &RAM_dev, "\n");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -158,12 +158,12 @@ uint8 enbnmi(t_bool io, uint8 data)
|
||||||
uint8 get_mbyte(uint32 addr)
|
uint8 get_mbyte(uint32 addr)
|
||||||
{
|
{
|
||||||
/* if local EPROM handle it */
|
/* if local EPROM handle it */
|
||||||
if ((addr >= EPROM_unit.u3) && ((uint32)addr < (EPROM_unit.u3 + EPROM_unit.capac))) {
|
if ((addr >= (uint32)EPROM_unit.u3) && (addr < (uint32)(EPROM_unit.u3 + EPROM_unit.capac))) {
|
||||||
// sim_printf("Write to R/O memory address %05X - ignored\n", addr);
|
// sim_printf("Write to R/O memory address %05X - ignored\n", addr);
|
||||||
return EPROM_get_mbyte(addr);
|
return EPROM_get_mbyte(addr);
|
||||||
}
|
}
|
||||||
/* if local RAM handle it */
|
/* if local RAM handle it */
|
||||||
if ((addr >= RAM_unit.u3) && ((uint32)addr < (RAM_unit.u3 + RAM_unit.capac))) {
|
if ((addr >= (uint32)RAM_unit.u3) && (addr < (uint32)(RAM_unit.u3 + RAM_unit.capac))) {
|
||||||
return RAM_get_mbyte(addr);
|
return RAM_get_mbyte(addr);
|
||||||
}
|
}
|
||||||
/* otherwise, try the pcbus */
|
/* otherwise, try the pcbus */
|
||||||
|
@ -186,11 +186,11 @@ uint16 get_mword(uint32 addr)
|
||||||
void put_mbyte(uint32 addr, uint8 val)
|
void put_mbyte(uint32 addr, uint8 val)
|
||||||
{
|
{
|
||||||
/* if local EPROM handle it */
|
/* if local EPROM handle it */
|
||||||
if ((addr >= EPROM_unit.u3) && ((uint32)addr <= (EPROM_unit.u3 + EPROM_unit.capac))) {
|
if ((addr >= (uint32)EPROM_unit.u3) && (addr <= (uint32)(EPROM_unit.u3 + EPROM_unit.capac))) {
|
||||||
sim_printf("Write to R/O memory address %04X - ignored\n", addr);
|
sim_printf("Write to R/O memory address %04X - ignored\n", addr);
|
||||||
return;
|
return;
|
||||||
} /* if local RAM handle it */
|
} /* if local RAM handle it */
|
||||||
if ((addr >= RAM_unit.u3) && ((uint32)addr <= (RAM_unit.u3 + RAM_unit.capac))) {
|
if ((addr >= (uint32)RAM_unit.u3) && (addr <= (uint32)(RAM_unit.u3 + RAM_unit.capac))) {
|
||||||
RAM_put_mbyte(addr, val);
|
RAM_put_mbyte(addr, val);
|
||||||
return;
|
return;
|
||||||
} /* otherwise, try the pcbus */
|
} /* otherwise, try the pcbus */
|
||||||
|
|
|
@ -158,11 +158,11 @@ uint8 enbnmi(t_bool io, uint8 data)
|
||||||
uint8 get_mbyte(uint32 addr)
|
uint8 get_mbyte(uint32 addr)
|
||||||
{
|
{
|
||||||
/* if local EPROM handle it */
|
/* if local EPROM handle it */
|
||||||
if ((addr >= EPROM_unit.u3) && ((uint32)addr < (EPROM_unit.u3 + EPROM_unit.capac))) {
|
if ((addr >= (uint32)EPROM_unit.u3) && (addr < (uint32)(EPROM_unit.u3 + EPROM_unit.capac))) {
|
||||||
return EPROM_get_mbyte(addr);
|
return EPROM_get_mbyte(addr);
|
||||||
}
|
}
|
||||||
/* if local RAM handle it */
|
/* if local RAM handle it */
|
||||||
if ((addr >= RAM_unit.u3) && ((uint16)addr < (RAM_unit.u3 + RAM_unit.capac))) {
|
if ((addr >= (uint32)RAM_unit.u3) && (addr < (uint32)(RAM_unit.u3 + RAM_unit.capac))) {
|
||||||
return RAM_get_mbyte(addr);
|
return RAM_get_mbyte(addr);
|
||||||
}
|
}
|
||||||
/* otherwise, try the multibus */
|
/* otherwise, try the multibus */
|
||||||
|
@ -185,11 +185,11 @@ uint16 get_mword(uint32 addr)
|
||||||
void put_mbyte(uint32 addr, uint8 val)
|
void put_mbyte(uint32 addr, uint8 val)
|
||||||
{
|
{
|
||||||
/* if local EPROM handle it */
|
/* if local EPROM handle it */
|
||||||
if ((addr >= EPROM_unit.u3) && ((uint32)addr <= (EPROM_unit.u3 + EPROM_unit.capac))) {
|
if ((addr >= (uint32)EPROM_unit.u3) && (addr <= (uint32)(EPROM_unit.u3 + EPROM_unit.capac))) {
|
||||||
sim_printf("Write to R/O memory address %05X - ignored\n", addr);
|
sim_printf("Write to R/O memory address %05X - ignored\n", addr);
|
||||||
return;
|
return;
|
||||||
} /* if local RAM handle it */
|
} /* if local RAM handle it */
|
||||||
if ((i8255_unit[0].u5 & 0x02) && (addr >= RAM_unit.u3) && ((uint16)addr <= (RAM_unit.u3 + RAM_unit.capac))) {
|
if ((i8255_unit[0].u5 & 0x02) && (addr >= (uint32)RAM_unit.u3) && (addr <= (uint32)(RAM_unit.u3 + RAM_unit.capac))) {
|
||||||
RAM_put_mbyte(addr, val);
|
RAM_put_mbyte(addr, val);
|
||||||
return;
|
return;
|
||||||
} /* otherwise, try the multibus */
|
} /* otherwise, try the multibus */
|
||||||
|
|
Loading…
Add table
Reference in a new issue