home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / sviluppo / cop / terminal.doc < prev    next >
Text File  |  1998-11-29  |  14KB  |  296 lines

  1. $VER: Terminal documation 3.5
  2. *****************************************************************************
  3. **                                                                         **
  4. ** ___________                                                             **
  5. ** \        */                                                             **
  6. **  /-----------     #######     #######    ########                       **
  7. **  |    ^ |        ##      ##  ##     ##   ##     ##                      **
  8. **  |      _\       ##          ##     ##   ##     ##  Version 1.68        **
  9. **  |      |        ##          ##     ##   ########                       **
  10. **  |    --|        ##          ##     ##   ##                             **
  11. **  +-----/         ##      ##  ##     ##   ##                             **
  12. **   |   |           #######     #######    ## (c)1993-98 THOR-Software    **
  13. **                                                                         **
  14. **              A Low Level Debugger for all Amiga Systems                 **
  15. **-------------------------------------------------------------------------**
  16. **                 __                                                      **
  17. **               ___/|                                                     **
  18. **              /  |:|  Type 3 Terminal (COP/DASB) Specifiactions          **
  19. **       ====== |  |:|  Type 4 Terminal (COP/DASB 4.2)                     **
  20. **       ====== |  |:|  Type 5 Terminal (COP)                              **
  21. **       ====== |  |:|  (c) 1994-1998 THOR-Software                        **
  22. **              \__|/                                                      **
  23. **                                                                         **
  24. **      Release 3.3             14th May 1994                              **
  25. **      Release 3.4             29th May 1994 - added type 4 terminals     **
  26. **      Release 3.5             31th May 1995 - added type 5 terminals     **
  27. *****************************************************************************
  28.  
  29. This documentations describes the character and control codes used by the
  30. COP System debugger, copyrighted by THOR.
  31.  
  32. Terminology
  33. -----------
  34.  
  35.         Orientation of a "COP SCREEN"
  36.  
  37.  
  38.  first column                                   last column
  39.     |                                           |
  40.         
  41.     +-------------------------------------------+ <- top line
  42.     |                                           |
  43.     |                                           |
  44.     |                                           | <- top window
  45.     |                                           |    (this one is fixed and
  46.     |                                           |     does not scroll)
  47.     +-------------------------------------------+
  48.     |                                           |
  49.     |*******************************************| <- marked line (type 4
  50.     |                                           |    terminals text 
  51.     |                                           |    blinking or high 
  52.     |                                           |    intensity)
  53.     |                                           |
  54.     |                                           | <- bottom window
  55.     |           # (cursor)                      |       (scrollable)
  56.     |                                           |
  57.     |                                           |
  58.     +-------------------------------------------+ <- bottom line
  59.         
  60.                         ^
  61.                 Screen  |       (the whole thing)
  62.  
  63. Lines are counted from top bottom with the top line beeing number 0.
  64. Columns are counted from left to right with the first column being 0.
  65.  
  66.                 
  67. Screen Specifications
  68. ---------------------
  69.  
  70. columns:        80 (fixed)
  71. rows:           between 24 and 64
  72.  
  73.  
  74. Line marking (Type 4 terminals only)
  75. ------------
  76. The characters in a given line share a common attribute, selectable by
  77. an escape sequence (see below). The following attributes are defined and
  78. will be send by the highlight escape sequence :
  79.  
  80. 00:             Normal  (as for type 3 and ascii terminals)
  81. 01:             Highlight or white background
  82. 02:             Blink or red background
  83. 03:             undefined, terminal specific and not used by COP
  84.  
  85. Notes:
  86. i)      It is not possible to mark SINGLE characters, only whole lines.
  87.         Character marking might be included in a later release.
  88.  
  89. ii)     Line marking is not compatible with scrolling. Disable the
  90.         marks first, if you want to scroll.
  91.         Some terminals scroll the marks together with the characters,
  92.         others won't.
  93.  
  94.         
  95. Serial Transfer Specifications (if any)
  96. ---------------------------------------
  97.  
  98. baud rate:      9600
  99. start bits:     1
  100. stop bits:      1
  101. parity:         none
  102.  
  103.  
  104. Character Map
  105. -------------
  106.  
  107. i)control characters (in HEX)
  108.         00      :       NUL     ignore
  109.  
  110.         08      :       BS      non-erasing backspace
  111.                                 do nothing at start of line
  112.  
  113.         09      :       TAB     Jump to next tab stop
  114.                                 tab stops are set every eigth
  115.                                 columns. Jump to next line and
  116.                                 scroll if beyond last tab stop.
  117.  
  118.         0A      :       LF      Move cursor down one line. Scroll
  119.                                 if end of display reached. Perform
  120.                                 NO CR, don't set cursor to start of
  121.                                 line. (No auto CR)
  122.                                 The effect of scrolling marked
  123.                                 lines is undefined.
  124.  
  125.         0C      :       FF      Clear screen. Move cursor to top of
  126.                                 screen. Set window size to zero
  127.                                 (=disable splitting).
  128.                                 On type 4 terminals : clear all line
  129.                                 marks.
  130.  
  131.         0D      :       CR      Set cursor to start of line. Perform
  132.                                 NO LF, do not scroll, move cursor
  133.                                 NOT downwards. (No auto LF)
  134.  
  135.         1B      :       ESC     introduce ESC-sequence (see below)
  136.  
  137.         1C      :       UP      move cursor upwards one line. If top
  138.                                 of screen reached, move to 
  139.                                 bottommost line, do no reverse scroll
  140.  
  141.         1D      :       DOWN    Move cursor downwards one line. If
  142.                                 bottom reached, jump to first line,
  143.                                 do not scroll.
  144.  
  145.         1E      :       LEFT    move cursor one character to the
  146.                                 left, if first column passed, move
  147.                                 to last column of the same line
  148.                                 (do not move cursor upwards)
  149.  
  150.         1F      :       RIGHT   move cursor one character to the
  151.                                 right, if last column passed, move
  152.                                 to first column of the same line
  153.                                 (do not move cursor downwards)
  154.                                         
  155.         20-7E   :               standard american ASCII.
  156.         
  157.         7F      :       DEL     Reserved, not used by COP.
  158.                                 You should not use this character.
  159.  
  160.         9B      :       EOL     Move cursor down one row, then move
  161.                                 it to the first column (=LF & CR)
  162.  
  163. Note:   The term "scrolling" is used as "scrolling the scrollable bottom
  164.         window", the top window (if any) is never scrolled.
  165.                                                 
  166. All other codes are ignored, especially no 8-bit ASCII-codes are supported
  167. and interpretation of this codes are terminal-dependent. (National languague
  168. characters as defined by ISO, IBM or MAC characters or inverse characters). 
  169. They are not used by COP.
  170.  
  171.         
  172. ESC-Sequences
  173. -------------
  174.  
  175. All arguments to ESC-sequences are 7 bit binary numbers. I decided not to
  176. use decimal numbers to keep the thing simple and fast....
  177. The answer values of an external terminal, if any, is also a 7 bit number 
  178. and is noted here by "->":
  179.  
  180.         1B 01           :       Send ID
  181.                 -> id           The terminal should send within 1/2 sec.
  182.                                 its version number as binary code.
  183.                                 All terminals with codes >=3 are
  184.                                 believed to support type 3 terminal
  185.                                 codes. If the terminal does not repond
  186.                                 in this period, COP assumes this being
  187.                                 an ASCII terminal.
  188.                                 All terminals >=4 support type 4 codes.
  189.                                 If this is a type 5 terminal, it should
  190.                                 disable the printer output, similar to
  191.                                 the disable command described below.
  192.  
  193.         1B 02 xx yy     :       Set cursor to column xx, line yy, the
  194.                                 first column/line is number 0.
  195.                                 xx and yy are transmitted as binary
  196.                                 codes, NOT AS DECIMALS.
  197.  
  198.         1B 03 yy        :       Draw horizontal line at line yy, set
  199.                                 cursor to line yy,column 0. The drawing
  200.                                 should be done by inverting the screen,
  201.                                 so drawing the line again undoes it.
  202.  
  203.         1B 04           :       Draw horizontal line at current cursor
  204.                                 position, reset cursor to column 0.
  205.  
  206.         1B 05 yy        :       Set the size of the top window in
  207.                                 lines, no top window if yy=0.
  208.                                 With the top window activated, scolling
  209.                                 takes place only in the bottom window,
  210.                                 starting with line yy to the bottom line.
  211.                                 No graphics are printed to make the window
  212.                                 visible, use the draw line command in the
  213.                                 top window to do this.
  214.  
  215.         1B 06           :       Send cursor position. The terminal must
  216.                 -> xx yy        repond with two binary numbers beeing
  217.                                 the column number/line number of the
  218.                                 current cursor position resp.
  219.                                 The first column/line is number 0.
  220.  
  221.         1B 07 y1 y2     :       Clear region. The lines from y1 inclusive
  222.                                 and y2 exclusive are cleared. The cursor
  223.                                 position is not affected.
  224.                                 (Don't forget to redraw the cursor !)
  225.  
  226.         1B 08           :       Clear this line. The line at current cursor
  227.                                 position is cleared, the cursor is not
  228.                                 affected.
  229.                                 (Don't forget to redraw the cursor !)
  230.  
  231.         1B 09           :       Scroll bottom window, do not affect cursor.
  232.                                 The window should be scrolled under the
  233.                                 cursor, so the cursor position won't
  234.                                 change in respect to the upper left edge
  235.                                 of the screen, but will change in respect
  236.                                 to the text scrolled under the cursor.
  237.                                 The effect of scrolling marked lines
  238.                                 is undefined and COP does not send codes
  239.                                 to do so.
  240.  
  241.         1B 0A           :       Send screen size. The terminal must respond
  242.                 -> yy           with the size of the active display in
  243.                                 lines, coded as a binary number.
  244.  
  245.  
  246. The following sequences are defined for type 4 terminals only and won't
  247. be send to type 3 terminals:
  248.  
  249.         1B 0B yy cc     :       Mark line yy with color cc. Colorcodes
  250.                                 00      :       normal background
  251.                                 01      :       white background or
  252.                                                 high intensity
  253.                                 02      :       red background or
  254.                                                 blinking mode                           
  255.                                 03      :       terminal specific
  256.                         (not sent by COP)
  257.  
  258.         1B 0C cc        :       Mark cursor line with color cc.         
  259.  
  260.         1B 0D           :       Remove all marks.               
  261.  
  262.         1B 0E           :       Clear until end of line
  263.                                 the cursor position won't change by this
  264.                                 command
  265.  
  266. ...and now the type 5 terminal sequences (won't be sent to types 3 and 4):
  267.  
  268.         1B 10           :       Start printer output
  269.                                 All data send to the terminal should be
  270.                                 printed to a local printing device,
  271.                                 except ESC-sequences
  272.                                 
  273.         1B 11           :       Stop printer output
  274.                                 Display data only on the screen
  275.                                 
  276.                                 Both calls should not nest, this is done
  277.                                 by COP
  278.                                 
  279.                                 
  280. Implementations
  281. ---------------
  282.  
  283. Currently only two terminal programs support COP control sequences. The
  284. first is the "Terminal" program found in the COP archive, for amiga computers.
  285. If you own a second amiga, run this program and use a null modem cable for
  286. connection (GND,TxD and RxD crossed is enough for COP).
  287. The second program is "DASB" for the antique Atari 8 bit series. It requires
  288. an 850 or 850XL interface box and a disk drive. It is also available in the
  289. COP archive, in the drawer "DASB_German".
  290.  
  291. It would be nice if somebody could write more COP terminals for other
  292. computers. Contact me in this case, the programs will be included in the
  293. COP archive next time.
  294.  
  295. Thomas
  296.