mirror of
https://github.com/simh/simh.git
synced 2026-01-25 11:46:37 +00:00
Intel-Systems: Cleanup compile error/warnings
This commit is contained in:
@@ -169,9 +169,9 @@ uint32 IM = 0; /* Interrupt Mask Register */
|
||||
uint8 xack = 0; /* XACK signal */
|
||||
uint32 int_req = 0; /* Interrupt request */
|
||||
uint8 INTA = 0; // interrupt acknowledge
|
||||
int32 PCX; /* External view of PC */
|
||||
int32 PCY; /* Internal view of PC */
|
||||
int32 PC;
|
||||
uint16 PCX; /* External view of PC */
|
||||
uint16 PCY; /* Internal view of PC */
|
||||
uint16 PC;
|
||||
UNIT *uptr;
|
||||
uint16 port; //port used in any IN/OUT
|
||||
uint16 addr; //addr used for operand fetch
|
||||
|
||||
@@ -264,7 +264,7 @@ uint8 i8237_rFx(t_bool io, uint8 data);
|
||||
|
||||
/* external function prototypes */
|
||||
|
||||
extern uint16 reg_dev(uint8 (*routine)(t_bool, uint8), uint16);
|
||||
extern uint8 reg_dev(uint8 (*routine)(t_bool, uint8, uint8), uint8);
|
||||
|
||||
/* globals */
|
||||
|
||||
@@ -429,7 +429,7 @@ t_stat i8237_svc(UNIT *uptr)
|
||||
|
||||
/* Reset routine */
|
||||
|
||||
t_stat i8237_reset(DEVICE *dptr, uint16 base)
|
||||
t_stat i8237_reset(DEVICE *dptr)
|
||||
{
|
||||
if (i8237_devnum > I8237_NUM) {
|
||||
sim_printf("i8237_reset: too many devices!\n");
|
||||
|
||||
@@ -145,7 +145,7 @@ t_stat i8253_reset (DEVICE *dptr)
|
||||
{
|
||||
uint8 devnum;
|
||||
|
||||
for (devnum=0; devnum<I8251_NUM; devnum++) {
|
||||
for (devnum=0; devnum<I8253_NUM; devnum++) {
|
||||
i8253_unit[devnum].u3 = 0; /* status */
|
||||
i8253_unit[devnum].u4 = 0; /* mode instruction */
|
||||
i8253_unit[devnum].u5 = 0; /* command instruction */
|
||||
|
||||
@@ -128,7 +128,7 @@ uint16 i8272_port[4]; //base port registered to each instance
|
||||
/* external globals */
|
||||
|
||||
extern uint16 port; //port called in dev_table[port]
|
||||
extern int32 PCX;
|
||||
extern uint16 PCX;
|
||||
|
||||
/* internal function prototypes */
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ extern uint8 i8255_C[4]; //port C byte I/O
|
||||
|
||||
/* SIMH EPROM Standard I/O Data Structures */
|
||||
|
||||
UNIT EPROM_unit[] = {
|
||||
UNIT EPROM_unit = {
|
||||
UDATA (NULL, UNIT_ATTABLE+UNIT_BINK+UNIT_ROABLE+UNIT_RO+UNIT_BUFABLE+UNIT_MUSTBUF, 0), 0
|
||||
};
|
||||
|
||||
@@ -73,7 +73,7 @@ DEBTAB EPROM_debug[] = {
|
||||
|
||||
DEVICE EPROM_dev = {
|
||||
"EPROM", //name
|
||||
EPROM_unit, //units
|
||||
&EPROM_unit, //units
|
||||
NULL, //registers
|
||||
NULL, //modifiers
|
||||
1, //numunits
|
||||
@@ -102,10 +102,10 @@ DEVICE EPROM_dev = {
|
||||
|
||||
t_stat EPROM_cfg(uint16 base, uint16 size)
|
||||
{
|
||||
EPROM_unit->capac = size; /* set EPROM size */
|
||||
EPROM_unit->u3 = base & 0xFFFF; /* set EPROM base */
|
||||
EPROM_unit.capac = size; /* set EPROM size */
|
||||
EPROM_unit.u3 = base & 0xFFFF; /* set EPROM base */
|
||||
sim_printf(" EPROM: 0%04XH bytes at base 0%04XH\n",
|
||||
EPROM_unit->capac, EPROM_unit->u3);
|
||||
EPROM_unit.capac, EPROM_unit.u3);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
@@ -135,9 +135,9 @@ uint8 EPROM_get_mbyte(uint16 addr)
|
||||
{
|
||||
uint8 val;
|
||||
|
||||
if ((addr >= EPROM_unit->u3) && ((uint32) addr <= (EPROM_unit->u3 + EPROM_unit->capac))) {
|
||||
if ((addr >= EPROM_unit.u3) && ((uint32) addr <= (EPROM_unit.u3 + EPROM_unit.capac))) {
|
||||
SET_XACK(1); /* good memory address */
|
||||
val = *((uint8 *)EPROM_unit->filebuf + (addr - EPROM_unit->u3));
|
||||
val = *((uint8 *)EPROM_unit.filebuf + (addr - EPROM_unit.u3));
|
||||
val &= 0xFF;
|
||||
return val;
|
||||
} else {
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
/* external globals */
|
||||
|
||||
extern int32 PCX;
|
||||
extern uint16 PCX;
|
||||
|
||||
/* function prototypes */
|
||||
|
||||
|
||||
@@ -69,19 +69,19 @@ int onetime = 0;
|
||||
|
||||
/* extern globals */
|
||||
|
||||
extern uint32 PCX; /* program counter */
|
||||
extern uint16 PCX; /* program counter */
|
||||
extern UNIT i8255_unit;
|
||||
extern UNIT EPROM_unit;
|
||||
extern UNIT RAM_unit;
|
||||
extern UNIT ipc_cont_unit;
|
||||
extern UNIT ioc_cont_unit;
|
||||
extern DEVICE *i8080_dev;
|
||||
extern DEVICE *i8251_dev;
|
||||
extern DEVICE *i8253_dev;
|
||||
extern DEVICE *i8255_dev;
|
||||
extern DEVICE *i8259_dev;
|
||||
extern DEVICE *ipc_cont_dev;
|
||||
extern DEVICE *ioc_cont_dev;
|
||||
extern DEVICE i8080_dev;
|
||||
extern DEVICE i8251_dev;
|
||||
extern DEVICE i8253_dev;
|
||||
extern DEVICE i8255_dev;
|
||||
extern DEVICE i8259_dev;
|
||||
extern DEVICE ipc_cont_dev;
|
||||
extern DEVICE ioc_cont_dev;
|
||||
|
||||
t_stat SBC_config(void)
|
||||
{
|
||||
@@ -110,13 +110,13 @@ t_stat SBC_reset (DEVICE *dptr)
|
||||
multibus_cfg();
|
||||
onetime++;
|
||||
}
|
||||
i8080_reset(i8080_dev);
|
||||
i8251_reset(i8251_dev);
|
||||
i8253_reset(i8253_dev);
|
||||
i8255_reset(i8255_dev);
|
||||
i8259_reset(i8259_dev);
|
||||
ipc_cont_reset(ipc_cont_dev);
|
||||
ioc_cont_reset(ioc_cont_dev);
|
||||
i8080_reset(&i8080_dev);
|
||||
i8251_reset(&i8251_dev);
|
||||
i8253_reset(&i8253_dev);
|
||||
i8255_reset(&i8255_dev);
|
||||
i8259_reset(&i8259_dev);
|
||||
ipc_cont_reset(&ipc_cont_dev);
|
||||
ioc_cont_reset(&ioc_cont_dev);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
/* function prototypes */
|
||||
|
||||
t_stat ipc_cont_cfg(uint8 base, uint8 devnum);
|
||||
uint8 ipc_cont(t_bool io, uint8 data, uint8 devnum); /* ipc_cont*/
|
||||
uint8 ipc_cont(t_bool io, uint8 data, uint8 devnum); /* ipc_cont*/
|
||||
t_stat ipc_cont_reset (DEVICE *dptr);
|
||||
|
||||
/* external function prototypes */
|
||||
@@ -45,12 +45,12 @@ extern uint8 reg_dev(uint8 (*routine)(t_bool, uint8, uint8), uint8, uint8);
|
||||
|
||||
/* globals */
|
||||
|
||||
UNIT ipc_cont_unit[] = {
|
||||
{ UDATA (0, 0, 0) }, /* ipc_cont*/
|
||||
};
|
||||
UNIT ipc_cont_unit =
|
||||
{ UDATA (0, 0, 0) }; /* ipc_cont*/
|
||||
|
||||
|
||||
REG ipc_cont_reg[] = {
|
||||
{ HRDATA (CONTROL0, ipc_cont_unit[0].u3, 8) }, /* ipc_cont */
|
||||
{ HRDATA (CONTROL0, ipc_cont_unit.u3, 8) }, /* ipc_cont */
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
@@ -68,9 +68,9 @@ DEBTAB ipc_cont_debug[] = {
|
||||
/* address width is set to 16 bits to use devices in 8086/8088 implementations */
|
||||
|
||||
DEVICE ipc_cont_dev = {
|
||||
"IPC-CONT", //name
|
||||
ipc_cont_unit, //units
|
||||
ipc_cont_reg, //registers
|
||||
"IPC-CONT", //name
|
||||
&ipc_cont_unit, //units
|
||||
ipc_cont_reg, //registers
|
||||
NULL, //modifiers
|
||||
1, //numunits
|
||||
16, //aradix
|
||||
@@ -80,14 +80,14 @@ DEVICE ipc_cont_dev = {
|
||||
8, //dwidth
|
||||
NULL, //examine
|
||||
NULL, //deposit
|
||||
NULL, //reset
|
||||
NULL, //reset
|
||||
NULL, //boot
|
||||
NULL, //attach
|
||||
NULL, //detach
|
||||
NULL, //ctxt
|
||||
0, //flags
|
||||
0, //dctrl
|
||||
ipc_cont_debug, //debflags
|
||||
ipc_cont_debug, //debflags
|
||||
NULL, //msize
|
||||
NULL //lname
|
||||
};
|
||||
@@ -106,7 +106,7 @@ t_stat ipc_cont_cfg(uint8 base, uint8 devnum)
|
||||
|
||||
t_stat ipc_cont_reset(DEVICE *dptr)
|
||||
{
|
||||
ipc_cont_unit[0].u3 = 0x00; /* ipc reset */
|
||||
ipc_cont_unit.u3 = 0x00; /* ipc reset */
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
@@ -119,40 +119,40 @@ t_stat ipc_cont_reset(DEVICE *dptr)
|
||||
uint8 ipc_cont(t_bool io, uint8 data, uint8 devnum)
|
||||
{
|
||||
if (io == 0) { /* read status port */
|
||||
return ipc_cont_unit[0].u3;
|
||||
return ipc_cont_unit.u3;
|
||||
} else { /* write control port */
|
||||
//this simulates an 74LS259 register
|
||||
//d0-d2 address the reg(in reverse order!), d3 is the data to be latched (inverted)
|
||||
switch(data & 0x07) {
|
||||
case 5: //interrupt enable 8085 INTR
|
||||
if(data & 0x08) //bit low
|
||||
ipc_cont_unit[0].u3 &= 0xBF;
|
||||
ipc_cont_unit.u3 &= 0xBF;
|
||||
else //bit high
|
||||
ipc_cont_unit[0].u3 |= 0x20;
|
||||
ipc_cont_unit.u3 |= 0x20;
|
||||
break;
|
||||
case 4: //*selboot ROM @ 0E800h
|
||||
if(data & 0x08) //bit low
|
||||
ipc_cont_unit[0].u3 &= 0xEF;
|
||||
ipc_cont_unit.u3 &= 0xEF;
|
||||
else //bit high
|
||||
ipc_cont_unit[0].u3 |= 0x10;
|
||||
ipc_cont_unit.u3 |= 0x10;
|
||||
break;
|
||||
case 2: //*startup ROM @ 00000h
|
||||
if(data & 0x08) //bit low
|
||||
ipc_cont_unit[0].u3 &= 0xFB;
|
||||
ipc_cont_unit.u3 &= 0xFB;
|
||||
else //bit high
|
||||
ipc_cont_unit[0].u3 |= 0x04;
|
||||
ipc_cont_unit.u3 |= 0x04;
|
||||
break;
|
||||
case 1: //override inhibit other multibus users
|
||||
if(data & 0x08) //bit low
|
||||
ipc_cont_unit[0].u3 &= 0xFD;
|
||||
ipc_cont_unit.u3 &= 0xFD;
|
||||
else //bit high
|
||||
ipc_cont_unit[0].u3 |= 0x02;
|
||||
ipc_cont_unit.u3 |= 0x02;
|
||||
break;
|
||||
case 0: //aux prom enable
|
||||
if(data & 0x08) //bit low
|
||||
ipc_cont_unit[0].u3 &= 0xFE;
|
||||
ipc_cont_unit.u3 &= 0xFE;
|
||||
else //bit high
|
||||
ipc_cont_unit[0].u3 |= 0x01;
|
||||
ipc_cont_unit.u3 |= 0x01;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -73,13 +73,13 @@ extern UNIT EPROM_unit;
|
||||
extern UNIT RAM_unit;
|
||||
extern UNIT ipc_cont_unit;
|
||||
extern UNIT ioc_cont_unit;
|
||||
extern DEVICE *i8080_dev;
|
||||
extern DEVICE *i8251_dev;
|
||||
extern DEVICE *i8253_dev;
|
||||
extern DEVICE *i8255_dev;
|
||||
extern DEVICE *i8259_dev;
|
||||
extern DEVICE *ipc_cont_dev;
|
||||
extern DEVICE *ioc_cont_dev;
|
||||
extern DEVICE i8080_dev;
|
||||
extern DEVICE i8251_dev;
|
||||
extern DEVICE i8253_dev;
|
||||
extern DEVICE i8255_dev;
|
||||
extern DEVICE i8259_dev;
|
||||
extern DEVICE ipc_cont_dev;
|
||||
extern DEVICE ioc_cont_dev;
|
||||
|
||||
/* globals */
|
||||
|
||||
@@ -112,13 +112,13 @@ t_stat SBC_reset (DEVICE *dptr)
|
||||
multibus_cfg();
|
||||
onetime++;
|
||||
}
|
||||
i8080_reset(i8080_dev);
|
||||
i8251_reset(i8251_dev);
|
||||
i8253_reset(i8253_dev);
|
||||
i8255_reset(i8255_dev);
|
||||
i8259_reset(i8259_dev);
|
||||
ipc_cont_reset(ipc_cont_dev);
|
||||
ioc_cont_reset(ioc_cont_dev);
|
||||
i8080_reset(&i8080_dev);
|
||||
i8251_reset(&i8251_dev);
|
||||
i8253_reset(&i8253_dev);
|
||||
i8255_reset(&i8255_dev);
|
||||
i8259_reset(&i8259_dev);
|
||||
ipc_cont_reset(&ipc_cont_dev);
|
||||
ioc_cont_reset(&ioc_cont_dev);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ t_stat RAM_cfg(uint16 base, uint16 size)
|
||||
{
|
||||
RAM_unit.capac = size & 0xFFFF; /* set RAM size */
|
||||
RAM_unit.u3 = base & 0xFFFF; /* set RAM base */
|
||||
RAM_unit.filebuf = (uint8 *)malloc(size * sizeof(uint8));
|
||||
RAM_unit.filebuf = (uint8 *)calloc(size, size * sizeof(uint8));
|
||||
if (RAM_unit.filebuf == NULL) {
|
||||
sim_printf (" RAM: Malloc error\n");
|
||||
return SCPE_MEM;
|
||||
|
||||
@@ -56,7 +56,7 @@ void isbc064_put_mbyte(uint16 addr, uint8 val);
|
||||
|
||||
/* external globals */
|
||||
|
||||
extern uint32 PCX; /* program counter */
|
||||
extern uint16 PCX; /* program counter */
|
||||
extern uint8 xack;
|
||||
|
||||
/* isbc064 Standard SIMH Device Data Structures */
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
|
||||
/* external globals */
|
||||
|
||||
extern int32 PCX;
|
||||
extern uint16 PCX;
|
||||
|
||||
/* external function prototypes */
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
|
||||
/* external globals */
|
||||
|
||||
extern int32 PCX;
|
||||
extern uint16 PCX;
|
||||
|
||||
/* external function prototypes */
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
/* external globals */
|
||||
|
||||
extern int32 PCX;
|
||||
extern uint16 PCX;
|
||||
|
||||
/* external function prototypes */
|
||||
|
||||
|
||||
@@ -510,7 +510,7 @@ extern int32 multibus_get_mbyte(uint16 addr);
|
||||
|
||||
/* external globals */
|
||||
|
||||
extern int32 PCX;
|
||||
extern uint16 PCX;
|
||||
|
||||
/* 8237 physical register definitions */
|
||||
uint16 i8237_r0; // 8237 ch 0 address register
|
||||
|
||||
@@ -53,7 +53,7 @@ extern uint8 xack; /* XACK signal */
|
||||
|
||||
/* isbc464 Standard I/O Data Structures */
|
||||
|
||||
UNIT isbc464_unit[] = {
|
||||
UNIT isbc464_unit = {
|
||||
UDATA (NULL, UNIT_ATTABLE+UNIT_BINK+UNIT_ROABLE+UNIT_RO+UNIT_BUFABLE+UNIT_MUSTBUF, 0), 0
|
||||
};
|
||||
|
||||
@@ -70,7 +70,7 @@ DEBTAB isbc464_debug[] = {
|
||||
|
||||
DEVICE isbc464_dev = {
|
||||
"SBC464", //name
|
||||
isbc464_unit, //units
|
||||
&isbc464_unit, //units
|
||||
NULL, //registers
|
||||
NULL, //modifiers
|
||||
1, //numunits
|
||||
@@ -101,8 +101,8 @@ t_stat isbc464_cfg(uint16 base, uint16 size)
|
||||
{
|
||||
sim_printf(" sbc464: 0%04XH bytes at base 0%04XH\n",
|
||||
size, base);
|
||||
isbc464_unit->capac = size; //set size
|
||||
isbc464_unit->u3 = base; //and base
|
||||
isbc464_unit.capac = size; //set size
|
||||
isbc464_unit.u3 = base; //and base
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
@@ -135,9 +135,9 @@ uint8 isbc464_get_mbyte(uint16 addr)
|
||||
uint8 *fbuf;
|
||||
|
||||
if ((isbc464_dev.flags & DEV_DIS) == 0) {
|
||||
org = isbc464_unit->u3;
|
||||
len = isbc464_unit->capac;
|
||||
fbuf = (uint8 *) isbc464_unit->filebuf;
|
||||
org = isbc464_unit.u3;
|
||||
len = isbc464_unit.capac;
|
||||
fbuf = (uint8 *) isbc464_unit.filebuf;
|
||||
if ((addr >= org) && (addr < (org + len))) {
|
||||
SET_XACK(1); /* good memory address */
|
||||
val = *(fbuf + (addr - org));
|
||||
@@ -158,8 +158,8 @@ void isbc464_put_mbyte(uint16 addr, uint8 val)
|
||||
uint32 org, len;
|
||||
|
||||
if ((isbc464_dev.flags & DEV_DIS) == 0) {
|
||||
org = isbc464_unit->u3;
|
||||
len = isbc464_unit->capac;
|
||||
org = isbc464_unit.u3;
|
||||
len = isbc464_unit.capac;
|
||||
if ((addr >= org) && (addr < (org + len))) {
|
||||
// SET_XACK(1); /* good memory address */
|
||||
sim_printf ("isbc464_put_mbyte: Read-only Memory\n");
|
||||
|
||||
@@ -77,7 +77,7 @@ int32 mbirq = 0; /* set no multibus interrupts */
|
||||
|
||||
extern uint8 xack; /* XACK signal */
|
||||
extern int32 int_req; /* i8080 INT signal */
|
||||
extern int32 PCX;
|
||||
extern uint16 PCX;
|
||||
extern DEVICE isbc064_dev;
|
||||
extern DEVICE isbc464_dev;
|
||||
extern DEVICE isbc201_dev;
|
||||
|
||||
@@ -198,7 +198,7 @@ extern void multibus_put_mbyte(uint16 addr, uint8 val);
|
||||
|
||||
/* external globals */
|
||||
|
||||
extern int32 PCX;
|
||||
extern uint16 PCX;
|
||||
|
||||
/* internal function prototypes */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user