! Include files ! LIBRARY 'SYS$LIBRARY:LIB'; ! VAX/VMS system definitions REQUIRE 'SYS$LIBRARY:UISUSRDEF'; ! UIS user definitions REQUIRE 'SYS$LIBRARY:UISENTRY'; ! UIS entry point definitions MACRO lcl_l_vd_id = 0,0,32,0 %, lcl_l_cons_0 = 4,0,32,0 %, lcl_f_vd_width = 8,0,32,0 %, ! Virtual display width and height lcl_f_vd_height = 12,0,32,0 %, lcl_l_lines = 16,0,32,0 %, ! Number of lines, integer and floating lcl_f_lines = 20,0,32,0 %, lcl_l_cons_1 = 24,0,32,0 %, lcl_f_font_height = 28,0,32,0 %, lcl_f_lines_min3 = 32,0,32,0 %, lcl_f_date_border = 36,0,32,0 %, lcl_f_cons_2 = 40,0,32,0 %, lcl_f_edge = 44,0,32,0 %, lcl_f_2edge = 48,0,32,0 %, lcl_w_current_day = 64,0,16,0 %, lcl_w_status_bits = 66,0,16,0 %, lcl_v_ws_purged = 66,0, 1,0 %, lcl_v_init_cube = 66,1, 1,0 %, lcl_v_digital_clock= 66,2, 1,0 %, lcl_v_pe_monitor = 66,3, 1,0 %, lcl_l_param_bits = 68,0,32,0 %, lcl_v_border = 68,0, 1,0 %, lcl_v_cube = 68,1, 1,0 %, lcl_v_message = 68,2, 1,0 %, lcl_v_bars = 68,3, 1,0 %, lcl_v_center = 68,4, 1,0 %, lcl_v_right = 68,5, 1,0 %, lcl_v_left = 68,6, 1,0 %, lcl_v_top = 68,7, 1,0 %, lcl_v_bottom = 68,8, 1,0 %, lcl_v_timestamp = 68,9, 1,0 %, lcl_v_clock = 68,10,1,0 %, lcl_v_monitor = 68,11,1,0 %, lcl_v_cpu_monitor = 68,12,1,0 %, lcl_v_edge_lines = 68,13,1,0 %, lcl_v_cube_only = 68,14,1,0 %, lcl_v_no_right_edge= 68,15,1,0 %, lcl_v_inclbannercpu= 68,16,1,0 %, lcl_v_mode_monitor = 68,17,1,0 %, lcl_v_remote_disk = 68,18,1,0 %, lcl_v_lock_monitor = 68,19,1,0 %, lcl_v_systemfaults = 68,20,1,0 %, lcl_v_cwps_monitor = 68,21,1,0 %, lcl_f_tim_day_x = 72,0,32,0 %, lcl_f_tim_day_y = 76,0,32,0 %, lcl_f_tim_date_y = 80,0,32,0 %, lcl_f_tim_dclk_y = 84,0,32,0 %, lcl_f_cons_3 = 88,0,32,0 %, lcl_f_cube_x = 92,0,32,0 %, lcl_f_cube_y = 96,0,32,0 %, lcl_f_cube_size =100,0,32,0 %, lcl_l_cons_2 =104,0,32,0 %, lcl_l_last_iocnt =108,0,32,0 %, lcl_f_iocnt_y =112,0,32,0 %, lcl_l_base_prio =116,0,32,0 %, lcl_l_cpu_update =120,0,32,0 %, lcl_l_cpu_count =124,0,32,0 %, lcl_l_cpu_width =128,0,32,0 %, lcl_f_pixel_size =132,0,32,0 %, lcl_f_cpu_x =136,0,32,0 %, lcl_f_cpu_y =140,0,32,0 %, lcl_f_mode_x =144,0,32,0 %, lcl_f_mode_y =148,0,32,0 %, lcl_l_mode_update =152,0,32,0 %, lcl_l_page_io_update=156,0,32,0 %, lcl_l_page_io_lnm_update=160,0,32,0 %, lcl_l_pe_update =164,0,32,0 %, lcl_l_lock_update =168,0,32,0 %, lcl_l_cwps_update =172,0,32,0 %, clk_f_clock_x = 0,0,32,0 %, clk_f_clock_y = 4,0,32,0 %, clk_f_clock_size = 8,0,32,0 %, clk_l_tr_id = 12,0,32,0 %, clk_f_center = 16,0,32,0 %, clk_f_hours = 20,0,32,0 %, clk_f_minutes = 24,0,32,0 %, clk_f_seconds = 28,0,32,0 %, clk_f_hour_hand_r = 32,0,32,0 %, clk_f_minute_hand_r = 36,0,32,0 %, clk_f_second_hand_r = 40,0,32,0 %, clk_l_update = 44,0,32,0 %, clk_w_status_bits = 48,0,16,0 %, clk_v_seconds = 48,0, 1,0 %, clk_w_spare = 50,0,16,0 %, lck_l_tr_id = 0,0,32,0 %, lck_f_width = 4,0,32,0 %, lck_f_height = 8,0,32,0 %, lck_f_x = 12,0,32,0 %, lck_f_y = 16,0,32,0 %, lck_f_xh = 20,0,32,0 %, lck_f_yh = 24,0,32,0 %, lck_w_status_bits = 28,0,16,0 %, lck_w_spare = 30,0,16,0 %, lck_l_atb = 32,0,32,0 %, lck_l_lck_loc = 36,0,32,0 %, lck_l_lck_loc_rate = 40,0,32,0 %, lck_l_lck_in = 44,0,32,0 %, lck_l_lck_in_rate = 48,0,32,0 %, lck_l_lck_out = 52,0,32,0 %, lck_l_lck_out_rate = 56,0,32,0 %, lck_l_wtnotq = 60,0,32,0 %, lck_l_wtnotq_rate = 64,0,32,0 %, lck_l_dir = 68,0,32,0 %, lck_l_dir_rate = 72,0,32,0 %, lck_l_dlcksrch = 76,0,32,0 %, lck_l_dlcksrch_rate = 80,0,32,0 %, lck_l_dlckfind = 84,0,32,0 %, lck_l_dlckfind_rate = 88,0,32,0 %, lck_l_dlckmsg = 92,0,32,0 %, lck_l_dlckmsg_rate = 96,0,32,0 %, cwps_l_msgs_in = 36,0,32,0 %, !Shared with end of LCK block cwps_l_msgs_in_rate = 40,0,32,0 %, cwps_l_msgs_out = 44,0,32,0 %, cwps_l_msgs_out_rate = 48,0,32,0 %, cwps_l_bytes_in = 52,0,32,0 %, cwps_l_bytes_in_rate = 56,0,32,0 %, cwps_l_bytes_out = 60,0,32,0 %, cwps_l_bytes_out_rate = 64,0,32,0 %, cwps_l_getjpi_in = 68,0,32,0 %, cwps_l_getjpi_in_rate = 72,0,32,0 %, cwps_l_getjpi_out = 76,0,32,0 %, cwps_l_getjpi_out_rate = 80,0,32,0 %, cwps_l_pcntrl_in = 84,0,32,0 %, cwps_l_pcntrl_in_rate = 88,0,32,0 %, cwps_l_pcntrl_out = 92,0,32,0 %, cwps_l_pcntrl_out_rate = 96,0,32,0 %, cwps_l_waits =100,0,32,0 %, cwps_l_waits_rate =104,0,32,0 %, cwps_l_waiting =108,0,32,0 %, cwps_l_waiting_rate =112,0,32,0 %, lks_l_enqnew_loc = 0,0,32,0 %, lks_l_enqnew_in = 4,0,32,0 %, lks_l_enqnew_out = 8,0,32,0 %, lks_l_enqcvt_loc = 12,0,32,0 %, lks_l_enqcvt_in = 16,0,32,0 %, lks_l_enqcvt_out = 20,0,32,0 %, lks_l_deq_loc = 24,0,32,0 %, lks_l_deq_in = 28,0,32,0 %, lks_l_deq_out = 32,0,32,0 %, lks_l_enqwait = 36,0,32,0 %, lks_l_enqnotqd = 40,0,32,0 %, lks_l_blk_loc = 44,0,32,0 %, lks_l_blk_in = 48,0,32,0 %, lks_l_blk_out = 52,0,32,0 %, lks_l_dir_in = 56,0,32,0 %, lks_l_dir_out = 60,0,32,0 %, lks_l_dlckmsgs_in = 64,0,32,0 %, lks_l_dlckmsgs_out = 68,0,32,0 %, lks_l_dlcksrch = 72,0,32,0 %, lks_l_dlckfnd = 76,0,32,0 %, mbx_w_channel = 0,0,16,0 %, mbx_w_fill = 2,0,16,0 %, mbx_f_line0_max_x = 4,0,32,0 %, mbx_f_line0_max_y = 8,0,32,0 %, mbx_f_line0_min_y = 12,0,32,0 %, mbx_f_line1_max_y = 16,0,32,0 %, mbx_f_line2_max_y = 20,0,32,0 %, mon_l_tr_id = 0,0,32,0 %, mon_f_width = 4,0,32,0 %, mon_f_height = 8,0,32,0 %, mon_f_x = 12,0,32,0 %, mon_f_y = 16,0,32,0 %, mon_f_xh = 20,0,32,0 %, mon_f_yh = 24,0,32,0 %, mon_w_status_bits = 28,0,16,0 %, mon_v_initialized = 28,0, 1,0 %, mon_v_ni_busy = 28,1, 1,0 %, mon_v_ni_mntverip = 28,2, 1,0 %, mon_v_ni_sys_mv = 28,3, 1,0 %, mon_w_spare = 30,0,16,0 %, mon_l_atb = 32,0,32,0 %, mon_l_freecnt = 36,0,32,0 %, mon_l_mfycnt = 40,0,32,0 %, mon_l_faults = 44,0,32,0 %, mon_l_pageio = 48,0,32,0 %, mon_l_freecnt_rate = 52,0,32,0 %, mon_l_mfycnt_rate = 56,0,32,0 %, mon_l_faults_rate = 60,0,32,0 %, mon_l_pageio_rate = 64,0,32,0 %, mon_l_diskchar = 68,0,32,0 %, mon_l_ni_io = 72,0,32,0 %, mon_l_ni_io_rate = 76,0,32,0 %, pem_l_tr_id = 0,0,32,0 %, pem_f_width = 4,0,32,0 %, pem_f_height = 8,0,32,0 %, pem_f_x = 12,0,32,0 %, pem_f_y = 16,0,32,0 %, pem_f_xh = 20,0,32,0 %, pem_f_yh = 24,0,32,0 %, pem_w_status_bits = 28,0,16,0 %, pem_w_spare = 30,0,16,0 %, pem_l_atb = 32,0,32,0 %, pem_l_xmt = 36,0,32,0 %, pem_l_retry = 40,0,32,0 %, pem_l_rcv = 44,0,32,0 %, pem_l_pipefull = 48,0,32,0 %, pem_l_badchk = 52,0,32,0 %, pem_l_timeout = 56,0,32,0 %, pem_l_miscerr = 60,0,32,0 %, pem_l_rexmt_percent = 64,0,32,0 %, pem_l_rercv_percent = 68,0,32,0 %, pem_l_xmt_rate = 72,0,32,0 %, pem_l_retry_rate = 76,0,32,0 %, pem_l_rcv_rate = 80,0,32,0 %, pem_l_pipefull_rate = 84,0,32,0 %, pem_l_badchk_rate = 88,0,32,0 %, pem_l_timeout_rate = 92,0,32,0 %, pem_l_miscerr_rate = 96,0,32,0 %, pem_l_kbyte =100,0,32,0 %, pem_l_kbyte_rate =104,0,32,0 %, pes_l_vc_cnt = 0,0,32,0 %, pes_l_xmt_msg = 4,0,32,0 %, pes_l_xmt_unseq = 8,0,32,0 %, pes_l_xmt_seq = 12,0,32,0 %, pes_l_xmt_ack = 16,0,32,0 %, pes_l_xmt_rexmt = 20,0,32,0 %, pes_l_xmt_cntl = 24,0,32,0 %, pes_l_xmt_bytes = 28,0,32,0 %, pes_l_xmt_noxch = 32,0,32,0 %, pes_l_rcv_msg = 36,0,32,0 %, pes_l_rcv_unseq = 40,0,32,0 %, pes_l_rcv_seq = 44,0,32,0 %, pes_l_rcv_ack = 48,0,32,0 %, pes_l_rcv_rercv = 52,0,32,0 %, pes_l_rcv_cntl = 56,0,32,0 %, pes_l_rcv_bytes = 60,0,32,0 %, pes_l_rcv_cache = 64,0,32,0 %, pes_l_hs_tmo = 68,0,32,0 %, pes_l_rcv_tr_short = 72,0,32,0 %, pes_l_rcv_cc_short = 76,0,32,0 %, pes_l_rcv_ill_ack = 80,0,32,0 %, pes_l_rcv_ill_seq = 84,0,32,0 %, pes_l_rcv_bad_cksum = 88,0,32,0 %, pes_l_rcv_norch = 92,0,32,0 %, pes_l_rcv_cc_bad_eco = 96,0,32,0 %, pes_l_rcv_cc_authorize =100,0,32,0 %, pes_l_xmt_seq_tmo =104,0,32,0 %, pes_l_rcv_listen_tmo =108,0,32,0 %, pes_l_tr_dfq_empty =112,0,32,0 %, pes_l_tr_mfq_empty =116,0,32,0 %, pes_l_cc_dfq_empty =120,0,32,0 %, pes_l_cc_mfq_empty =124,0,32,0 %, pes_l_tr_pipe_quota =128,0,32,0 %; LITERAL lcl_c_length = 180, clk_c_length = 52, lck_c_length = 128, ! Must be longer than LCK and CWPS lks_c_length = 96, mbx_c_length = 24, mon_c_length = 80, pem_c_length = 128, pes_c_length = 132; LITERAL synch_efn = 1, asynch_efn1 = 2, asynch_efn2 = 3, mbx_size = 256; ! Floating point builtins ! BUILTIN SUBF, ADDF, MULF, DIVF, CMPF, CVTFL, CVTRFL, CVTLF; ! Macros for F-floating functions which "return" their result value ! MACRO twoarg_f (func,value1,value2) = BEGIN LOCAL result; func (%REF (value1),%REF (value2),result); .result END%, onearg_f (func,value) = BEGIN LOCAL result; func (%REF (value),result); .result END%, ref_onearg_f (func,value) = BEGIN LOCAL result; func (%REF (value),result); result END%, add_f (value1,value2) = twoarg_f (ADDF,value1,value2)%, sub_f (value1,value2) = twoarg_f (SUBF,value1,value2)%, mul_f (value1,value2) = twoarg_f (MULF,value1,value2)%, div_f (value1,value2) = twoarg_f (DIVF,value1,value2)%, intr_f (value) = onearg_f (CVTRFL,value)%, int_f (value) = onearg_f (CVTFL,value)%, float_f (value) = onearg_f (CVTLF,value)%, ref_float_f (value) = ref_onearg_f (CVTLF,value)%, trunc_f (value) = float_f (onearg_f (CVTFL,value))%; ! Declare some macros as shorthand for the psect names ! MACRO npag_global_rw = PSECT GLOBAL = %NAME ('_NPAG_GLOBAL_RW') ( WRITE, NOEXECUTE); GLOBAL %, npag_global_ro = PSECT GLOBAL = %NAME ('_NPAG_GLOBAL_RO') (NOWRITE, EXECUTE); GLOBAL %, npag_own_rw = PSECT OWN = %NAME ('_NPAG_OWN_RW') ( WRITE, NOEXECUTE); OWN %, npag_own_ro = PSECT OWN = %NAME ('_NPAG_OWN_RO') (NOWRITE, EXECUTE); OWN %, npag_code = PSECT CODE = %NAME ('_NPAG_CODE') (NOWRITE, EXECUTE) %, npag_plit = PSECT PLIT = %NAME ('_NPAG_PLIT') (NOWRITE, EXECUTE) %, pag_global_rw = PSECT GLOBAL = %NAME ('__PAG_GLOBAL_RW') ( WRITE, NOEXECUTE); GLOBAL %, pag_global_ro = PSECT GLOBAL = %NAME ('__PAG_GLOBAL_RO') (NOWRITE, EXECUTE); GLOBAL %, pag_own_rw = PSECT OWN = %NAME ('__PAG_OWN_RW') ( WRITE, NOEXECUTE); OWN %, pag_own_ro = PSECT OWN = %NAME ('__PAG_OWN_RO') (NOWRITE, EXECUTE); OWN %, pag_code = PSECT CODE = %NAME ('__PAG_CODE') (NOWRITE, EXECUTE) %, pag_plit = PSECT PLIT = %NAME ('__PAG_PLIT') (NOWRITE, EXECUTE) %; ! Set up exectuable psects ! pag_code; pag_plit; ! Now set up bogus PSECT names for OWN and GLOBAL so that we can easily identify mislabeled sections ! PSECT GLOBAL = %NAME ('$$$_GLOBAL') (WRITE,NOEXECUTE), OWN = %NAME ('$$$_OWN') (WRITE,NOEXECUTE); ! Declare some macros as shorthand for the psect names ! MACRO $global_rw = PSECT GLOBAL = exch$rw_global (ADDRESSING_MODE (LONG_RELATIVE)); GLOBAL % ;