Browse Source

+ added interrupt procedures to the tests

git-svn-id: trunk@32173 -
nickysn 9 years ago
parent
commit
fe3711bf6a
2 changed files with 84 additions and 0 deletions
  1. 42 0
      tests/test/cpu16/i8086/tfarcal3.pp
  2. 42 0
      tests/test/cpu16/i8086/tfarcal4.pp

+ 42 - 0
tests/test/cpu16/i8086/tfarcal3.pp

@@ -64,6 +64,24 @@ procedure testproc3;
 begin
 end;
 
+{
+Note: BP7 treats interrupt procedures as near, as far as inline assembly call
+and jmp instructions are concerned. This might be considered a bug, but we
+should probably emulate it, or else we might break some BP7 code, that takes
+this bug into account, such as:
+
+  pushf
+  push cs
+  call testproc4  // produces a near call, not far
+}
+procedure testproc4; interrupt;
+begin
+end;
+
+procedure testproc5(Flags, CS, IP, AX, BX, CX, DX, SI, DI, DS, ES, BP: Word); interrupt;
+begin
+end;
+
 begin
   GetIntVec(NearInt, OldNearIntVec);
   SetIntVec(NearInt, @IntNearHandler);
@@ -83,6 +101,14 @@ begin
     call testproc3
     int FarInt
     call [testproc3]
+    int NearInt
+    call testproc4
+    int NearInt
+    call [testproc4]
+    int NearInt
+    call testproc5
+    int NearInt
+    call [testproc5]
 
     int NearInt
     call near ptr testproc1
@@ -96,6 +122,14 @@ begin
     call near ptr testproc3
     int NearInt
     call near ptr [testproc3]
+    int NearInt
+    call near ptr testproc4
+    int NearInt
+    call near ptr [testproc4]
+    int NearInt
+    call near ptr testproc5
+    int NearInt
+    call near ptr [testproc5]
 
     int FarInt
     call far ptr testproc1
@@ -109,6 +143,14 @@ begin
     call far ptr testproc3
     int FarInt
     call far ptr [testproc3]
+    int FarInt
+    call far ptr testproc4
+    int FarInt
+    call far ptr [testproc4]
+    int FarInt
+    call far ptr testproc5
+    int FarInt
+    call far ptr [testproc5]
   end;
   Writeln('Ok');
 

+ 42 - 0
tests/test/cpu16/i8086/tfarcal4.pp

@@ -64,6 +64,24 @@ procedure testproc3;
 begin
 end;
 
+{
+Note: BP7 treats interrupt procedures as near, as far as inline assembly call
+and jmp instructions are concerned. This might be considered a bug, but we
+should probably emulate it, or else we might break some BP7 code, that takes
+this bug into account, such as:
+
+  pushf
+  push cs
+  call testproc4  // produces a near call, not far
+}
+procedure testproc4; interrupt;
+begin
+end;
+
+procedure testproc5(Flags, CS, IP, AX, BX, CX, DX, SI, DI, DS, ES, BP: Word); interrupt;
+begin
+end;
+
 begin
   GetIntVec(NearInt, OldNearIntVec);
   SetIntVec(NearInt, @IntNearHandler);
@@ -83,6 +101,14 @@ begin
     call testproc3
     int NearInt
     call [testproc3]
+    int NearInt
+    call testproc4
+    int NearInt
+    call [testproc4]
+    int NearInt
+    call testproc5
+    int NearInt
+    call [testproc5]
 
     int NearInt
     call near ptr testproc1
@@ -96,6 +122,14 @@ begin
     call near ptr testproc3
     int NearInt
     call near ptr [testproc3]
+    int NearInt
+    call near ptr testproc4
+    int NearInt
+    call near ptr [testproc4]
+    int NearInt
+    call near ptr testproc5
+    int NearInt
+    call near ptr [testproc5]
 
     int FarInt
     call far ptr testproc1
@@ -109,6 +143,14 @@ begin
     call far ptr testproc3
     int FarInt
     call far ptr [testproc3]
+    int FarInt
+    call far ptr testproc4
+    int FarInt
+    call far ptr [testproc4]
+    int FarInt
+    call far ptr testproc5
+    int FarInt
+    call far ptr [testproc5]
   end;
   Writeln('Ok');