Skip to content

Commit bad1e0e

Browse files
authored
IMLAC: Type consistency warnings. (#430)
* IMLAC: Type consistency warnings. * Remove unintentional changes * Remove extra braces * CUR_AC -> AC (revert)
1 parent 458ab73 commit bad1e0e

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

imlac/imlac_cpu.c

+7-4
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ static void cpu_class1 (uint16 insn)
211211

212212
static void cpu_ral (int n)
213213
{
214-
int i, x;
214+
int i;
215+
uint16 x;
215216
for (i = 0; i < n; i++) {
216217
x = L;
217218
L = AC >> 15;
@@ -221,7 +222,9 @@ static void cpu_ral (int n)
221222

222223
static void cpu_rar (int n)
223224
{
224-
int i, x;
225+
int i;
226+
uint16 x;
227+
225228
for (i = 0; i < n; i++) {
226229
x = L;
227230
L = AC & 1;
@@ -252,7 +255,7 @@ static void cpu_class2 (uint16 insn)
252255
x = 01600000 >> n;
253256
else
254257
x = 0;
255-
AC = x | ((AC & 077777) >> n);
258+
AC = (uint16) (x | ((AC & 077777) >> n));
256259
break;
257260
}
258261
}
@@ -485,7 +488,7 @@ t_stat sim_instr (void)
485488
}
486489
}
487490

488-
return SCPE_OK;
491+
/* unreachable: return SCPE_OK; */
489492
}
490493

491494
static t_stat

imlac/imlac_crt.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ static UNIT crt_unit = {
4242
};
4343

4444
static DEBTAB crt_deb[] = {
45-
{ "DBG", DBG },
45+
{ "DBG", DBG },
46+
{ "VVID", SIM_VID_DBG_VIDEO },
4647
{ NULL, 0 }
4748
};
4849

@@ -90,8 +91,8 @@ crt_reset (DEVICE *dptr)
9091
} else {
9192
display_reset ();
9293
display_init (DIS_IMLAC, 1, dptr);
93-
sim_activate_abs (&crt_unit, 0);
9494
vid_register_quit_callback (&crt_quit_callback);
95+
sim_activate_abs (&crt_unit, 0);
9596
}
9697
#endif
9798
return SCPE_OK;

imlac/imlac_dp.c

+10-2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ static uint16 SYNC = 1;
4545
/* Function declaration. */
4646
static uint16 dp_iot (uint16, uint16);
4747
static t_stat dp_svc (UNIT *uptr);
48+
static t_stat dp_reset(DEVICE *dptr);
4849
static uint16 sync_iot (uint16, uint16);
4950
static t_stat sync_svc (UNIT *uptr);
5051

@@ -83,7 +84,7 @@ static DEBTAB dp_deb[] = {
8384
DEVICE dp_dev = {
8485
"DP", &dp_unit, dp_reg, NULL,
8586
1, 8, 16, 1, 8, 16,
86-
NULL, NULL, NULL,
87+
NULL, NULL, dp_reset,
8788
NULL, NULL, NULL, &dp_imdev, DEV_DEBUG, 0, dp_deb,
8889
NULL, NULL, NULL, NULL, NULL, NULL
8990
};
@@ -131,7 +132,7 @@ dp_on (int flag)
131132
if (SYNC && HALT)
132133
flag_on (FLAG_SYNC);
133134
}
134-
ON = flag;
135+
ON = (uint16) flag;
135136
}
136137

137138
uint16
@@ -474,6 +475,13 @@ dp_svc(UNIT * uptr)
474475
return SCPE_OK;
475476
}
476477

478+
static t_stat
479+
dp_reset(DEVICE * uptr)
480+
{
481+
sim_activate_abs (&dp_unit, 0);
482+
return SCPE_OK;
483+
}
484+
477485
static t_stat
478486
sync_svc (UNIT *uptr)
479487
{

0 commit comments

Comments
 (0)