$R-,S-

Unit FixAttr;

Interface

Uses Crt;

Implementation

CONST Space : CHAR = ' ';

BEGIN
InLine(
   $B4/$03           {MOV    AH,03           }
  /$BB/$02/$00       {MOV    BX,0002         }
  /$CD/$10           {INT    10              }
  /$52               {PUSH   DX              }  {Save cursor pos}
  /$B4/$40           {MOV    AH,40           }
  /$B9/$01/$00       {MOV    CX,1            }
  /$BA/Space         {MOV    DX,OFFSET Space }
  /$CD/$21           {INT    21              }  {Write ' ' to stderr}
  /$B4/$02           {MOV    AH,02           }
  /$5A               {POP    DX              }
  /$CD/$10           {INT    10              }  {Restore cursor}
  /$B4/$08           {MOV    AH,08           }
  /$CD/$10           {INT    10              }  {Read DOS attr}
  /$88/$26/TextAttr);{MOV    [TextAttr],AH   }  {Update TextAttr}
END.
