home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / forthmacs / htmldocs / !Forthmacs / docs / html / terminal < prev    next >
Encoding:
Text File  |  1996-02-23  |  3.5 KB  |  108 lines

  1. <!-- Forthmacs Formatter generated HTML output -->
  2. <html>
  3. <head>
  4. <title>Terminal Control</title>
  5. </head>
  6. <body>
  7. <h1>Terminal Control</h1>
  8. <hr>
  9. <p>
  10. This chapter lists the words for performing terminal operations such as moving 
  11. the cursor, inserting or deleting lines, etc.  When writing programs you are 
  12. advised to use only these user interface words.  
  13. <p>
  14. <p>
  15. <h2>User interface words</h2>
  16. <p>
  17.  <code><A href="_smal_AG#246"> left </A></code> moves the cursor one character 
  18. to the left 
  19. <p>
  20.  <code><A href="_smal_AS#2b2"> right </A></code> Moves the cursor one character 
  21. to the right 
  22. <p>
  23.  <code><A href="_smal_BD#31b"> up </A></code> moves the cursor one line up 
  24. <p>
  25.  <code><A href="_smal_BG#1ce"> down </A></code> moves the cursor one line down 
  26. <p>
  27.  <code><A href="_smal_BW#23e"> kill-line </A></code> erases from the cursor to 
  28. the end of the line 
  29. <p>
  30.  <code><A href="_smal_BX#23f"> kill-screen </A></code> erases from the cursor to 
  31. the end of the screen 
  32. <p>
  33.  <code><A href="_smal_BH#22f"> insert-line </A></code> inserts a blank line at 
  34. the cursor position 
  35. <p>
  36.  <code><A href="_smal_AL#1bb"> delete-line </A></code> deletes the line the 
  37. cursor is on 
  38. <p>
  39.  <code><A href="_smal_AG#1e6"> erase-screen </A></code> erases the entire screen 
  40. <p>
  41.  <code><A href="_smal_AK#15a"> beep </A></code> rings the bell 
  42. <p>
  43.  <code><A href="_smal_AA#1b0"> dark </A></code> switches to inverse video 
  44. <p>
  45.  <code><A href="_smal_AJ#249"> light </A></code> switches to normal video 
  46. <p>
  47.  <code><A href="_smal_AF#155"> at </A></code> moves the cursor to a specified 
  48. line and column 
  49. <p>
  50.  <code><A href="_smal_AG#156"> at? </A></code> gets the current output-cursor 
  51. position 
  52. <p>
  53.  <code><A href="_smal_BH#7f"> #lines </A></code> returns the number of lines on 
  54. the screen 
  55. <p>
  56.  <code><A href="_smal_BD#7b"> #columns </A></code> returns the number of columns 
  57. on the screen 
  58. <p>
  59.  <code><A href="_smal_BM#1a4"> cursor-off </A></code> 
  60. <p>
  61.  <code><A href="_smal_BN#1a5"> cursor-on </A></code> 
  62. <p>
  63.  <code><A href="_smal_BQ#268"> marked </A></code> switches to 'marked' output 
  64. i.e.  red-on-white by default.  
  65. <p>
  66. <p>
  67. <h2>Terminals</h2>
  68. <p>
  69. All user interface terminal words are deferred via the  <code><A href="_smal_BK#2f2"> terminal: </A></code> 
  70. definition itself.  This allowes support for lots of different output devices, 
  71. serial interfaces, WIMP environment, text windows, VT220 devices can all be 
  72. supported and are very easy to switch between.  
  73. <p>
  74. Just have a look at the defining of a WISE terminal <em>extend.terminal.wyse</em> 
  75. <p>
  76. <p><pre>
  77.     only forth also terminals definitions
  78.     terminal: wyse
  79.     prototype dumb
  80.     for (right         ctl F ;
  81.     for (at            esc Y   swap bl + (emit  bl + (emit  ;
  82.     for (insert-char   esc q    (emit  esc r  ;
  83.     for (delete-char   esc W ;
  84.     for (kill-line     esc K ;
  85.     for (kill-screen   esc k ;
  86.     for (insert-line   esc M ;
  87.     for (delete-line   esc l ;
  88.     for (erase-screen  ctl L ;
  89.     for dark           ctl N ;
  90.     for light          ctl O ;
  91.     : wyse-vp  wyse ;  : wv wyse ;
  92.     only forth also terminals also forth definitions
  93.     : wyse wyse ;
  94.     only forth also definitions
  95. </pre><p>
  96. <p>
  97. After this you only have to call 
  98. <br><code>    wise</code><br>
  99. and all the user interface words all call the wyse functions.  
  100. <p>
  101. NOTE: The  <code><A href="_smal_BK#2f2"> terminal: </A></code> will later also 
  102. include the windowing functions.  All existing software should also run in the 
  103. WIMP environment, the new functions won't be used in the text environment.  
  104. <p>
  105. </body>
  106. </html>
  107.