Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMLAC: Type consistency warnings. #430

Merged
merged 4 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions imlac/imlac_cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ static void cpu_class1 (uint16 insn)

static void cpu_ral (int n)
{
int i, x;
int i;
uint16 x;
for (i = 0; i < n; i++) {
x = L;
L = AC >> 15;
Expand All @@ -221,7 +222,9 @@ static void cpu_ral (int n)

static void cpu_rar (int n)
{
int i, x;
int i;
uint16 x;

for (i = 0; i < n; i++) {
x = L;
L = AC & 1;
Expand Down Expand Up @@ -252,7 +255,7 @@ static void cpu_class2 (uint16 insn)
x = 01600000 >> n;
else
x = 0;
AC = x | ((AC & 077777) >> n);
AC = (uint16) (x | ((AC & 077777) >> n));
break;
}
}
Expand Down Expand Up @@ -485,7 +488,7 @@ t_stat sim_instr (void)
}
}

return SCPE_OK;
/* unreachable: return SCPE_OK; */
}

static t_stat
Expand Down Expand Up @@ -602,13 +605,13 @@ flag_check (uint16 flag)
}

static uint16
irq_iot (uint16 insn, uint16 AC)
irq_iot (uint16 insn, uint16 CUR_AC)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shadows AC -- is shadowing AC intentional?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The global AC should not be used inside this function.

{
if ((insn & 0771) == 0101) { /* RDI */
AC |= FLAGS;
CUR_AC |= FLAGS;
}
if ((insn & 0771) == 0141) { /* ARM */
ARM = AC;
ARM = CUR_AC;
}
if ((insn & 0771) == 0161) { /* IOF */
sim_debug (DBG_IRQ, &irq_dev, "Interrupts off\n");
Expand All @@ -618,7 +621,7 @@ irq_iot (uint16 insn, uint16 AC)
/* Delay the action until next instruction has executed. */
ion_delay = 2;
}
return AC;
return CUR_AC;
}

void
Expand Down
5 changes: 3 additions & 2 deletions imlac/imlac_crt.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ static UNIT crt_unit = {
};

static DEBTAB crt_deb[] = {
{ "DBG", DBG },
{ "DBG", DBG },
{ "VVID", SIM_VID_DBG_VIDEO },
{ NULL, 0 }
};

Expand Down Expand Up @@ -90,8 +91,8 @@ crt_reset (DEVICE *dptr)
} else {
display_reset ();
display_init (DIS_IMLAC, 1, dptr);
sim_activate_abs (&crt_unit, 0);
vid_register_quit_callback (&crt_quit_callback);
sim_activate_abs (&crt_unit, 0);
}
#endif
return SCPE_OK;
Expand Down
15 changes: 12 additions & 3 deletions imlac/imlac_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ static uint16 SYNC = 1;
/* Function declaration. */
static uint16 dp_iot (uint16, uint16);
static t_stat dp_svc (UNIT *uptr);
static t_stat dp_reset(DEVICE *dptr);
static uint16 sync_iot (uint16, uint16);
static t_stat sync_svc (UNIT *uptr);

Expand Down Expand Up @@ -83,7 +84,7 @@ static DEBTAB dp_deb[] = {
DEVICE dp_dev = {
"DP", &dp_unit, dp_reg, NULL,
1, 8, 16, 1, 8, 16,
NULL, NULL, NULL,
NULL, NULL, dp_reset,
NULL, NULL, NULL, &dp_imdev, DEV_DEBUG, 0, dp_deb,
NULL, NULL, NULL, NULL, NULL, NULL
};
Expand Down Expand Up @@ -131,7 +132,7 @@ dp_on (int flag)
if (SYNC && HALT)
flag_on (FLAG_SYNC);
}
ON = flag;
ON = (uint16) flag;
}

uint16
Expand Down Expand Up @@ -468,12 +469,20 @@ dp_svc(UNIT * uptr)
} else
dp_insn (insn);

if (ON)
if (ON) {
sim_activate_after (&dp_unit, 2);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this change.


return SCPE_OK;
}

static t_stat
dp_reset(DEVICE * uptr)
{
sim_activate_abs (&dp_unit, 0);
return SCPE_OK;
}

static t_stat
sync_svc (UNIT *uptr)
{
Expand Down
4 changes: 2 additions & 2 deletions imlac/tests/ssv.simh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Attach to a server. If the remote port isn't telnet, append ;notelnet.
attach tty 12345,connect=localhost:23
attach tty 12345,connect=192.168.50.248:23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unintentional.

# Configure a bootstrap ROM; some programs require this.
set rom type=stty
# Load SSV version 22.
load -s ssv22.iml
load -s %~p0/ssv22.iml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unintentional.

# Reset and run.
reset
go
Loading