home *** CD-ROM | disk | FTP | other *** search
- ;--------------------------------------------------------------------------
- ;
- ; To access internal LAYOUT calls, the user MUST push bp before
- ; pushing the parameters required for the specific call. Then
- ; after the setup has been done for the call, BP is filled with the
- ; correct INT 0F4H equate and an int 0F4H is executed.
- ;
- ; Using the _BBX_ICALL macro with the name of the equate, without the
- ; leading underscore (_) will produce calls within all the supported
- ; languages correctly.
- ;
- ; Example: Using the _ADD_CARD internal call (compiles in all 4 languages)
- ;
- ; PUSH BP ; store BP : accessing int 0F4H changes it
- ;
- ; LES DI,cardfile_handle
- ; push es
- ; push di ; push cardfile handle on to stack to pass
- ;
- ; LES DI,cardfile_status
- ; push es
- ; push di ; push cardfile status variable to pass
- ;
- ; _BBX_ICALL ADD_CARD, 8
- ;
- ; ; this will call add_card in all 4 languages and restore the
- ; ; stack properly
- ;
- ; POP BP
- ;
- ;------------------------- INT 0F4H EQUATES -------------------
-
- ; these values are passed in bp when int 0F4H is called
-
- _DPADD equ 0
- _DPMUL equ 1
- _DPDIV equ 2
- _DFLOAT equ 3
- _DINT equ 4
- _DBINASC equ 5
- _DASCBIN equ 6
-
- _ADVANCE_REL_ORIG equ 7
- _RESTORE_REL_ORIG equ 8
-
- _GET_BYTE_PARAMS equ 9
- _GET_BIT_PARAMS equ 10
-
- _INIT_BUFFER equ 11
- _INIT_MEM_BUFFER equ 12
- _INIT_FILE_BUFFER equ 13
-
- _DEINIT_BUFFER equ 14
-
- _DISPLAY_CARD equ 15
- _EDIT_CARD equ 16
-
- _GET_MENU_INPUT equ 17
- _GET_GENERAL_INPUT equ 18
- _GET_CARD_INPUT equ 19
- _DO_DISPLAY_CARD equ 20
-
- _GET_IMAGE equ 21
- _DISPLAY_IMAGE equ 22
- _DISPLAY_VARIABLE equ 23
-
- _DO_HELP_BOX equ 24
- _SETUP_HELP equ 25
- _SET_HELP_PAGE equ 26
-
- _ALLOCATE_VARIABLE equ 27
- _SET_LIST_SIZE equ 28
- _GET_CURRENT_ITEM equ 29
- _INSERT_LIST_ITEM equ 30
- _DELETE_LIST_ITEM equ 31
-
- _OPEN_CARD_FILE equ 32
- _CLOSE_CARD_FILE equ 33
- _GET_CARDFILE_INFO equ 34
- _MOVE_FILE_PTR equ 35
-
- _ADD_CARD equ 36
- _CLEAR_CARD equ 37
- _DELETE_CARD equ 38
- _GET_CURRENT_CARD equ 39
- _REPLACE_CARD equ 40
-
- _GET_CARD_ID equ 41
- _GET_CARD_LINK equ 42
- _SET_CARD_LINK equ 43
- _GET_CHOSEN_LINK equ 44
-
- _PRINT_CRLF equ 45
- _PRINT_PAGE equ 46
- _PRINT_TEXT equ 47
- _PRINT_VARIABLE equ 48
-
- _EVALUATE_CONDITION equ 49
- _EVALUATE_ASSIGNMENT equ 50
-
- _RESET_PROGRAM equ 51
-
- _PRINT_CARD equ 52
- _DO_PRINT_CARD equ 53
-
- _LOAD_AND_RUN_BBX equ 54
-
- _INTERNAL_DBOX_ON equ 55
- _INTERNAL_DBOX_OFF equ 56
-
- _INTERNAL_LOAD_BOX equ 57
- _INTERNAL_SAVE_BOX equ 58
-
- _GET_CARD_TABLE_SIZE equ 59
- _CARD_CHECK_HANDLE equ 60
- _CARDFILE_READ equ 61
- _CARDFILE_WRITE equ 62
- _CARD_INSERT equ 63
- _CARD_DELETE equ 64
-
- _GET_LIST_INDEX equ 65
-
- _ADD_CARD_IMAGE equ 66
- _GET_ERROR_REFRESH equ 67
- _GET_PROGRAM_PSP equ 68
-
-
-
- ; ---------------------------------------------------------------------------
- ; the following is not a call within itself, but it causes int 0F4H to set
- ; the ds segment to the interrupt's near data segment before executing the
- ; call. This is to be used if the _BBX_ICALL macro is bypassed.
- ; ---------------------------------------------------------------------------
-
- _SET_DS_DATA_FLAG equ 8000H
-
-
- ; ---------------------------------------------------------------------------
- ;
- ; The following are the internal values used to indicate the type of variable
- ; in the variable segment of a flowchart.
- ;
- ; ---------------------------------------------------------------------------
-
- prop_name_type equ 1
- icon_name_type equ 2
- image_name_type equ 3
-
- var_level2 equ image_name_type ; all level2 vars are data in
- ; other segments
- dword_name_type equ 4
- integer_name_type equ 5
- float_name_type equ 6
- string_name_type equ 7
- char_name_type equ 8
- handle_name_type equ 9 ; if the number of varname variables is
- ; >= link_field_type, change add_set_link
- card_id_name_type equ 10
-
- var_level3 equ card_id_name_type ; all level3 vars are simple vars
- ; that can be created
- check_name_type equ 11
- link_field_type equ 12
- input_name_type equ 13
- exit_field_type equ input_name_type ; used by cards
-
-
- var_level4 equ exit_field_type ; all level4 vars are check or
- ; link or exit variables
- list_name_type equ 14
- card_var_name_type equ 15
-
-
- var_level5 equ card_var_name_type ; all level5 vars are separately
- ; typed and refer to other addresses
-
- card_name_type equ 16
-
-
- input_var_type_type equ 1
- input_var_type_data equ 2
- input_var_type_card equ 10
-
- ; 0 - cancel or no action
- ; 1 - object chosen
- ; 2 - menu option
- ; 3 - keystroke
- ; 4 - unknown or other
-
- object_cancel_value equ 0
- object_object_chosen equ 1
- object_menu_chosen equ 2
- object_keystroke_value equ 3
- object_unknown_value equ 4
-
-
- card_var_type_type equ 1
- card_var_type_flags equ 2
- card_var_type_off equ 3
- card_var_type_card equ 5
- card_var_type_length equ 9 ; length of entire card variable
-
- list_var_type_type equ 1
- list_var_type_flags equ 2
- list_var_type_size equ 3
- list_var_type_off equ 5
- list_var_type_seg equ 7
-
- check_var_type_flags equ 1
- check_var_type_addr equ 2
- check_var_type_inum equ 2 ; internal check's number
- check_var_type_bnum equ 5 ; blackbox check's number
-
- check_var_type_data equ 6
-
- check_var_data_length equ 32 ; data length
-
- check_var_multiple equ 1 ; value for multiple fields
- check_var_internal equ 2 ; value for internal check fields
- check_var_bbx equ 4 ; value for blackbox check fields
-
-
- input_cancel_action equ 0
- input_object_action equ 1
- input_menu_action equ 2
- input_keyboard_action equ 3
- input_other_action equ 4
-
-
- ; ---------------------------------------------------------------------------
- ;
- ; The following are the equates used when drawing icons on the screen or
- ; working with proportional text data
- ;
- ; ---------------------------------------------------------------------------
-
-
- empty_box_icon equ 100H + 88 ; used w/ DRAW_ICON for an empty check
- check_box_icon equ 100H + 86 ; used w/ DRAW_ICON for an checked box
-
- prop_text_font_ht equ 19 ; location within a proportional font
- ; maximum height of that font
-
-
- ; ---------------------------------------------------------------------------
- ;
- ; The following are the error codes already built into layout programs.
- ; These can be used with DO_ERROR_FAR
- ;
- ; ---------------------------------------------------------------------------
-
-
- bad_clipboard_code equ 1
- bad_help_file_code equ 2
- file_protected_code equ 3
- disk_error_code equ 4
- disk_full_code equ 5
- invalid_password_code equ 6
- need_master_code equ 7
- not_pct_code equ 8
- no_transfer_image_code equ 9
- no_old_images_code equ 10
- link_broken_code equ 11
- not_enough_mem_code equ 12
- cant_load_crd_code equ 13
- system_error_code equ 14
-
- ifdef basic
- no_basic_img_code equ 15
- endif
-
- no_printer_code equ disk_error_code
-
-
- ;-------------------- Black Box Header Structure Equates -----------------
-
-
- bbx_name_length equ 25
-
- bbx_recognition equ 0 ; 'B',8,4,6
- bbx_file_length equ 4
- bbx_dir_num equ 8
-
- bbx_file_init_data_length equ 10
-
-
- bbx_length equ 0 ; length of entire header
- bbx_ip equ 2 ; ip and cs within bbx to jump to
- bbx_cs equ 4
- bbx_cs_ip equ 6 ; actual relocated cs_ip after it's loaded
- bbx_used equ 10 ; # of times this blackbox is used
- bbx_fname equ 12 ; file name (without .BBX extension)
- bbx_name equ 21 ; element name
- bbx_icon equ 46 ; icon data
-
- bbx_flags equ 270 ; flags for this bbx
- bbx_num_checks equ 271 ; # of check box types here
- bbx_check_ptr equ 272 ; pointer to check type declarations
- bbx_message_ptr equ 274 ; pointer to strings for this type
-
- bbx_help_page equ 276
- bbx_help_name equ 278
-
- bbx_param_len equ 286 ; parameter length
-
- bbx_param_flags equ 288 ; flags for those parameters
- bbx_param_num equ 289 ; # of parameters
- bbx_param_lst equ 290 ; list follows in internal parameter form
-
- ; the parameter list must be terminated in a -1
- ; it MUST contain a comment parameter, which is not passed
- ; following the parameters come the check types and then messages
- ; the whole thing MUST be divisible by 8
-
- bbx_subdir_num equ 273
- bbx_subdir_address equ 275
-
-
- bbx_memory_based equ 1
- bbx_disk_based equ 2
- bbx_layout_based equ 4
-
-
- ; ---------------------------------------------------------------------------
- ;
- ; The following is the structure of a list header
- ;
- ; ---------------------------------------------------------------------------
-
- pblock_top_off equ 0 ; offset w/in list data of top item on screen
- pblock_curr_off equ 2 ; offset of current item
- pblock_eof equ 4 ; offset of end of list
- pblock_total equ 6 ; total # of items w/in the list
- pblock_top_line equ 8 ; # of top item on screen
- pblock_curr_line equ 10 ; note that curr line starts from 0
- pblock_max equ 12 ; maximum items that list can hold
-
- ; bytes 14,15 are reserved
-
- pblock_length equ 16
-
-
- ; ---------------------------------------------------------------------------
- ;
- ; The following is the structure of a CardFile handle
- ;
- ; ---------------------------------------------------------------------------
-
- handle_off equ 0 ; DOS handle of .CRD File (0FFFFH if closed)
- thandle_off equ 2 ; DOS handle of temporary ~LW file
- current_ptr equ 4 ; current ptr within file of current card
- current_rec equ 8 ; current card number within file
- free_space equ 12 ; amount of free space within the file
- table_ptr equ 16 ; pointer to table at end of .CRD File
- total_recs equ 20 ; total # of cards within the file
- total_images equ 24 ; total # of images within the file
- hndl_reserved equ 28 ; reserved dword, must always be 0
- file_flags equ 32 ; file flags
- template_off equ 34 ; address of card template to read/write
- orig_temp_off equ 38 ; address of original card template
-
- tname_off equ 42 ; offset of temporary file name
-
-
- ; ----- Values for File Flags
-
- protected_file_flag equ 08000H ; protected to view only
- protect_add_only equ 0A000H ; protected to add+view only
- protect_change_only equ 0C000H ; protected to change+add+view only
- protect_all_only equ 0E000H ; protected with master password
-
- unknown_card_flag equ 1000H ; This file was opened using an
- ; unknown card
-
- ; all other bit values are reserved.
-
-
-
- ; ---------------------------------------------------------------------------
- ;
- ; The following are the values and data structures used to define parameters
- ; within FLOWCHRT.EXE and .BHD header files
- ;
- ; ---------------------------------------------------------------------------
-
- .comment_ptype equ 0 ; byte 0: .comment_ptype
- .comment_ptype_length equ 1
-
-
- .asciiz_ptype equ 1 ; byte 0: .asciiz_ptype
- ; byte 1: flags
- ; word 2: offset of param name
- ; word 4: ask_var_name_flags
- .asciiz_ptype_length equ 6
-
-
- .user_int_ptype equ 2 ; byte 0: .user_int_ptype
- ; byte 1: flags
- ; word 2: offset of message
- ; word 4: ask_var_name_flags
- ; word 6: minimum number
- ; word 8: maximum number
- ; word 10: offset of param name
- .user_int_ptype_length equ 12
-
-
- .screen_ptype equ 3 ; byte 0: .screen_ptype
- ; byte 1: flags
- ; byte 2: possible relativity
- ; byte 3: default relativity
- ; byte 4: flags for cursor_area
- ; byte 5: minimum width
- ; byte 6: minimum height
- ; word 7: offset of action to call
- ; 0 - no action
- .screen_ptype_length equ 9
-
-
- .bit_ptype equ 4 ; byte 0: .bit_ptype
- ; byte 1: flags
- ; byte 2: possible relativity
- ; byte 3: default relativity
- ; byte 4: flags for cursor_area
- ; word 5: offset of bit_cursor_proc
- ; word 7: offset of action to call
- ; 0 - no action
- .bit_ptype_length equ 9
-
-
- .variable_ptype equ 5 ; byte 0: .variable_ptype
- ; byte 1: .variable_flags
- ; word 2: variable window flags
- ; word 4: variable window type
- ; word 6: variable name
- .variable_ptype_length equ 8
-
-
- .flag_box_ptype equ 6 ; byte 0: .flag_box_ptype
- ; byte 1: flags
- ; word 2: flags for edit card
- ; word 4: offset of card structure
- ; word 6: internal check number
- ; byte 8: check_flags
- .flag_box_ptype_length equ 9
-
-
- .text_msg_ptype equ 7 ; byte 0: .text_msg_ptype
- ; byte 1: flags
- ; word 2: flags for read text
- ; word 4: end characters for read text
- ; word 6: segment ptr value
- ; word 8: offset of name for window
- ; word 10: offset in data of screen parm
- .text_msg_ptype_length equ 12
-
-
- .internal_string_ptype equ 8 ; byte 0: .internal_string_ptype
- ; byte 1: flags
- ; word 2: flags for ask_var_name
- ; word 4: offset of param name
- ; word 6: offset of message to ask
- ; word 8: offset of variable in ds
- .internal_string_ptype_length equ 10
-
-
- .start_proc_ptype equ 9 ; byte 0: .start_proc_ptype
- ; byte 1: 0
- .start_proc_ptype_length equ 2
-
-
- .assignment_ptype equ 10 ; byte 0: .assigment_ptype
- ; byte 1: flags
- .assignment_ptype_length equ 2
-
-
- .condition_ptype equ 11 ; byte 0: .condition_ptype
- ; byte 1: flags
- .condition_ptype_length equ 2
-
-
- .case_ptype equ 12 ; byte 0: .case_ptype
- ; byte 1: flags
- .case_ptype_length equ 2
-
-
- .font_ptype equ 13 ; byte 0: .font_ptype
- ; byte 1: flags
- ; word 2: variable window flags
- ; word 4: variable window type
- ; word 6: variable name
- .font_ptype_length equ 8
-
-
- .image_ptype equ 14 ; byte 0: .image_ptype
- ; byte 1: .image flags
- ; word 2: unused
- ; word 4: unused
- ; word 6: variable name
- .image_ptype_length equ 8
-
-
- .action_ptype equ 15 ; byte 0: .action_ptype
- ; byte 1: .action flags
- ; word 2: offset of action procedure
- .action_ptype_length equ 4
-
-
- .if_ptype equ 16 ; byte 0: .if_ptype
- ; byte 1: if ptype flags
- ; word 2: offset of procedure to call
- .if_ptype_length equ 4 ; can cause skipping of parameters
-
-
- .odd_comment_ptype equ 17 ; byte 0: .odd_comment_ptype
- .odd_comment_ptype_length equ 1 ; stores the current position in comment
-
- .black_box_ptype equ 18 ; byte 0: .black_box_ptype
- ; byte 1: black box ptype flags
- .black_box_ptype_length equ 2
-
-
- .buffer_ptype equ 19 ; byte 0: .buffer_ptype
- ; byte 1: .buffer_ptype_flags
- ; word 2: size in paragraphs of buffer
- .buffer_ptype_length equ 4
-
-
- .menu_ptype equ 20 ; byte 0: .menu_ptype
- ; byte 1: flags
- .menu_ptype_length equ 2
-
-
- .button_string_ptype equ 21 ; byte 0: .button_string_ptype
- ; byte 1: flags
- .button_string_ptype_length equ 2
-
-
- ;--------------------- Parameter List Flags ----------------
- ;
- ; The following are types found in the parameter lists in Layout's Data
- ;
-
- .can_be_var equ 1
- .input_var equ 2
- .output_var equ 4
-
- .asciiz_wname equ 80H
-
- .byte_value equ 80H
- .float_value equ 40H
- .dword_value equ 20H ; .float value MUST also be turned on
-
- .no_end_row equ 80H
- .no_end_col equ 40H
-
- .no_end_y equ 80H
- .no_end_x equ 40H
-
- .allow_integer equ 80H ; used by flag_box_param. Allows integers
- ; to be entered for variable input flags
-
- .pass_text_length equ 40H ; pass the maximum length of the string var
- .hidden_var equ 80H ; can this variable be automatically
- ; undefined? If so, then hide_variable_flag
- ; must be set to 1
-
- .call_post equ 40H ; this action must be called if the
- ; parameter directly before it is affected.
-
- .always_call equ 80H ; this action must be called whenever
- ; accessing variables because it
- ; affects the presence of them.
-
- .no_text_window equ 80H ; this text field does not use a text window
- .prop_msg_flag equ 40H ; for it's user interface
-
-
- .variable_buffer equ 80H ; this buffer can be variable
- .refresh_buffer equ 40H ; this buffer is a refresh buffer
-
-
-
-
- ;--------------------- Parameter Data Types ----------------
- ;
- ; The following are types found in the .LAY data segment, indicating the
- ; type of a specific parameter in the data
-
- .var_type equ 0 ; byte 0: .var_type
- ; word 1: low word of address
- ; byte 3: high byte of 3-byte address
- .var_type_length equ 4
-
-
- .list_var_type equ 1 ; byte 0: .list_var_type
- ; word 1: low word of address
- ; byte 3: high byte of 3-byte address
- .list_var_type_length equ 4 ;
- ; either a .int_type structure
- ; or the .var_type structure of an integer
- ; follows
-
-
- .dword_type equ dword_name_type ; byte 0: .dword_type
- ; word 1: low word of dword
- ; word 3: high word of dword
- .dword_type_length equ 5
-
-
- .int_type equ integer_name_type ; byte 0: .int_type
- ; word 1: integer
- .int_type_length equ 3
-
-
- .float_type equ float_name_type ; byte 0: .float_type
- ; byte 1-8: floating point
- .float_type_length equ 9
-
-
- .asciiz_type equ string_name_type ; byte 0: .asciiz_type
- ; byte 1 - ?: asciiz string
-
-
- .byte_type equ char_name_type ; byte 0: .byte_type
- ; byte 1: byte
- .byte_type_length equ 2
-
-
- .text_msg_type equ 17 ; byte 0: .text_msg_type
- ; byte 1: segment ptr value [B]
- ; word 2: low word of address
- ; word 4: high word of address
- .text_msg_type_length equ 6
-
-
- .expression_type equ 19 ; byte 0: .expression_type
- ; byte 1: segment ptr value [B]
- ; word 2: low word of address
- ; word 4: high word of address
- .expression_type_length equ 6
-
-
- .relativity_type equ 20 ; byte 0: .relativity_type
- ; word 1: relativity
- .relativity_type_length equ 3
-
-
- .screen_type equ 21 ; byte 0: .screen_type
-
- ; next depends on whether it's variable
- ; variable:
- ; byte 1: normal .var_type structure
- ; byte 5: normal .var_type structure
- ; byte 9: normal .var_type structure
- ; byte 13: normal .var_type structure
- ; constant:
- ; byte 1: normal .relativity_type struct
- ; byte 4: normal .int_type structure
- ; byte 7: normal .int_type structure
-
-
- .screen_orig_type equ 22 ; byte 0: .screen_orig_type
-
- ; next depends on whether it's variable
- ; variable:
- ; byte 1: normal .var_type structure
- ; byte 5: normal .var_type structure
- ; constant:
- ; byte 1: normal .relativity_type struct
- ; byte 4: normal .int_type structure
-
-
- .screen_ecol_type equ 23 ; byte 0: .screen_ecol_type
- ; next depends on whether it's variable
- ; origin + end column ; variable:
- ; byte 1: normal .var_type structure
- ; byte 5: normal .var_type structure
- ; byte 9: normal .var_type structure
- ; constant:
- ; byte 1: normal .relativity_type struct
- ; byte 4: normal .int_type structure
- ; byte 7: normal .int_type structure
-
-
- .screen_erow_type equ 24 ; byte 0: .screen_erow_type
- ; next depends on whether it's variable
- ; origin + end row ; variable:
- ; byte 1: normal .var_type structure
- ; byte 5: normal .var_type structure
- ; byte 9: normal .var_type structure
- ; constant:
- ; byte 1: normal .relativity_type struct
- ; byte 4: normal .int_type structure
- ; byte 7: normal .int_type structure
-
-
- .bit_type equ 25 ; byte 0: .bit_type
-
- ; next depends on whether it's variable
- ; variable:
- ; byte 1: normal .var_type structure
- ; byte 5: normal .var_type structure
- ; byte 9: normal .var_type structure
- ; byte 13: normal .var_type structure
- ; constant:
- ; byte 1: normal .relativity_type struct
- ; byte 4: normal .int_type structure
- ; byte 7: normal .int_type structure
- ; byte 10: normal .int_type structure
- ; byte 13: normal .int_type structure
-
-
- .bit_orig_type equ 26 ; byte 0: .bit_orig_type
-
- ; next depends on whether it's variable
- ; variable:
- ; byte 1: normal .var_type structure
- ; byte 5: normal .var_type structure
- ; constant:
- ; byte 1: normal .relativity_type struct
- ; byte 4: normal .int_type structure
- ; byte 7: normal .int_type structure
-
-
- .bit_endx_type equ 27 ; byte 0: .bit_endx_type
-
- ; origin + end x ; next depends on whether it's variable
- ; variable:
- ; byte 1: normal .var_type structure
- ; byte 5: normal .var_type structure
- ; byte 9: normal .var_type structure
- ; constant:
- ; byte 1: normal .relativity_type struct
- ; byte 4: normal .int_type structure
- ; byte 7: normal .int_type structure
- ; byte 10: normal .int_type structure
-
-
- .bit_endy_type equ 28 ; byte 0: .bit_endy_type
- ; next depends on whether it's variable
- ; origin + end y ; variable:
- ; byte 1: normal .var_type structure
- ; byte 5: normal .var_type structure
- ; byte 9: normal .var_type structure
- ; constant:
- ; byte 1: normal .relativity_type struct
- ; byte 4: normal .int_type structure
- ; byte 7: normal .int_type structure
- ; byte 10: normal .int_type structure
-
-
- .black_box_type equ 30 ; byte 0: .black_box_type
- ; dword 1: offset of blackbox header to use
- .black_box_type_length equ 5
-