
"   TERMINAL DEFINITION FILE FOR WYSE 60 TERMINAL                       "

"  This terminal definition is one of a pair provided for 'least common    "
"  denominator' support of the various configurations of the Wyse-60.      "
"  You may find it worthwhile to customize these definitions to your       "
"  actual keyboard layout.  Depending on the applications you primarily    "
"  use, you may also find the Wyse-60's Televideo-955 emulation            "
"  capability to be preferable.                                            "

"  The two terminal definitions are named WYSE_60 and WYSE_60_PROTECTED.   "
"  The unprotected definition will generally be preferable for the         "
"  Edit_File application since protection disables insertion and deletion  "
"  of lines, plus columnar tabbing.  The unprotected definition is also    "
"  preferable for applications that expect the user to press the cursor    "
"  motion keys to point within a protected field, such as Edit_Catalog or  "
"  Design_Screen.  The protected definition is best for 'fill in the       "
"  forms' applications since it includes auto-tabbing.                     "

"  The Wyse-60 hardware behavior will not allow cursor motion into a       "
"  protected field.  Note that if the Wyse terminal is placed into         "
"  Televideo 955 emulation and the TV_955_PROTECTED definition is          "
"  selected, the user can move the cursor vertically into protected        "
"  fields, although not horizontally; this is sufficient for most usage    "
"  of Edit_Catalog's 'point and shoot' functions.                          "

"  When the Wyse-60 emulates a Televideo 955, there is an incompatibility  "
"  in the behavior of excessive backward tab keystrokes:  the actual       "
"  Televideo will not move the cursor to any position in front of the      "
"  first input field, while the Wyse emulation can place the cursor into   "
"  the Home position even when it is protected.  If this incompatibility   "
"  cause significant hardships, the workaround is to make a customized     "
"  version of the TV_955_PROTECTED definition which sets the TABS_TO_HOME  "
"  parameter to TRUE instead of the Televideo FALSE value.                 "

"  The two WYSE_60 definitions are packaged with support for 43-row        "
"  display format.  Some applications will always use the 24-row format,   "
"  some (such as Edit_Catalog) will always use the 43-row format, and      "
"  some (such as Edit_File) will support both.  Edit_File will default to  "
"  43 rows.  Some users may consider the 43-row format to be illegible,    "
"  so you might need to customize these definitions to only describe the   "
"  24-row formats.  Note that if you choose to use the Wyse-60 as a        "
"  Televideo-955 emulator, you will only have 24-row formats.              "

"  The two WYSE_60 definitions are packaged to support all four keyboard   "
"  configurations.  This is accomplished by NOT providing LABEL            "
"  parameters on the statements that define keys which might not really    "
"  be available, such as function keys 11 thru 16 plus the                 "
"  insert/delete-line keys.  You may want to customize these definitions   "
"  to your own keyboard configuration by adding the missing LABEL          "
"  parameters.                                                             "

