KA10: Fixed bug in I/O instruction assembly
This commit is contained in:
parent
486505741c
commit
9dd46a8b80
1 changed files with 347 additions and 341 deletions
|
@ -232,7 +232,7 @@ DEBTAB dev_debug[] = {
|
|||
{"DETAIL", DEBUG_DETAIL, "Show details about device"},
|
||||
{"EXP", DEBUG_EXP, "Show exception information"},
|
||||
{"CONI", DEBUG_CONI, "Show coni instructions"},
|
||||
{"CONO", DEBUG_CONO, "Show coni instructions"},
|
||||
{"CONO", DEBUG_CONO, "Show cono instructions"},
|
||||
{"DATAIO", DEBUG_DATAIO, "Show datai and datao instructions"},
|
||||
{0, 0}
|
||||
};
|
||||
|
@ -244,7 +244,7 @@ DEBTAB crd_debug[] = {
|
|||
{"DETAIL", DEBUG_DETAIL, "Show details about device"},
|
||||
{"EXP", DEBUG_EXP, "Show exception information"},
|
||||
{"CONI", DEBUG_CONI, "Show coni instructions"},
|
||||
{"CONO", DEBUG_CONO, "Show coni instructions"},
|
||||
{"CONO", DEBUG_CONO, "Show cono instructions"},
|
||||
{"DATAIO", DEBUG_DATAIO, "Show datai and datao instructions"},
|
||||
{"CARD", DEBUG_CARD, "Show Card read/punches"},
|
||||
{0, 0}
|
||||
|
@ -1177,12 +1177,14 @@ for (i = 0; opc_val[i] >= 0; i++) { /* loop thru ops */
|
|||
case I_V_IO: /* I/O */
|
||||
if (dev < NUMDEV)
|
||||
fprintf (of, "%s,", devnam[dev]);
|
||||
else fprintf (of, "%-o,", dev<<2);
|
||||
else
|
||||
fprintf (of, "%-o,", dev << 2);
|
||||
if (inst & INST_IND)
|
||||
fprintf (of, "@");
|
||||
if (xr)
|
||||
fprintf (of, "%-o(%-o)", y, xr);
|
||||
else fprintf (of, "%-o", y);
|
||||
else
|
||||
fprintf (of, "%-o", y);
|
||||
break;
|
||||
} /* end case */
|
||||
return SCPE_OK;
|
||||
|
@ -1304,6 +1306,7 @@ switch (j) { /* case on class */
|
|||
val[0] = val[0] | (ac << INST_V_AC);
|
||||
}
|
||||
} /* fall through */
|
||||
|
||||
case I_V_OP: /* operand */
|
||||
cptr = get_glyph (cptr, gbuf, 0);
|
||||
val[0] = val[0] | get_opnd (gbuf, &r);
|
||||
|
@ -1313,11 +1316,14 @@ switch (j) { /* case on class */
|
|||
|
||||
case I_V_IO: /* I/O */
|
||||
cptr = get_glyph (cptr, gbuf, ','); /* get glyph */
|
||||
for (dev = 0; (dev < NUMDEV) && (strcmp (devnam[dev], gbuf) != 0); dev++);
|
||||
for (dev = 0;
|
||||
(dev < NUMDEV) && (strcmp (devnam[dev], gbuf) != 0);
|
||||
dev++);
|
||||
if (dev >= NUMDEV) {
|
||||
dev = get_uint (gbuf, 8, INST_M_DEV, &r);
|
||||
dev = get_uint (gbuf, 8, INST_M_DEV << 2, &r);
|
||||
if (r != SCPE_OK)
|
||||
return SCPE_ARG;
|
||||
dev >>= 2;
|
||||
}
|
||||
val[0] = val[0] | (dev << INST_V_DEV);
|
||||
cptr = get_glyph (cptr, gbuf, 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue