"   TERMINAL DEFINITION FILE FOR THE IBM 3270 TERMINAL                        "

" Note:  this definition is identical to IBM_3270 except for:

" the addition of the application string statement to invoke a special device
"   driver

" the removal of the fake key definitions for insert and delete characters

" the usage of blank padding instead of null padding in erase EOL

" For the user, the net effect is that this definition allows applications to
"   define input fields all the way into column 80 and spanning multiple rows.
"   However, the user cannot use the hard-editing key for character insertion,
"   and usage of the hard-editing key for character deletion will cause the
"   serious side-effect of wrapping and snaking text from the left hand columns
"   of lower rows up to the right hand columns of upper rows.  Edit_File will
"   instead offer function keys to simulate character inserts and deletes.

"   VARIABLES                                                                 "
    ERASE_UNPROT_TO_ADDRESS  = (12(16))
    GRAPHIC_ESCAPE           = (00(16))
    INSERT_CURSOR            = (13(16))
    MODIFY_FIELD             = (00(16))
    PROGRAM_TAB              = (09(16))
    REPEAT_TO_ADDRESS        = (14(16))
    SET_ATTRIBUTE            = (00(16))
    SET_BUFFER_ADDRESS       = (11(16))
    START_FIELD              = (1D(16))
    START_FIELD_EXTENDED     = (00(16))
    NULL                     = (00(16))

    FIRST_ROW                = (20(16))
    FIRST_COLUMN             = (20(16))
    CURRENT_ROW              = (7E(16))
    CURRENT_COLUMN           = (7E(16))
    MAXIMUM_ROW              = (7F(16))
    MAXIMUM_COLUMN           = (7F(16))

    HOME                     = (FIRST_ROW    FIRST_COLUMN)
    START_OF_ROW             = (CURRENT_ROW  FIRST_COLUMN)
    END_OF_ROW               = (CURRENT_ROW  MAXIMUM_COLUMN)
    END_OF_PAGE              = (MAXIMUM_ROW  MAXIMUM_COLUMN)
    CURRENT_POSITION         = (CURRENT_ROW  CURRENT_COLUMN)

"   VARIABLES FOR FULL SCREEN EDITOR FUNCTION KEY DEFINITIONS                 "

    model_name               value = 'ibm_3270_full_width_input'
    application_string name=('driver_procedure') out=('tup$boot_3270_full_width_input')
    communications           type  = asynch
    end_of_information       in    = (0)
    cursor_pos_encoding      bias  = (0)    type = IBM3270_cursor
    cursor_pos_begin         in    = (set_buffer_address)
    cursor_pos_begin         out   = (set_buffer_address current_position)

"   CURSOR BEHAVIOR (for cursor 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 (for 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
    "block_mode               value = TRUE
    clears_when_change_size  value = FALSE
    function_key_leaves_mark value = 0
    has_hidden               value = TRUE
    has_protect              value = TRUE
    home_at_top              value = TRUE
    multiple_sizes           value = FALSE
    tabs_to_home             value = FALSE
    tabs_to_tab_stops        value = FALSE
    tabs_to_unprotected      value = FALSE
    type_ahead               value = FALSE

"   SCREEN SIZES                                                              "
    set_size       rows = 24 columns = 80


"   SCREEN AND LINE MODE TRANSITION                                           "

"   TERMINAL CAPABILITIES                                                     "
    erase_end_of_line   out   = (repeat_to_address end_of_row ' ' )
    erase_page_home     in    = (5F(16))               label='x'
    erase_page_home     out   = (set_buffer_address home repeat_to_address home ' ' )

"   MISCELLANEOUS TERMINAL SEQUENCES                                          "
    output_begin        out = (31(16) 43(16) set_buffer_address home)
    output_end          out = (insert_cursor)

