
"   TERMINAL DEFINITION FILE FOR ZENITH Z29 TERMINAL                          "

" Note that this definition assumes certain hardware modes will be established "
" when setting line mode at the end of a screen mode task.  The assumptions    "
" are to configure the keypad for numeric unshifted usage, to allow automatic  "
" wraparound at end of line, and to disable the 'hold screen' capability.      "
" users may prefer different settings: modify the 'set_line_mode' statement to "
" do so.  Earlier versions of this definition used the hardware reset, but had "
" the side-effect of causing some types of modems to disconnect; thus the      "
" set of specific modes.                                                       "

"   VARIABLES                                                                 "

prefix              = (esc '[')
clear_all_tabs      = (prefix '3g')
normal_attributes   = (prefix 'm')
end_ins_mode        = (prefix '4l')
start_inverse       = (prefix '7m')
stop_inverse        = normal_attributes
start_underline     = (prefix '4m')
stop_underline      = normal_attributes
start_alternate     = (prefix 31(16) 6D(16))
stop_alternate      = normal_attributes
start_dim           = (prefix '2m')
stop_dim            = normal_attributes
start_hold_screen   = (prefix '>3h')
stop_hold_screen    = (prefix '>3l')
start_block_cursor  = (prefix '>4h')
stop_block_cursor   = (prefix '>4l')
start_keypad_shift  = (prefix '>6h')
stop_keypad_shift   = (prefix '>6l')
start_keypad_alt    = (prefix '>7h')
stop_keypad_alt     = (prefix '>7l')
use_ansi_mode       = (ESC '<')
discard_at_eol      = (prefix '?7l')
wraparound_at_eol   = (prefix '?7h')


"   MODEL NAME AND COMMUNICATION TYPE                                         "
model_name          value = 'OLD_Z29'
communications      type  = asynch

"   END OF INFORMATION SPECIFICATION                                          "
end_of_information  in    = (0)

"   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   = (prefix)
cursor_pos_second        out   = (';')
cursor_pos_third         out   = ('H')

"   CURSOR MOVEMENT INFORMATION                                               "
cursor_home              inout = (prefix 'H')    label='HOME'
cursor_up                inout = (prefix 'A')
cursor_down              inout = (prefix 'B')
cursor_left              inout = (prefix 'D')
cursor_right             inout = (prefix 'C')

"   CURSOR BEHAVIOR (for cursor movement keys)                                "
move_past_right          type  = stop_next
move_past_left           type  = stop_next
move_past_top            type  = stop_next
move_past_bottom         type  = stop_next

"   CURSOR BEHAVIOR (for character keys)                                      "
char_past_right          type  = stop_next
char_past_left           type  = stop_next
char_past_last_position  type  = stop_next

"   TERMINAL ATTRIBUTES                                                       "
clears_when_change_size  value = FALSE
function_key_leaves_mark value = 1
has_hidden               value = FALSE
has_protect              value = FALSE
home_at_top              value = TRUE
multiple_sizes           value = FALSE
tabs_to_home             value = FALSE
tabs_to_tab_stops        value = TRUE
tabs_to_unprotected      value = FALSE

"   SCREEN SIZES                                                              "
set_size       rows = 24 columns = 80

"   SCREEN AND LINE MODE TRANSITION                                           "
set_screen_mode     out = (use_ansi_mode  start_block_cursor ..
 start_keypad_shift  start_keypad_alt  stop_hold_screen ..
 discard_at_eol)

set_line_mode       out = (stop_keypad_shift  stop_keypad_alt ..
 wraparound_at_eol stop_hold_screen)

