home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / ASM / ALIB30B / COMMON.INC next >
Text File  |  1994-12-01  |  4KB  |  101 lines

  1. ;****************************** common.inc **********************************
  2. ;
  3. ;-------------------- error_handler equates ---------------------------
  4. ;
  5. fatal_error    equ    80h    ;after display abort and exit
  6. non_fatal1    equ    40h    ;return if retry requested
  7. non_fatal2    equ    20h    ;return after any key press
  8. fatal_return    equ    10h    ;display then return after any key
  9. disk_msg    equ    08h    ;messages are stored in disk file
  10. dos_display    equ    04h    ;use dos to display error info
  11. error_text    equ    02h    ;display text at ds:bp
  12. error_value    equ    01h    ;display number in -bp-
  13. ;
  14. ; LIBRARY_SETUP returns a pointer to the following structure.
  15. ;
  16. info    struc
  17.  cpu_type    db    ?    ;0=88 1=186 2=286 3=386 4=486
  18.  math_chip    db    ?    ;0=none 1=8087 2=287 3=387 4=487
  19.  mouse_present    db    ?    ;0=no n=yes
  20.  crt_type    db    ?    ;
  21.  crt_mode    db    ?
  22.  mono_flag    db    ?
  23.  ansi_present    db    ?    ;0=no 1=yes
  24.  users_color    db    ?
  25.  crt_seg    dw    ?    ;segment of crt buffer
  26.  crt_rows    db    ?    ;
  27.  crt_columns    db    ?    ;
  28.  key_type    db    ?    ;0=old style 1=enhanced
  29.  psp_seg    dw    ?    ;psp segment
  30. info    ends
  31. ; The following equates are inputs to the MESSAGE routine to contol its
  32. ; actions.  See flags in -BP-
  33. ;
  34. msg_save_win    equ    001h    ;save screen area before drawing box
  35. msg_restore_win    equ    002h    ;restore screen before exit
  36. msg_hyper    equ    004h    ;this is a hyper msg & key processing
  37. msg_yesno    equ    008h    ;this message needs yes/no response
  38. msg_anykey    equ    010h    ;this message waits for any key
  39. msg_nokey    equ    020h    ;this message does not pause for key
  40. msg_close    equ    040h    ;close message file before exit
  41. msg_open    equ    080h    ;open message file before attempting read
  42. ;           equ    100h    ;
  43. msg_disp    equ    200h    ;display the message
  44. msg_ram        equ    400h    ;message in memory (ds:si) rather than in file
  45. ;
  46. ;-------------------- mousekey (pulldown_menu) -------------------------
  47. ;
  48. ; this structures is part of following structure
  49. ;
  50. menu_entry    struc
  51.  e_count    db    ?        ;number of submenu items
  52.  e_sub_length    db    ?        ;width of submenu box if needed
  53.  e_hot_key    db    ?        ;assume extended key alt-??, 00=none
  54.  e_length    db    ?        ;length of text,not including 0 at end
  55.  e_text_ptr    dw    ?        ;ptr to text for this option
  56.  e_process    dw    ?        ;processing info, or sub struc ptr
  57.  e_column    db    ?        ;option column, for submenu use (main+1)
  58.  e_row        db    ?        ;row for this option,start submenu at +1
  59. menu_entry    ends
  60.  
  61. menu_def    struc
  62.  m_flag        db    ?        ;see below (set by pulldown_menu)
  63.  m_left_column    db    ?        ;starting column for menu bar
  64.  m_top_row    db    ?        ;top row of window (menu row)
  65.  m_rows        db    ?        ;total rows in window
  66.  m_columns    db    ?        ;total columns in window
  67.  m_options    db    ?        ;total # of main menu options
  68.  m_selected_main dw    ?        ;set by pulldown_menu (0=none selected)
  69.  m_selected_sub dw    ?        ;set by pulldown_menu (0=none selected)
  70. ; main headings descriptors (zero unused entries at end)
  71.  m_main01    db    size menu_entry dup (?)      ;see menu_entry structure
  72.  ;place additional main heading descriptions here, last one is null entry
  73.  ;place menu bar text here
  74.  ;place submenu structures here
  75.  ;place submenu text here, each string separated with a zero.
  76. menu_def    ends
  77. ;------------------------------------------------------------------------
  78. ; GET_STRING input flags
  79. ;
  80. gs_numbers    equ    01h    ;get numbers only
  81. gs_upper    equ    02h    ;get upper case characters
  82. gs_lower    equ    04h    ;get lower case characters
  83. gs_file        equ    08h    ;get filename characters only
  84. gs_init        equ    10h    ;initialize (do once per string entry)
  85. gs_key_wait    equ    20h    ;input keys till done or unknown key found
  86. gs_key_check    equ    40h    ;input key only if it is ready
  87. gs_close    equ    80h    ;remove cursor and deselect string 
  88.  
  89. ;-------------------------------- PULLDOWN DATA  -----------------------------
  90.  
  91. ; flag definitions for input to pulldown_menu
  92.  
  93. bar_save    equ    80h    ;save display data under bar
  94. bar_restore    equ    40h    ;restore display data under bar before exit
  95. bar_display    equ    20h    ;display the menu bar
  96. wait_valid_key    equ    10h    ;wait forever till valid key found
  97. return_bad_key    equ    08h    ;wait for key and return unknown keys
  98. no_mouse_sim    equ    04h    ;do not simulate mouse with arrow keys
  99. no_mouse_show    equ    02h    ;do not display mouse cursor
  100.