"  VARIABLES
   prefix       = (ESC 'G')
   graph        = (ESC 'H')
   line_on      = (graph 02(16))
   line_off     = (graph 03(16))

   bold_box     = (graph '7')
   up_t         = (graph '0')
   down_t       = (graph '=')
   left_t       = (graph '4')
   right_t      = (graph '9')
   cross        = (graph '8')
   normal       = (prefix '0')
   blink        = (prefix '2')
   reverse      = (prefix '4')
   underline    = (prefix '8')
   dim          = (prefix 'p')
   enable_protect   = (ESC '&')
   disable_protect  = (ESC '''')
   start_protect    = (esc ')')
   stop_protect     = (esc '(')
   wrap_off     = (esc 'd.')
   wrap_on      = (esc 'd/')
   autopage_off = (esc 'd*')
   autoscroll_on    = (esc 'O')
   autoscroll_off   = (esc 'N')

    terminal_model      value = 'wyse_60_protected'
    communications      type  = asynch
    end_of_information  in    = (0)

    apps name='driver_procedure' out='tup$bootstrap_wyse60_driver'

"
"   CURSOR POSITIONING INFORMATION
"
    cursor_pos_encoding      bias  = (1)    type = ansi_cursor
    cursor_pos_column_first  value = FALSE
    cursor_pos_column_length value = (0)
    cursor_pos_row_length    value = (0)
    cursor_pos_begin         out   = (ESC 'a')
    cursor_pos_second        out   = ('R')
    cursor_pos_third         out   = ('C')
"
"   CURSOR MOVEMENT INFORMATION
"
    cursor_home              inout = (rs)            label='Home'
    cursor_up                inout = (vt)
    cursor_down              inout = (lf)
    cursor_left              inout = (bs)
    cursor_right             inout = (ff)
"
"   CURSOR BEHAVIOR (MOVEMENT KEYS)
"
    move_past_right          type  = WRAP_ADJACENT_NEXT
    move_past_left           type  = WRAP_ADJACENT_NEXT
    move_past_top            type  = wrap_same_next
    move_past_bottom         type  = wrap_same_next
"
"   CURSOR BEHAVIOR (CHARACTER KEYS)
"
    char_past_right          type  = WRAP_ADJACENT_NEXT
    char_past_left           type  = WRAP_ADJACENT_NEXT
    char_past_last_position  type  = WRAP_ADJACENT_NEXT
"
"   TERMINAL ATTRIBUTES
"
    automatic_tabbing        value = TRUE
    clears_when_change_size  value = TRUE
    function_key_leaves_mark value = 1
    has_hidden               value = FALSE
    has_protect              value = TRUE
    home_at_top              value = TRUE
    multiple_sizes           value = TRUE
    tabs_to_home             value = FALSE
    tabs_to_tab_stops        value = FALSE
    tabs_to_unprotected      value = TRUE
    type_ahead               value = TRUE
"
"   SCREEN SIZES
"
    set_size       rows = 24 columns = 80    out = (ESC '`:' esc 'e(')
    set_size       rows = 43 columns = 80    out = (ESC '`:' esc 'e+')
    set_size       rows = 24 columns = 132   out = (ESC '`;' esc 'e(')
    set_size       rows = 43 columns = 132   out = (ESC '`;' esc 'e+')
"
"   SCREEN AND LINE MODE TRANSITIONS
"
    set_screen_mode     out = (wrap_on  autoscroll_off autopage_off)

    set_line_mode       out = (wrap_on  autoscroll_on)
"
"   TERMINAL CAPABILITIES
"
    backspace           in    = ()
"
    delete_char         inout = (ESC 'W')            label='Delete Character'
    delete_line_bol     inout = (ESC 'R')
    delete_line_stay    inout = ()
"
    erase_char          inout = ()
    erase_end_of_line   inout = (ESC 'T')
    erase_field_bof     inout = ()
    erase_field_stay    inout = ()
    erase_line_bol      inout = ()
    erase_line_stay     inout = ()
    erase_page_home     inout = (ESC '+')
    erase_page_stay     inout = ()
"
    insert_char         inout = (ESC 'Q')           label='Insert Character'
    insert_line_bol     inout = (ESC 'E')
    insert_line_stay    inout = ()
    insert_mode_begin   inout = (esc 'q')
    insert_mode_end     inout = (esc 'r')
"
    erase_unprotected   inout = (ESC ';')
    erase_end_of_page   inout = ()
    erase_end_of_field  inout = ()
"
    insert_mode_toggle  inout = ()
"
    tab_backward        inout = (ESC 'I')
    tab_clear           inout = (ESC '2')
    tab_clear_all       inout = (ESC '0')
    tab_forward         inout = (ht)
    tab_set             inout = (ESC '1')
"
"   MISCELLANEOUS TERMINAL SEQUENCES
"
    bell_nak            out = (BEL)
    bell_ack            out = ()
"
    display_begin       out = ()
    display_end         out = ()
    field_scroll_down   out = ()
    field_scroll_set    out = ()
    field_scroll_up     out = ()
    output_begin        out = (disable_protect)
    output_end          out = (enable_protect)
    print_begin         out = ()
    print_end           out = ()
    print_page          out = ()
    protect_all         out = (ESC ',')

    reset               out = ()
    return              out = ()
"
"   PROGRAMMABLE FUNCTION KEYS
"
    f1        in = (SOH '@')        label = 'f1'
    f2        in = (SOH 'A')        label = 'f2'
    f3        in = (SOH 'B')        label = 'f3'
    f4        in = (SOH 'C')        label = 'f4'
    f5        in = (SOH 'D')        label = 'f5'
    f6        in = (SOH 'E')        label = 'f6'
    f7        in = (SOH 'F')        label = 'f7'
    f8        in = (SOH 'G')        label = 'f8'
    f9        in = (SOH 'H')        label = 'f9'
    f10       in = (SOH 'I')        label = '10'
    f11       in = (SOH 'J')      " label = '11' "
    f12       in = (SOH 'K')      " label = '12' "
    f13       in = (SOH 'L')      " label = '13' "
    f14       in = (SOH 'M')      " label = '14' "
    f15       in = (SOH 'N')      " label = '15' "
    f16       in = (SOH 'O')      " label = '16' "
    f1_s      in = (SOH '`')        label = '  sf1'
    f2_s      in = (SOH 'a')        label = '  sf2'
    f3_s      in = (SOH 'b')        label = '  sf3'
    f4_s      in = (SOH 'c')        label = '  sf4'
    f5_s      in = (SOH 'd')        label = '  sf5'
    f6_s      in = (SOH 'e')        label = '  sf6'
    f7_s      in = (SOH 'f')        label = '  sf7'
    f8_s      in = (SOH 'g')        label = '  sf8'
    f9_s      in = (SOH 'h')        label = '  sf9'
    f10_s     in = (SOH 'i')        label = '  sf10'
    f11_s     in = (SOH 'j')      " label = '  11' "
    f12_s     in = (SOH 'k')      " label = '  12' "
    f13_s     in = (SOH 'l')      " label = '  13' "
    f14_s     in = (SOH 'm')      " label = '  14' "
    f15_s     in = (SOH 'n')      " label = '  15' "
    f16_s     in = (SOH 'o')      " label = '  16' "
"
"   CDC STANDARD FUNCTION KEYS
"
    next      in = 13        label = '  RETURN'
    bkw       in = (SOH '@')        label = 'f1'
    fwd       in = (SOH 'A')        label = 'f2'
    back      in = (SOH 'B')        label = 'f3'
    help      in = (SOH 'C')        label = 'f4'
    undo      in = (SOH 'D')        label = 'f5'
    stop      in = (SOH 'E')        label = 'f6'
    bkw_s     in = (SOH '`')        label = '  sf1'
    fwd_s     in = (SOH 'a')        label = '  sf2'
    undo_s    in = (SOH 'd')        label = '  sf5'
    stop_s    in = (SOH 'e')        label = '  sf6'
"
"   TERMINAL VIDEO ATTRIBUTES
"
    alt_begin             out = (dim)      " instead of dim since protect=dim
    alt_end               out = (normal)
    low_intensity_begin   out = (dim)      " instead of dim since protect=dim
    low_intensity_end     out = (normal)
    high_intensity_begin  out = (reverse)
    high_intensity_end    out = (normal)
    blink_begin           out = (blink)
    blink_end             out = (normal)
    hidden_begin          out = ()
    hidden_end            out = ()
    inverse_begin         out = (reverse)
    inverse_end           out = (normal)
    protect_begin         out = (start_protect)
    protect_end           out = (stop_protect)
    underline_begin       out = (underline)
    underline_end         out = (normal)
"
"   LOGICAL ATTRIBUTE SPECIFICATIONS
"
    error_begin         out = (reverse)
    error_end           out = (normal)
    input_text_begin    out = (underline)
    input_text_end      out = (normal)
    italic_begin        out = (reverse)
    italic_end          out = (normal)
    message_begin       out = (reverse)
    message_end         out = (normal)
    output_text_begin   out = ()
    output_text_end     out = ()
    title_begin         out = ()
    title_end           out = ()
"
"   LINE DRAWING SPECIFICATION
"
    ld_fine_begin            out = (line_on)
    ld_fine_end              out = (line_off)
    ld_fine_horizontal       out = (graph ':')
    ld_fine_vertical         out = (graph '6')
    ld_fine_upper_left       out = (graph '2')
    ld_fine_upper_right      out = (graph '3')
    ld_fine_lower_left       out = (graph '1')
    ld_fine_lower_right      out = (graph '5')
    ld_fine_up_t             out = (up_t)
    ld_fine_down_t           out = (down_t)
    ld_fine_left_t           out = (left_t)
    ld_fine_right_t          out = (right_t)
    ld_fine_cross            out = (cross)
"
    ld_medium_begin          out = (line_on)
    ld_medium_end            out = (line_off)
    ld_medium_horizontal       out = (graph '<')
    ld_medium_vertical         out = (graph '>')
    ld_medium_upper_left       out = (graph '2')
    ld_medium_upper_right      out = (graph '3')
    ld_medium_lower_left       out = (graph '1')
    ld_medium_lower_right      out = (graph '5')
    ld_medium_up_t             out = (up_t)
    ld_medium_down_t           out = (down_t)
    ld_medium_left_t           out = (left_t)
    ld_medium_right_t          out = (right_t)
    ld_medium_cross            out = (cross)
"
    ld_bold_begin            out = (line_on)
    ld_bold_end              out = (line_off)
    ld_bold_horizontal       out = (bold_box)
    ld_bold_vertical         out = (bold_box)
    ld_bold_upper_left       out = (bold_box)
    ld_bold_upper_right      out = (bold_box)
    ld_bold_lower_left       out = (bold_box)
    ld_bold_lower_right      out = (bold_box)
    ld_bold_up_t             out = (bold_box)
    ld_bold_down_t           out = (bold_box)
    ld_bold_left_t           out = (bold_box)
    ld_bold_right_t          out = (bold_box)
    ld_bold_cross            out = (bold_box)

"   END OF TERMINAL DEFINITION FILE FOR WYSE 60 TERMINAL               "
