mirror of
https://github.com/simh/simh.git
synced 2026-01-26 12:02:14 +00:00
Notes For V3.2-2
RESTRICTION: The PDP-15 FPP is only partially debugged. Do NOT enable this feature for normal operations. RESTRICTION: The HP DS disk is not debugged. DO NOT enable this feature under any circumstances. 1. New Features in 3.2-2 None 2. Bugs Fixed in 3.2-2 2.1 SCP - Fixed problem ATTACHing to read-only files (found by John Dundas) - Fixed problems in Windows terminal code (found by Dave Bryan) - Fixed problem in big-endian reads (reported by Scott Bailey) 2.2 GRI-909 - Updated MSR to include SOV - Updated EAO to include additional functions 2.2 HP2100 (from Dave Bryan) - Generalized control character handling for console terminal 2.3 VAX - Fixed bad block initialization routine
This commit is contained in:
committed by
Mark Pizzolato
parent
e2ba672610
commit
2688f2d26e
@@ -25,6 +25,7 @@
|
||||
|
||||
cpu GRI-909 CPU
|
||||
|
||||
17-Jul-04 RMS Revised MSR, EAO based on additional documentation
|
||||
14-Mar-03 RMS Fixed bug in SC queue tracking
|
||||
|
||||
The system state for the GRI-909 is:
|
||||
@@ -731,6 +732,9 @@ case AO_IOR:
|
||||
break; }
|
||||
if ((AX + AY) & CBIT) MSR = MSR | MSR_AOV; /* always calc AOV */
|
||||
else MSR = MSR & ~MSR_AOV;
|
||||
if (SIGN & ((AX ^ (AX + AY)) & (~AX ^ AY))) /* always calc SOV */
|
||||
MSR = MSR | MSR_SOV;
|
||||
else MSR = MSR & ~MSR_SOV;
|
||||
return t;
|
||||
}
|
||||
|
||||
@@ -778,21 +782,41 @@ if (cpu_unit.flags & UNIT_NOEAO) return stop_opr; /* EAO installed? */
|
||||
if (op == EAO_MUL) { /* mul? */
|
||||
t = AX * AY; /* AX * AY */
|
||||
AX = (t >> 16) & DMASK; /* to AX'GR1 */
|
||||
GR[0] = t & DMASK; }
|
||||
if (op == EAO_DIV) { /* div? */
|
||||
GR[0] = t & DMASK;
|
||||
}
|
||||
else if (op == EAO_DIV) { /* div? */
|
||||
if (AY && (AX < AY)) {
|
||||
t = (AX << 16) | GR[0]; /* AX'GR1 / AY */
|
||||
GR[0] = t / AY; /* quo to GR1 */
|
||||
AX = t % AY; } /* rem to AX */
|
||||
AX = t % AY; /* rem to AX */
|
||||
MSR = MSR & ~MSR_L; } /* clear link */
|
||||
else MSR = MSR | MSR_L; /* set link */
|
||||
}
|
||||
else if (op == EAO_ARS) { /* arith right? */
|
||||
t = 0; /* shift limiter */
|
||||
if (AX & SIGN) MSR = MSR | MSR_L; /* L = sign */
|
||||
else MSR = MSR & ~MSR_L;
|
||||
do { /* shift one bit */
|
||||
AY = ((AY >> 1) | (AX << 15)) & DMASK;
|
||||
AX = (AX & SIGN) | (AX >> 1);
|
||||
GR[0] = (GR[0] + 1) & DMASK; }
|
||||
while (GR[0] && (++t < 32)); /* until cnt or limit */
|
||||
}
|
||||
else if (op == EAO_NORM) { /* norm? */
|
||||
if ((AX | AY) != 0) { /* can normalize? */
|
||||
while ((AX & SIGN) != ((AX << 1) & SIGN)) { /* until AX15 != AX14 */
|
||||
AX = ((AX << 1) | (AY >> 15)) & DMASK;
|
||||
AY = (AY << 1) & DMASK;
|
||||
GR[0] = (GR[0] + 1) & DMASK; } }
|
||||
}
|
||||
ao_update ();
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
uint32 ao_sf (uint32 op)
|
||||
{
|
||||
if (((op & 2) && (MSR & MSR_AOV)) || /* arith carry? */
|
||||
((op & 4) && (SIGN & /* arith overflow? */
|
||||
((AX ^ (AX + AY)) & (~AX ^ AY))))) return 1;
|
||||
((op & 4) && (MSR & MSR_SOV))) return 1; /* arith overflow? */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,28 +28,29 @@
|
||||
|
||||
There are several discrepancies between the original GRI-909 Reference
|
||||
Manual of 1969 and the only surviving code sample, the MIT Crystal Growing
|
||||
System of 1972:
|
||||
System of 1972. These discrepancies were clarified by later documentation:
|
||||
|
||||
1. Ref Manual documents two GR's at codes 26-27; MITCS documents six GR's
|
||||
at 30-35.
|
||||
at 30-35. Answer: 6 GR's, 26-27 were used for character compares.
|
||||
2. Ref Manual documents only unsigned overflow (carry) for arithmetic
|
||||
operator; MITCS uses both unsigned overflow (AOV) and signed overflow
|
||||
(SOV).
|
||||
(SOV). Answer: signed and unsigned.
|
||||
3. Ref Manual documents a ROM-subroutine multiply operator and mentions
|
||||
but does not document a "fast multiply"; MITCS uses an extended
|
||||
arithmetic operator with multiply, divide, and shifts. The behavior
|
||||
arithmetic operator with multiply, divide, and shift. The behavior
|
||||
of the extended arithmetic operator can only be inferred partially;
|
||||
the shifts are never used, and there is no indication of how divide
|
||||
overflow is handled.
|
||||
|
||||
The simulator follows the code in these instances.
|
||||
the shift is never used, and there is no indication of how divide
|
||||
overflow is handled. Answer: EAO is a package of ROM subroutines
|
||||
with just four functions: multiply, divide, arithmetic right shift,
|
||||
and normalize.
|
||||
|
||||
Outstanding issues:
|
||||
|
||||
1. Is there any interaction between the byte swapper and the byte packer?
|
||||
2. Is SOV testable even if the FOA is not ADD?
|
||||
3. How does the EAO handle divide overflow?
|
||||
3. How does the EAO handle divide overflow? Answer: set link.
|
||||
4. What are the other EAO functions beside multiply and divide?
|
||||
Answer: arithmetic right shift, normalize.
|
||||
*/
|
||||
|
||||
#include "sim_defs.h" /* simulator defns */
|
||||
@@ -109,7 +110,6 @@
|
||||
#define U_MSR 017 /* machine status */
|
||||
#define U_BSW 024 /* byte swap */
|
||||
#define U_BPK 025 /* byte pack */
|
||||
/* #define U_GR 026 /* dual general regs */
|
||||
#define U_GR 030 /* hex general regs */
|
||||
#define U_RTC 075 /* clock */
|
||||
#define U_HS 076 /* paper tape */
|
||||
@@ -159,17 +159,20 @@ struct gdev {
|
||||
#define AO_IOR 03 /* or */
|
||||
#define EAO_MUL 01 /* multiply */
|
||||
#define EAO_DIV 02 /* divide */
|
||||
#define EAO_ASR 03 /* arith rshft */
|
||||
#define EAO_ARS 03 /* arith rshft */
|
||||
#define EAO_NORM 04 /* normalize */
|
||||
|
||||
/* Machine status */
|
||||
|
||||
#define MSR_V_BOV 15 /* bus carry */
|
||||
#define MSR_BOV (1u << MSR_V_BOV)
|
||||
#define MSR_V_L 14 /* bus link */
|
||||
#define MSR_L (1u << MSR_V_L) /* bus link */
|
||||
#define MSR_V_FOA 8 /* arith func */
|
||||
#define MSR_M_FOA 03
|
||||
#define MSR_V_SOV 1 /* arith ovflo */
|
||||
#define MSR_V_AOV 0 /* arith carry */
|
||||
#define MSR_BOV (1u << MSR_V_BOV)
|
||||
#define MSR_L (1u << MSR_V_L)
|
||||
#define MSR_SOV (1u << MSR_V_SOV)
|
||||
#define MSR_AOV (1u << MSR_V_AOV)
|
||||
#define MSR_GET_FOA(x) (((x) >> MSR_V_FOA) & MSR_M_FOA)
|
||||
#define MSR_PUT_FOA(x,n) (((x) & ~(MSR_M_FOA << MSR_V_FOA)) | \
|
||||
|
||||
Reference in New Issue
Block a user