Skip to content

Commit 150ccd3

Browse files
committed
Fixed PUSH from Group 4/5 modreg 7
1 parent cb067f1 commit 150ccd3

File tree

10 files changed

+27
-25
lines changed

10 files changed

+27
-25
lines changed

GenOpCodes/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("2024.3.12.1273")>
35-
<Assembly: AssemblyFileVersion("2024.3.12.1273")>
34+
<Assembly: AssemblyVersion("2024.3.12.1277")>
35+
<Assembly: AssemblyFileVersion("2024.3.12.1277")>
3636

3737
<assembly: AssemblyInformationalVersion("2024.3.12")>

RunTests/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("2024.3.12.1679")>
35-
<Assembly: AssemblyFileVersion("2024.3.12.1679")>
34+
<Assembly: AssemblyVersion("2024.3.12.1683")>
35+
<Assembly: AssemblyFileVersion("2024.3.12.1683")>
3636

3737
<assembly: AssemblyInformationalVersion("2024.3.12")>

RunTests2/Program.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,17 @@ public static void Main(string[] args) {
2525
SimulationMultiplier = 2,
2626
};
2727

28-
int skipCount = 278+12;
28+
int skipCount = 278+45;
2929
string[] skipOpCodes = {"0F", // POP CS
3030

3131
// These opcodes seem to have bugs
3232
"27", "2F", "37", "3F", // DAA, DAS, AAA, AAS,
3333
"D2.0", "D2.1", "D2.2", "D2.3", // Group 2
3434
"D2.4", "D2.5", "D2.7", // LOOPNE, LOOPE, LOOP
3535
"D3.0", "D3.1", "D3.2", "D3.3", // CALL, JMP (on some cases)
36-
"D3.4", "D3.5", "D3.7",
36+
"D3.4", "D3.5", "D3.7", // MUL, IMUL, DIV (Group 3 | flags)
37+
// IDIV, (Group 3 | flags & results!)
38+
// CALL SP (Group 4/5 | flags)
3739
"D4", "D5", // AAM, AAD
3840

3941

@@ -76,7 +78,7 @@ public static void Main(string[] args) {
7678
cpu.Registers.SS = tests[i].initial.regs.ss;
7779
cpu.Flags.EFlags = tests[i].initial.regs.flags;
7880

79-
//if(tests[i].test_hash == "3029050ee0c43649fa54b2a1784a759c9428dc7d762984fe98e0596f9424f691") Debugger.Break();
81+
// if(tests[i].test_hash == "32f8f22db991f65764f2d6dfae0c2ce8c266ab188138c670bffb69ced869c987") Debugger.Break();
8082

8183
Task.Run(async () => {
8284
//while(cpu.Registers.IP != tests[i].final.regs.ip) {
@@ -134,9 +136,8 @@ private static void AnalyzeResult(Test currentTest) {
134136

135137
if(!passed) {
136138
Console.WriteLine($"\tTest Hash: {currentTest.test_hash}");
137-
Console.ReadKey();
139+
Console.ReadKey(true);
138140
}
139-
//waiter.Set();
140141
}
141142

142143
private static void LoadRam(int[][] ram) {

RunTests2/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("2024.3.12.597")]
35-
[assembly: AssemblyFileVersion("2024.3.12.597")]
34+
[assembly: AssemblyVersion("2024.3.12.646")]
35+
[assembly: AssemblyFileVersion("2024.3.12.646")]
3636

37-
[assembly: AssemblyInformationalVersion("2024.3.12.597")]
37+
[assembly: AssemblyInformationalVersion("2024.3.12.646")]

x8086NetEmu/Helpers/OpCodes.vb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,8 @@ AddressOf _FE_FF}
10541054
End Sub
10551055

10561056
Private Sub _9C() ' PUSHF
1057-
PushIntoStack(If(mModel = Models.IBMPC_5150, &HFFF, &HFFFF) And mFlags.EFlags)
1057+
PushIntoStack(mFlags.EFlags)
1058+
'PushIntoStack(If(mModel = Models.IBMPC_5150, &HFFF, &HFFFF) And mFlags.EFlags)
10581059
clkCyc += 10
10591060
End Sub
10601061

x8086NetEmu/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("2024.3.12.10709")>
35-
<Assembly: AssemblyFileVersion("2024.3.12.10702")>
34+
<Assembly: AssemblyVersion("2024.3.12.10778")>
35+
<Assembly: AssemblyFileVersion("2024.3.12.10771")>
3636

3737
<assembly: AssemblyInformationalVersion("2024.3.12")>

x8086NetEmu/x8086.vb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,14 +1918,14 @@ Public Class X8086
19181918

19191919
If addrMode.Size = DataSize.Byte Then
19201920
If result > &HFF Then
1921-
HandleInterrupt(0, True)
1921+
HandleInterrupt(0, False)
19221922
Exit Select
19231923
End If
19241924
mRegisters.AL = result
19251925
mRegisters.AH = remain
19261926
Else
19271927
If result > &HFFFF Then
1928-
HandleInterrupt(0, True)
1928+
HandleInterrupt(0, False)
19291929
Exit Select
19301930
End If
19311931
mRegisters.AX = result
@@ -2069,7 +2069,7 @@ Public Class X8086
20692069
mRegisters.CS = RAM16(mRegisters.ActiveSegmentValue, addrMode.IndAdr, 2)
20702070
clkCyc += 24
20712071

2072-
Case 6 ' PUSH Ev
2072+
Case 6, 7 ' PUSH Ev
20732073
If addrMode.IsDirect Then
20742074
If addrMode.Register2 = GPRegisters.RegistersTypes.SP Then
20752075
PushIntoStack(mRegisters.SP - 2)

x8086NetEmuConsole/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("2024.3.12.1789")>
35-
<Assembly: AssemblyFileVersion("2024.3.12.1784")>
34+
<Assembly: AssemblyVersion("2024.3.12.1793")>
35+
<Assembly: AssemblyFileVersion("2024.3.12.1788")>
3636

3737
<assembly: AssemblyInformationalVersion("2024.3.12")>

x8086NetEmuWinForms/FormEmulator.vb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,15 @@ Public Class FormEmulator
262262
videoPort.Focus()
263263

264264
cpu.Adapters.Add(New FloppyControllerAdapter(cpu))
265-
cpu.Adapters.Add(New CGAWinForms(cpu, videoPort, If(ConsoleCrayon.RuntimeIsMono, VideoAdapter.FontSources.TrueType, VideoAdapter.FontSources.BitmapFile), "asciivga.dat", False))
266-
'cpu.Adapters.Add(New VGAWinForms(cpu, videoPort, If(ConsoleCrayon.RuntimeIsMono, VideoAdapter.FontSources.TrueType, VideoAdapter.FontSources.BitmapFile), "asciivga.dat", False))
265+
'cpu.Adapters.Add(New CGAWinForms(cpu, videoPort, If(ConsoleCrayon.RuntimeIsMono, VideoAdapter.FontSources.TrueType, VideoAdapter.FontSources.BitmapFile), "asciivga.dat", False))
266+
cpu.Adapters.Add(New VGAWinForms(cpu, videoPort, If(ConsoleCrayon.RuntimeIsMono, VideoAdapter.FontSources.TrueType, VideoAdapter.FontSources.BitmapFile), "asciivga.dat", False))
267267
cpu.Adapters.Add(New KeyboardAdapter(cpu))
268268
cpu.Adapters.Add(New MouseAdapter(cpu)) ' This breaks many things (For example, MINIX and ELKS won't start, PC Tools' PCShell doesn't respond)
269269

270270
#If Win32 Then
271271
cpu.Adapters.Add(New SpeakerAdpater(cpu))
272272
cpu.Adapters.Add(New AdlibAdapter(cpu))
273-
'cpu.Adapters.Add(New SoundBlaster(cpu, cpu.Adapters.Last()))
273+
cpu.Adapters.Add(New SoundBlaster(cpu, cpu.Adapters.Last()))
274274
#End If
275275

276276
#If DEBUG Then

x8086NetEmuWinForms/My Project/AssemblyInfo.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Imports System.Runtime.InteropServices
3131
' by using the '*' as shown below:
3232
' <Assembly: AssemblyVersion("1.0.*")>
3333

34-
<Assembly: AssemblyVersion("2024.3.12.8691")>
35-
<Assembly: AssemblyFileVersion("2024.3.12.8689")>
34+
<Assembly: AssemblyVersion("2024.3.12.8727")>
35+
<Assembly: AssemblyFileVersion("2024.3.12.8725")>
3636

3737
<assembly: AssemblyInformationalVersion("2024.3.12")>

0 commit comments

Comments
 (0)