"   TERMINAL CAPABILITIES                                                     "
backspace           in    = (08(16))
delete_char         inout = (prefix 'P')     label='DC'
delete_line_bol     inout = (prefix 'M')     label='DL'
erase_end_of_line   inout = (prefix '0K')
erase_end_of_page   inout = (prefix 'J')
erase_page_home     inout = (prefix '2J')    label='ERASE'
insert_char         inout = (prefix '@')
insert_line_bol     inout = (prefix 'L')     label='IL'
insert_mode_begin   inout = (prefix '4h')    label='IMB'
insert_mode_end     inout = (prefix '4l')
tab_backward        inout = (prefix 'Z')
tab_forward         inout = (09(16))
tab_clear_all       inout = (clear_all_tabs)
tab_set             inout = (esc 'H')

"   MISCELLANEOUS TERMINAL SEQUENCES                                          "
output_begin        out = ()
bell_nak            out = (bel)

"   PROGRAMMABLE FUNCTION KEY INPUT INFORMATION                               "
f1        in = (esc 'OS')     label='f1'
f2        in = (esc 'OT')     label='f2'
f3        in = (esc 'OU')     label='f3'
f4        in = (esc 'OV')     label='f4'
f5        in = (esc 'OW')     label='f5'
f6        in = (esc 'OP')     label='f6'
f7        in = (esc 'OQ')     label='f7'
f8        in = (esc 'OR')     label='f8'
f9        in = (esc 'OX')     label='f9'
f10       in = ()
f11       in = ()
f12       in = ()
f13       in = ()
f14       in = ()
f15       in = ()
f16       in = ()
f1_s      in = (esc 'Oq')     label='s1'
f2_s      in = (esc 'Or')     label='s2'
f3_s      in = (esc 'Os')     label='s3'
f4_s      in = (esc 'Ot')     label='s4'
f5_s      in = (esc 'Ou')     label='s5'
f6_s      in = (esc 'Ov')     label='s6'
f7_s      in = (esc 'Ow')     label='s7'
f8_s      in = (esc 'Ox')     label='s8'
f9_s      in = (esc 'Oy')     label='s9'
f10_s     in = (esc 'Op')     label='k0'
f11_s     in = (esc 'On')     label='k.'
f12_s     in = (esc 'OM')     label='ke'
f13_s     in = (esc 'Ol')     label='k,'
f14_s     in = (esc 'Om')     label='k-'
f15_s     in = ()
f16_s     in = ()

"   CDC STANDARD FUNCTION KEY INPUT INFORMATION                               "
next      in = 13               label='RETURN'
bkw       in = (esc 'OS')     label='F1'
fwd       in = (esc 'OT')     label='F2'
back      in = (esc 'OU')     label='F3'
undo      in = (esc 'OW')     label='F5'
stop      in = (esc 'OP')     label='F6'
bkw_s     in = (esc 'Oq')     label='  SF1'
fwd_s     in = (esc 'Or')     label='  SF2'
undo_s    in = (esc 'Ou')     label='  SF5'
stop_s    in = (esc 'Ov')     label='  SF6'
help      in = (prefix '~')     label='HELP'
down      in = ()
down_s    in = ()
up        in = ()
up_s      in = ()
edit      in = ()
edit_s    in = ()
data      in = ()
data_s    in = ()

"   TERMINAL VIDEO ATTRIBUTES                                                 "
alt_begin           out = (start_alternate)
alt_end             out = (stop_alternate)
blink_begin         out = (prefix '5m')
blink_end           out = normal_attributes
inverse_begin       out = (start_inverse)
inverse_end         out = (stop_inverse)
underline_begin     out = (start_underline)
underline_end       out = (stop_underline)

"   LOGICAL ATTRIBUTE SPECIFICATIONS                                          "
error_begin         out = (start_inverse)
error_end           out = (stop_inverse)
input_text_begin    out = (start_underline)
input_text_end      out = (stop_underline)
italic_begin        out = (start_inverse)
italic_end          out = (stop_inverse)

