vidutil.pp 386 B

1234567891011121314151617181920212223242526
  1. unit vidutil;
  2. Interface
  3. uses
  4. video;
  5. Procedure TextOut(X,Y : Word;Const S : String);
  6. Implementation
  7. Procedure TextOut(X,Y : Word;Const S : String);
  8. Var
  9. W,P,I,M : Word;
  10. begin
  11. P:=((X-1)+(Y-1)*ScreenWidth);
  12. M:=Length(S);
  13. If P+M>ScreenWidth*ScreenHeight then
  14. M:=ScreenWidth*ScreenHeight-P;
  15. For I:=1 to M do
  16. VideoBuf^[P+I-1]:=Ord(S[i])+($07 shl 8);
  17. end;
  18. end.