1
0
mirror of https://github.com/open-simh/simh.git synced 2026-05-02 22:33:04 +00:00

Bob Supnik's state as of 10/12/2013

This commit is contained in:
Mark Pizzolato
2013-10-12 13:23:44 -07:00
parent 6031deddf8
commit 34ce1a038c
71 changed files with 5708 additions and 377 deletions

View File

@@ -1,6 +1,6 @@
/* h316_sys.c: Honeywell 316/516 simulator interface
Copyright (c) 1999-2008, Robert M Supnik
Copyright (c) 1999-2013, Robert M Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@@ -23,6 +23,8 @@
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Robert M Supnik.
15-Sep-13 RMS Added device name support for IO instructions
Fixed handling of OTK
01-Dec-04 RMS Fixed fprint_opr calling sequence
24-Oct-03 RMS Added DMA/DMC support
17-Sep-01 RMS Removed multiconsole support
@@ -132,7 +134,7 @@ static const char *opcode[] = {
"CAR", "CAL", "ICL",
"AOA", "ACA", "ICR", "ICA",
"NOP", "SKP", "SSR", "SSS",
"JMP", "JMP*",
"OTK", "JMP", "JMP*",
"LDA", "LDA*", "ANA", "ANA*",
"STA", "STA*", "ERA", "ERA*",
"ADD", "ADD*", "SUB", "SUB*",
@@ -155,6 +157,17 @@ static const char *opcode[] = {
NULL, NULL, /* decode only */
NULL
};
static const char *ioname[DEV_MAX] = {
NULL, "PTR", "PTP", "LPT", "TTY", "CDR", NULL, NULL,
"MT", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
"CLK", NULL, "FHD", NULL, "DMA", "DP", NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
static const int32 opc_val[] = {
0000000+I_NPN, 0000005+I_NPN, 0000007+I_NPN,
@@ -167,7 +180,7 @@ static const int32 opc_val[] = {
0141044+I_NPN, 0141050+I_NPN, 0141140+I_NPN,
0141206+I_NPN, 0141216+I_NPN, 0141240+I_NPN, 0141340+I_NPN,
0101000+I_NPN, 0100000+I_NPN, 0100036+I_NPN, 0101036+I_NPN,
0002000+I_MRF, 0102000+I_MRF,
0171020+I_NPN, 0002000+I_MRF, 0102000+I_MRF,
0004000+I_MRF, 0104000+I_MRF, 0006000+I_MRF, 0106000+I_MRF,
0010000+I_MRF, 0110000+I_MRF, 0012000+I_MRF, 0112000+I_MRF,
0014000+I_MRF, 0114000+I_MRF, 0016000+I_MRF, 0116000+I_MRF,
@@ -234,7 +247,7 @@ return;
t_stat fprint_sym (FILE *of, t_addr addr, t_value *val,
UNIT *uptr, int32 sw)
{
int32 cflag, i, j, inst, disp;
int32 cflag, i, j, inst, fnc, disp;
cflag = (uptr == NULL) || (uptr == &cpu_unit);
inst = val[0];
@@ -278,8 +291,11 @@ for (i = 0; opc_val[i] >= 0; i++) { /* loop thru ops */
break;
case I_V_IOT: /* I/O */
disp = inst & 01777; /* pulse+dev */
fprintf (of, "%s %o", opcode[i], disp);
fnc = I_GETFNC (inst); /* get func */
disp = inst & DEVMASK; /* get dev */
if (ioname[disp] != NULL)
fprintf (of, "%s %o,%s", opcode[i], fnc, ioname[disp]);
else fprintf (of, "%s %o,%o", opcode[i], fnc, disp);
break;
case I_V_SHF: /* shift */
@@ -347,11 +363,29 @@ switch (j) { /* case on class */
break;
case I_V_IOT: /* IOT */
cptr = get_glyph (cptr, gbuf, 0); /* get pulse+dev */
d = get_uint (gbuf, 8, 01777, &r);
if (r != SCPE_OK)
return SCPE_ARG;
val[0] = val[0] | d;
cptr = get_glyph (cptr, gbuf, ','); /* get field */
if (*cptr == 0) { /* single field? */
d = get_uint (gbuf, 8, 01777, &r); /* pulse+dev */
if (r != SCPE_OK)
return SCPE_ARG;
val[0] = val[0] | d;
}
else { /* multiple fields */
d = get_uint (gbuf, 8, 017, &r); /* get pulse */
if (r != SCPE_OK)
return SCPE_ARG;
cptr = get_glyph (cptr, gbuf, 0); /* get dev name */
for (k = 0; k < DEV_MAX; k++) { /* sch for name */
if ((ioname[k] != NULL) && (strcmp (gbuf, ioname[k]) == 0))
break; /* match? */
}
if (k >= DEV_MAX) { /* no match */
k = get_uint (gbuf, 8, DEV_MAX - 1, &r);/* integer */
if (r != SCPE_OK)
return SCPE_ARG;
}
val[0] = val[0] | (d << I_V_FNC) | k;
}
break;
case I_V_SHF: /* shift */