home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / MADTRB9.ZIP / STRPRNT.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1985-12-12  |  830 b   |  32 lines

  1. Program StrPrnt;
  2. { Program for testing of Dos 2.0 funtion $9  (print string)
  3. { Speed is comparable to Pascal write.
  4. { Danny Cavasos         June 1984 }
  5. type
  6.   varX = record
  7.     varL,varH: Byte;
  8.   end;
  9.   RecPack = record
  10.     AX: varX;
  11.     BX,CX,DX,BP,SI,DI,DS,ES,FLAGS: Integer;
  12.   end;
  13. var
  14.   IntParm : RecPack;
  15.   y       : Integer;
  16.   AnyString: string[81];
  17. begin
  18.   clrscr;
  19.   AnyString:='*------string to  test the speed of DOS interrupt hex 23 function 9 ----------*$';
  20.   for y:=1 to 24 do
  21.     begin
  22.       gotoXY(1,y);
  23.       with IntParm do
  24.         begin
  25.           AX.varH:=$9;
  26.           DS:=Seg(AnyString);     {get segment where string resides}
  27.           DX:=Ofs(AnyString)+1;   {get offset for string. add 1 to skip length byte}
  28.           MsDos(IntParm);
  29.         end;
  30.     end;
  31.   gotoXY(1,1);
  32. end.