File tree Expand file tree Collapse file tree 11 files changed +28
-27
lines changed Expand file tree Collapse file tree 11 files changed +28
-27
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public void Run()
61
61
{
62
62
while ( running )
63
63
{
64
- if ( debug )
64
+ if ( debug )
65
65
{
66
66
if ( breakpoints . Contains ( Registers . PC . Content ) )
67
67
{
Original file line number Diff line number Diff line change 1
1
using Core8 . Model . Interfaces ;
2
- using Serilog ;
3
2
4
3
namespace Core8
5
4
{
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ public class Group3Instructions : InstructionsBase
8
8
{
9
9
private const int MQL_MASK = 1 << 4 ;
10
10
private const int MQA_MASK = 1 << 6 ;
11
- private const int SWP_MASK = 1 << 4 | 1 << 6 ;
11
+ private const int SWP_MASK = MQL_MASK | MQA_MASK ;
12
12
private const int CLA_MASK = 1 << 7 ;
13
13
14
14
public Group3Instructions ( ICPU cpu ) : base ( cpu )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public class KeyboardInstructions : TeleptypeInstructionsBase
11
11
private const int KCC_MASK = 0b_010 ;
12
12
private const int KRS_MASK = 0b_100 ;
13
13
private const int KIE_MASK = 0b_101 ;
14
- private const int KRB_MASK = 0b_110 ;
14
+ private const int KRB_MASK = KCC_MASK | KRS_MASK ;
15
15
16
16
public KeyboardInstructions ( ICPU cpu ) : base ( cpu )
17
17
{
Original file line number Diff line number Diff line change @@ -6,14 +6,16 @@ namespace Core8.Model.Instructions
6
6
{
7
7
public class MemoryManagementInstructions : PrivilegedInstructionsBase
8
8
{
9
- private const int CINT_MASK = 0b_110_010_000_100 ;
10
- private const int RDF_MASK = 0b_110_010_001_100 ;
11
- private const int RIF_MASK = 0b_110_010_010_100 ;
12
- private const int RIB_MASK = 0b_110_010_011_100 ;
13
- private const int RMF_MASK = 0b_110_010_100_100 ;
14
- private const int SINT_MASK = 0b_110_010_101_100 ;
15
- private const int CUF_MASK = 0b_110_010_110_100 ;
16
- private const int SUF_MASK = 0b_110_010_111_100 ;
9
+ private const int MEM_MGMT_MASK = 0b_110_010_000_100 ;
10
+
11
+ private const int CINT_MASK = MEM_MGMT_MASK ;
12
+ private const int RDF_MASK = ( 0b_001 << 3 ) | MEM_MGMT_MASK ;
13
+ private const int RIF_MASK = ( 0b_010 << 3 ) | MEM_MGMT_MASK ;
14
+ private const int RIB_MASK = ( 0b_011 << 3 ) | MEM_MGMT_MASK ;
15
+ private const int RMF_MASK = ( 0b_100 << 3 ) | MEM_MGMT_MASK ;
16
+ private const int SINT_MASK = ( 0b_101 << 3 ) | MEM_MGMT_MASK ;
17
+ private const int CUF_MASK = ( 0b_110 << 3 ) | MEM_MGMT_MASK ;
18
+ private const int SUF_MASK = ( 0b_111 << 3 ) | MEM_MGMT_MASK ;
17
19
18
20
private const int CDF_MASK = 1 << 0 ;
19
21
private const int CIF_MASK = 1 << 1 ;
Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ namespace Core8.Model.Instructions
8
8
{
9
9
public class MemoryReferenceInstructions : InstructionsBase
10
10
{
11
- private const int AND_MASK = 0b_000_00_0000000 ;
12
- private const int TAD_MASK = 0b_001_00_0000000 ;
13
- private const int ISZ_MASK = 0b_010_00_0000000 ;
14
- private const int DCA_MASK = 0b_011_00_0000000 ;
15
- private const int JMS_MASK = 0b_100_00_0000000 ;
16
- private const int JMP_MASK = 0b_101_00_0000000 ;
11
+ private const int AND_MASK = 0b_000 << 9 ;
12
+ private const int TAD_MASK = 0b_001 << 9 ;
13
+ private const int ISZ_MASK = 0b_010 << 9 ;
14
+ private const int DCA_MASK = 0b_011 << 9 ;
15
+ private const int JMS_MASK = 0b_100 << 9 ;
16
+ private const int JMP_MASK = 0b_101 << 9 ;
17
17
18
18
private const int ZERO = 1 << 7 ;
19
19
private const int INDIRECT = 1 << 8 ;
Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ namespace Core8.Model.Instructions
6
6
{
7
7
public class TeleprinterInstructions : TeleptypeInstructionsBase
8
8
{
9
- private const int TFL_MASK = 0b_000 ;
10
- private const int TSF_MASK = 0b_001 ;
11
- private const int TCF_MASK = 0b_010 ;
12
- private const int TPC_MASK = 0b_100 ;
13
- private const int TLS_MASK = 0b_110 ;
9
+ private const int TFL_MASK = 0 ;
10
+ private const int TSF_MASK = 1 << 0 ;
11
+ private const int TCF_MASK = 1 << 1 ;
12
+ private const int TPC_MASK = 1 << 2 ;
13
+ private const int TLS_MASK = TCF_MASK | TPC_MASK ;
14
14
15
15
public TeleprinterInstructions ( ICPU cpu ) : base ( cpu )
16
16
{
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ protected void StartAndWaitForCompletion()
52
52
53
53
timeout = sw . Elapsed > MaxRunningTime ;
54
54
55
- Thread . Sleep ( 100 ) ;
55
+ Thread . Sleep ( 50 ) ;
56
56
}
57
57
58
58
if ( ! ExpectHLT )
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ public class RandomJMPJMSTest : MAINDECTestsBase
8
8
{
9
9
protected override string TapeName => @"MAINDEC/tapes/MAINDEC-8E-D0JC-PB.bin" ;
10
10
11
- protected override string [ ] ExpectedOutput => new [ ] { "JC \r \n " } ;
11
+ protected override string [ ] ExpectedOutput => new [ ] { "\r \n JC " } ;
12
12
13
13
protected override string [ ] UnexpectedOutput => new [ ] { "F " } ;
14
14
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ public class RandomJMPTest : MAINDECTestsBase
8
8
{
9
9
protected override string TapeName => @"MAINDEC/tapes/MAINDEC-8E-D0HC-PB.bin" ;
10
10
11
- protected override string [ ] ExpectedOutput => new [ ] { "HC \r \n " } ;
11
+ protected override string [ ] ExpectedOutput => new [ ] { "\r \n HC " } ;
12
12
13
13
protected override string [ ] UnexpectedOutput => new [ ] { "Z =" } ;
14
14
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ public class RandomTADTest : MAINDECTestsBase
8
8
{
9
9
protected override string TapeName => @"MAINDEC/tapes/MAINDEC-8E-D0EB-PB.bin" ;
10
10
11
- protected override string [ ] ExpectedOutput => new [ ] { "T \r \n " } ;
11
+ protected override string [ ] ExpectedOutput => new [ ] { "\r \n T " } ;
12
12
13
13
[ TestMethod ]
14
14
public override void Start ( )
You can’t perform that action at this time.
0 commit comments