Programming Examples
Appendix B
B-6
/*===========================================================================
KTX_DUALPORT – defines the structure of the dual port memory (shared by
both the PC Host and the KTX Z84 microprocessor).
============================================================================*/
typedef struct
{
UBYTE
boot_code[4];
UBYTE
link_state;
UBYTE
link_address;
UBYTE
link_protocol;
UBYTE
link_baud_rate;
UBYTE
reserved1;
CONFIG_DATA
config_data;
UBYTE
init_status;
RUNNING_STATUS
running_status;
UBYTE
int_status_to_host;
UBYTE
int_status_from_host;
UBYTE
host_dead_counter;
UBYTE
reset_diags_counters;
UBYTE
reserved2[2];
UBYTE
alive_flag;
UBYTE
duplicate_node;
UBYTE
off_ktx;
UBYTE
stopped_flag;
UBYTE
module_state;
UBYTE
COS_link_address;
UBYTE
reserved3[100];
UBYTE
num_adapter_addresses;
UBYTE
num_faulted_adapters;
OPERATING_STATUS
operating_status;
ADAPTER_STATUS
adapter_status_table[128];
COMMAND
cmd_buffer;
CONFIRMATION
confirmation_buffer;
UWORD
input_image_table[256];
UWORD
output_image_table[256];
/*
**
The following are KTX hardware registers. The numbers in
**
the right column are hex offsets from the start of the dualport.
*/
UBYTE
reserved_reg_1; /* :800
*/
UBYTE
host_to_ktx_int_reg; /* :801
*/
UBYTE
assert_reg; /* :802
*/
UBYTE
deassert_reg; /* :803
*/
UBYTE
status_reg; /* :804
*/
UBYTE
reserved_reg_2; /* :805
*/
UBYTE
reserved_reg_3; /* :806
*/
UBYTE
reserved_reg_4; /* :807
*/
UBYTE
host_ack_of_ktx_int_reg; /* :808
*/
UBYTE
undefined_1; /* :809
*/
UBYTE
card_control_write_reg; /* :80A
*/
UBYTE
undefined_2; /* :80B
*/
UBYTE
card_control_read_reg; /* :80C
*/
UBYTE
undefine_3; /* :80D
*/
UBYTE
reserved_reg_5; /* :80E
*/
UBYTE
undefined_4; /* :80F
*/
} KTX_DUALPORT;
/*****************************************************************************
**
**
NON–DUALPORT STRUCTURE DEFINTIONS
**
*****************************************************************************/
typedef struct
{
UBYTE
count;
UWORD
data[8];
} IO_BUFFER;
typedef UBYTE
TABLE_NAME;
typedef
struct
{
UBYTE
count;
UWORD
bt_data[64];
} BT_BUFFER;
#endif