"   LINE DRAWING CHARACTER SPECIFICATION                                      "
ld_fine_begin            out = (prefix '10m')
ld_fine_end              out = (prefix '11m')
ld_fine_horizontal       out = 61(16)
ld_fine_vertical         out = 60(16)
ld_fine_upper_left       out = 66(16)
ld_fine_upper_right      out = 63(16)
ld_fine_lower_left       out = 65(16)
ld_fine_lower_right      out = 64(16)
ld_fine_up_t             out = 73(16)
ld_fine_down_t           out = 75(16)
ld_fine_left_t           out = 76(16)
ld_fine_right_t          out = 74(16)
ld_fine_cross            out = 62(16)
ld_medium_begin          out = (prefix '10m')
ld_medium_end            out = (prefix '11m')
ld_medium_horizontal     out = 61(16)
ld_medium_vertical       out = 60(16)
ld_medium_upper_left     out = 66(16)
ld_medium_upper_right    out = 63(16)
ld_medium_lower_left     out = 65(16)
ld_medium_lower_right    out = 64(16)
ld_medium_up_t           out = 73(16)
ld_medium_down_t         out = 75(16)
ld_medium_left_t         out = 76(16)
ld_medium_right_t        out = 74(16)
ld_medium_cross          out = 62(16)
ld_bold_begin            out = (start_inverse)
ld_bold_end              out = (stop_inverse)
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                        "

application_string name=('FSE_FUNCTION_1') out=('align_screen top=last_screen')
application_string name=('FSE_FUNCTION_2') out=('align_screen bottom=first_screen')
application_string name=('FSE_FUNCTION_3') out=('align_screen top=current')
application_string name=('FSE_FUNCTION_4') out=('align_screen bottom=current')
application_string name=('FSE_FUNCTION_5') out=('align_screen middle=current')
application_string name=('FSE_FUNCTION_6') out=('undo')
application_string name=('FSE_FUNCTION_7') out=('end')
application_string name=('FSE_FUNCTION_8') out=('align_screen top=first')
application_string name=('FSE_FUNCTION_9') out=('write_file')

application_string name=('FSE_FUNCTION_1_LABEL') out=(' fwd  ')
application_string name=('FSE_FUNCTION_2_LABEL') out=(' bkw  ')
application_string name=('FSE_FUNCTION_3_LABEL') out=('lineup')
application_string name=('FSE_FUNCTION_4_LABEL') out=('linedn')
application_string name=('FSE_FUNCTION_5_LABEL') out=('middle')
application_string name=('FSE_FUNCTION_6_LABEL') out=(' undo ')
application_string name=('FSE_FUNCTION_7_LABEL') out=(' quit ')
application_string name=('FSE_FUNCTION_8_LABEL') out=(' top  ')
application_string name=('FSE_FUNCTION_9_LABEL') out=(' wrif ')

