Browse Source

+ added checks for the Program Segment Prefix's relative position to the code
segment in the compact and large memory layout tests

git-svn-id: trunk@28074 -

nickysn 11 years ago
parent
commit
57de15e071
2 changed files with 8 additions and 0 deletions
  1. 5 0
      tests/test/cpu16/i8086/tmmc.pp
  2. 3 0
      tests/test/cpu16/i8086/tmml.pp

+ 5 - 0
tests/test/cpu16/i8086/tmmc.pp

@@ -48,10 +48,15 @@ begin
   DS := DSeg;
   SS := SSeg;
   HS := Seg(HeapP^);
+  Writeln('PrefixSeg=', PrefixSeg);
   Writeln('CS=', CS);
   Writeln('DS=', DS);
   Writeln('SS=', SS);
   Writeln('Heap Seg=', HS);
+  if not (PrefixSeg < CS) then
+    Error('PrefixSeg >= CS');
+  if (CS - PrefixSeg) <> 16 then
+    Error('(CS - PrefixSeg) <> 16');
   if not (CS < DS) then
     Error('CS >= DS');
   if not (DS < SS) then

+ 3 - 0
tests/test/cpu16/i8086/tmml.pp

@@ -44,10 +44,13 @@ begin
   DS := DSeg;
   SS := SSeg;
   HS := Seg(HeapP^);
+  Writeln('PrefixSeg=', PrefixSeg);
   Writeln('CS=', CS);
   Writeln('DS=', DS);
   Writeln('SS=', SS);
   Writeln('Heap Seg=', HS);
+  if not (PrefixSeg < CS) then
+    Error('PrefixSeg >= CS');
   if not (CS < DS) then
     Error('CS >= DS');
   if not (DS < SS) then