"   PROGRAMMABLE FUNCTION KEY INPUT INFORMATION                               "

    f1        in = (31(16)) label = 'F1'
    f2        in = (32(16)) label = 'F2'
    f3        in = (33(16)) label = 'F3'
    f4        in = (34(16)) label = 'F4'
    f5        in = (35(16)) label = 'F5'
    f6        in = (36(16)) label = 'F6'
    f7        in = (37(16)) label = 'F7'
    f8        in = (38(16)) label = 'F8'
    f9        in = (39(16)) label = 'F9'
    f10       in = (3a(16)) label = '10'
    f11       in = (23(16)) label = '11'
    f12       in = (40(16)) label = '12'
    f1_s      in = (41(16)) label = '13'
    f2_s      in = (42(16)) label = '14'
    f3_s      in = (43(16)) label = '15'
    f4_s      in = (44(16)) label = '16'
    f5_s      in = (45(16)) label = '17'
    f6_s      in = (46(16)) label = '18'
    f7_s      in = (47(16)) label = '19'
    f8_s      in = (48(16)) label = '20'
    f9_s      in = (49(16)) label = '21'
    f10_s     in = (5B(16)) label = '22'
    f11_s     in = (2E(16)) label = '23'
    f12_s     in = (3C(16)) label = '24'

"   CDC STANDARD FUNCTION KEY INPUT INFORMATION                               "
    next      in = (27(16)) label = 'NEXT'
    next_s    in = (3E(16)) label = 's-NEXT'
    bkw       in = (31(16)) label = 'F1'
    fwd       in = (32(16)) label = 'F2'
    back      in = (33(16)) label = 'F3'
    help      in = (34(16)) label = 'F4'
    undo      in = (35(16)) label = 'F5'
    stop      in = (36(16)) label = 'F6'
    bkw_s     in = (41(16)) label = '13'
    fwd_s     in = (42(16)) label = '14'
    undo_s    in = (45(16)) label = '17'
    stop_s    in = (46(16)) label = '18'

"   TERMINAL VIDEO ATTRIBUTES                                                 "
alt_begin           out = (start_field)
blink_begin         out = (start_field)
hidden_begin        out = (start_field)
inverse_begin       out = (start_field)
protect_begin       out = (start_field)
underline_begin     out = (start_field)
low_intensity_begin  out = (start_field)
high_intensity_begin out = (start_field)

"   LOGICAL ATTRIBUTE SPECIFICATIONS                                          "
    error_begin         out = (start_field 38(16))
    input_text_begin    out = (start_field 20(16))
    italic_begin        out = (start_field 38(16))
    message_begin       out = (start_field 38(16))
    output_text_begin   out = (start_field 34(16))
    title_begin         out = (start_field 34(16))

"   LINE DRAWING CHARACTER SPECIFICATION                                      "
    ld_fine_begin            out = (null)
    ld_fine_end              out = (null)
    ld_fine_horizontal       out = ('-')
    ld_fine_vertical         out = ('|')
    ld_fine_upper_left       out = ('*')
    ld_fine_upper_right      out = ('*')
    ld_fine_lower_left       out = ('*')
    ld_fine_lower_right      out = ('*')
    ld_fine_up_t             out = ('*')
    ld_fine_down_t           out = ('*')
    ld_fine_left_t           out = ('*')
    ld_fine_right_t          out = ('*')
    ld_fine_cross            out = ('+')
    ld_medium_begin          out = (null)
    ld_medium_end            out = (null)
    ld_medium_horizontal     out = ('-')
    ld_medium_vertical       out = ('|')
    ld_medium_upper_left     out = ('*')
    ld_medium_upper_right    out = ('*')
    ld_medium_lower_left     out = ('*')
    ld_medium_lower_right    out = ('*')
    ld_medium_up_t           out = ('*')
    ld_medium_down_t         out = ('*')
    ld_medium_left_t         out = ('*')
    ld_medium_right_t        out = ('*')
    ld_medium_cross          out = ('+')
    ld_bold_begin            out = (null)
    ld_bold_end              out = (null)
    ld_bold_horizontal       out = ('-')
    ld_bold_vertical         out = ('|')
    ld_bold_upper_left       out = ('*')
    ld_bold_upper_right      out = ('*')
    ld_bold_lower_left       out = ('*')
    ld_bold_lower_right      out = ('*')
    ld_bold_up_t             out = ('*')
    ld_bold_down_t           out = ('*')
    ld_bold_left_t           out = ('*')
    ld_bold_right_t          out = ('*')
    ld_bold_cross            out = ('+')

"   DEFAULT KEY DEFINITIONS FOR THE FULL SCREEN EDITOR                        "

"   END OF TERMINAL DEFINITION FILE FOR THE IBM 3270 TERMINAL                 "