application_string name=('FSE_FUNCTION_SHIFT_1') out=('mark_lines')
application_string name=('FSE_FUNCTION_SHIFT_2') out=('mark_characters')
application_string name=('FSE_FUNCTION_SHIFT_3') out=('unmark')
application_string name=('FSE_FUNCTION_SHIFT_4') out=('copy_text l=m p=b')
application_string name=('FSE_FUNCTION_SHIFT_5') out=('move_text l=m p=b; unmark')
application_string name=('FSE_FUNCTION_SHIFT_6') out=('position_cursor l=c c=$strlen($lt)+1')
application_string name=('FSE_FUNCTION_SHIFT_7') out=('align_screen offset=0')
application_string name=('FSE_FUNCTION_SHIFT_8') out=('esv$off=30; if $current_column<>1 then; esv$off=$current_column-1; ifend; align_screen offset=esv$off; position_cursor l=c c=$current_column+30')
application_string name=('FSE_FUNCTION_SHIFT_9') out=('align_screen middle=last')
application_string name=('FSE_FUNCTION_SHIFT_10') out=('position_cursor; position_cursor rs=true; ')
application_string name=('FSE_FUNCTION_SHIFT_11') out=('esv$text=$screen_input(''Enter search string''); if esv$text='''' then; esv$text=$text; ifend; locate_text rs=true l=a v=true t=esv$text')
application_string name=('FSE_FUNCTION_SHIFT_12') out=('locate_text t=$screen_input(''Enter search string'')')
application_string name=('FSE_FUNCTION_SHIFT_13') out=('join_text')
application_string name=('FSE_FUNCTION_SHIFT_14') out=('break_text')

application_string name=('FSE_FUNCTION_SHIFT_1_LABEL') out=(' MARK ')
application_string name=('FSE_FUNCTION_SHIFT_2_LABEL') out=('MRKCHR')
application_string name=('FSE_FUNCTION_SHIFT_3_LABEL') out=('UNMARK')
application_string name=('FSE_FUNCTION_SHIFT_4_LABEL') out=(' COPY ')
application_string name=('FSE_FUNCTION_SHIFT_5_LABEL') out=(' MOVE ')
application_string name=('FSE_FUNCTION_SHIFT_6_LABEL') out=('ENDLIN')
application_string name=('FSE_FUNCTION_SHIFT_7_LABEL') out=(' LEFT ')
application_string name=('FSE_FUNCTION_SHIFT_8_LABEL') out=(' RIGHT')
application_string name=('FSE_FUNCTION_SHIFT_9_LABEL') out=('BOTTOM')
application_string name=('FSE_FUNCTION_SHIFT_10_LABEL') out=('LOCNXT')
application_string name=('FSE_FUNCTION_SHIFT_11_LABEL') out=('LOCALL')
application_string name=('FSE_FUNCTION_SHIFT_12_LABEL') out=('LOCATE')
application_string name=('FSE_FUNCTION_SHIFT_13_LABEL') out=(' JOIN ')
application_string name=('FSE_FUNCTION_SHIFT_14_LABEL') out=(' BREAK')

"   KEY REDEFINITIONS FOR THE FULL SCREEN EDITOR WHEN USED FROM THE PROGRAMMING ENVIRONMENT "

application_string name=('pe_fix_allerr_func') out=('key=8 shift=false')
application_string name=('pe_fix_assist_func') out=('key=9 shift=true')
application_string name=('pe_fix_format_func') out=('key=6 shift=true')
application_string name=('pe_fix_lookup_func') out=('key=9 shift=false')
application_string name=('pe_fix_nxterr_func') out=('key=13 shift=true')
application_string name=('pe_fix_nxtler_func') out=('key=14 shift=true')
application_string name=('pe_fix_run_func')    out=('key=7 shift=true')
application_string name=('pe_fix_rundbg_func') out=('key=8 shift=true')

application_string name=('pe_fixl_assist_func') out=('key=9 shift=true')
application_string name=('pe_fixl_format_func') out=('key=6 shift=true')
application_string name=('pe_fixl_lookup_func') out=('key=9 shift=false')
application_string name=('pe_fixl_nxterr_func') out=('key=13 shift=true')
application_string name=('pe_fixl_run_func')    out=('key=7 shift=true')
application_string name=('pe_fixl_rundbg_func') out=('key=8 shift=true')

application_string name=('pe_template_modify_format_func') out=('key=6 shift=true')
application_string name=('pe_template_modify_lookup_func') out=('key=9 shift=false')

application_string name=('pe_modify_create_format_func') out=('key=6 shift=true')
application_string name=('pe_modify_create_lookup_func') out=('key=9 shift=false')
application_string name=('pe_modify_create_run_func')    out=('key=7 shift=true')
application_string name=('pe_modify_create_rundbg_func') out=('key=8 shift=true')

application_string name=('pe_view_end_func')    out=('key=7 shift=false')
application_string name=('pe_view_export_func') out=('key=6 shift=true')
application_string name=('pe_view_print_func')  out=('key=9 shift=false')

"   END OF TERMINAL DEFINITION FILE FOR ZENITH Z29 TERMINAL                   "
