diff options
Diffstat (limited to 'tests/test/cpu16/i8086/tmml.pp')
-rw-r--r-- | tests/test/cpu16/i8086/tmml.pp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test/cpu16/i8086/tmml.pp b/tests/test/cpu16/i8086/tmml.pp index fa3346e554..31618d28fe 100644 --- a/tests/test/cpu16/i8086/tmml.pp +++ b/tests/test/cpu16/i8086/tmml.pp @@ -21,6 +21,7 @@ program tmml; var CS, DS, SS, HS: Word; HeapP: Pointer; + HeapOrgSeg, HeapOrgOfs, HeapEndSeg, HeapEndOfs: Word; ErrorsFound: Boolean; procedure Error(const S: string); @@ -44,10 +45,16 @@ begin DS := DSeg; SS := SSeg; HS := Seg(HeapP^); + HeapOrgSeg := Seg(HeapOrg^); + HeapOrgOfs := Ofs(HeapOrg^); + HeapEndSeg := Seg(HeapEnd^); + HeapEndOfs := Ofs(HeapEnd^); Writeln('PrefixSeg=', PrefixSeg); Writeln('CS=', CS); Writeln('DS=', DS); Writeln('SS=', SS); + Writeln('HeapOrg=', HeapOrgSeg, ':', HeapOrgOfs); + Writeln('HeapEnd=', HeapEndSeg, ':', HeapEndOfs); Writeln('Heap Seg=', HS); if not (PrefixSeg < CS) then Error('PrefixSeg >= CS'); @@ -57,6 +64,14 @@ begin Error('DS >= SS'); if not (SS < HS) then Error('SS >= HeapSeg'); + if HeapOrgOfs <> 0 then + Error('HeapOrg offset <> 0'); + if HeapEndOfs <> 0 then + Error('HeapEnd offset <> 0'); + if (HeapOrgSeg - SS) <> 1024 then + Error('HeapOrgSeg <> SS+1024 (16kb stack)'); + if (PrefixSeg + MemW[PrefixSeg-1:3]) <> HeapEndSeg then + Error('HeapEnd segment <> end_of_current_program_MCB'); FreeMem(HeapP, 5); if ErrorsFound then begin |