Guest User

Untitled

a guest
Apr 26th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.88 KB | None | 0 0
  1. PROGRAM console(input, output);
  2.  
  3.  
  4.  
  5.  
  6. PROCEDURE console_clear;BEGIN
  7.     write(chr(27),'[2J');
  8. END;
  9. PROCEDURE console_goto_x_y(x:integer; y:integer);BEGIN
  10.     write(chr(27),'[',y:0,';',x:0,'H');
  11. END;
  12. PROCEDURE console_color_f(c:integer); BEGIN
  13.     write(chr(27),'[',30+c:0,'m');
  14. END;
  15. PROCEDURE console_color_b(c:integer); BEGIN
  16.     write(chr(27),'[',40+c:0,'m');
  17. END;
  18. PROCEDURE console_style(s:integer); BEGIN
  19.     write(chr(27),'[',s:0,'m');
  20. END;
  21. PROCEDURE console_save_cursor; BEGIN
  22.     write(chr(27),'[s');
  23. END;
  24. PROCEDURE console_restore_cursor; BEGIN
  25.     write(chr(27),'[u');
  26. END;
  27. PROCEDURE console_print(text:string; x:integer; y:integer);BEGIN
  28.     {clearconsole;}
  29.     console_goto_x_y(x,y);
  30.     write(text);
  31. END;
  32. PROCEDURE console_restore_all; BEGIN
  33.     console_style(0);
  34. END;
  35.  
  36.  
  37.  
  38.  
  39. BEGIN
  40.     console_color_f(7);
  41.     console_color_b(1);
  42.     console_print(';)',38,12);
  43.     console_restore_all;
  44. END.
Add Comment
Please, Sign In to add comment