%';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' ; %' INTEL CORPORATION PROPRIETARY INFORMATION ; %' ; %' This software is supplied under the terms of a license agreement ; %' or non disclosure agreement with Intel Corporation and may not be ; %' copied nor disclosed except in accordance with the terms of that ; %' agreement. ; %' ; %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' Title: MIP configuration macros %' %' Date: Aug 13, 1984 %' %' Author: Rajiv Dhingra %' %' Abstract: The macros define the configuration data structures for mip. %' This file also calls define_sublayer_analysis once for each %' layer that resides on the 186/530. It initializes some vars to 0 %' too. %' %' Caution: This module must be linked first in 286 to insure that the %' MIP queues are in the right location %' %' Revisions: %' %' 01/10/86 Added 286 support %' 7 Aug 86 Added error reporting %' 3 Nov 86 Added start delay %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' Define the groups according to the PLM86 or PLM286 compact model %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %If (%Asm286) Then ( assume ds:base_data ) Else ( cgroup group base_code dgroup group base_data assume cs:cgroup, ds:dgroup )FI %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' Utility macro cleanup to cleanup parameters %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' Define strings for strip. %' %define(cr) ( ) %define(lf) ( ) %define(tab) ( ) %define(space) ( ) %' %' Strip: %' strip all occurances of "char" string from "arg" string. %' %*define(strip(char,arg)) local str head tail (%' %' '%define(str) (%0)%' %' '%define(tail) (%arg)%' %' '%while(%nes(%tail,%0)) (%' %' '%match(head%(%char)tail) (%tail)%' %' '%define(str) (%str%head)%' %' ')%' %' '%str%' )%' %' %' Cleanup: %' strip spaces, tabs and CRLFs from string. %' %*define(cleanup(str)) (%strip(%space,%strip(%tab,%strip(%cr,%strip(%lf,%str))))) %' %*define(pubword(name,value)) ( public cfg_%name cfg_%name dw %value ) %*define(pubdword(name,value)) ( public cfg_%name cfg_%name dd %value ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the name of the Communication Board. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(comm_name(cname_p))(%' %' %define(cname)(%cleanup(%cname_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public cqname public idof186_530 cqname db %len(%cname) db '%cname' db %eval(20-%len(%cname)) dup (0) idof186_530 db %len(%cname) db '%cname' db %eval(20-%len(%cname)) dup (0) base_code ends %' ) %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the length of the Communication Board host id %' and allocates space for it. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(comm_board_station_address_l(h_len_p))(%' %' %define(h_len)(%cleanup(%h_len_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public comm_host_id_l comm_host_id_l db %h_len base_code ends %' %If (%Asm286) Then ( base_data segment RW public ) Else ( base_data segment byte public 'data' )FI public comm_host_id public boot_status_str boot_status_str dw 2 dup (0) comm_host_id db %h_len dup (0) base_data ends %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the MB2 port that iNA is listening at. %' There is 1 parameter. %' 1. The MB2 port of the comm board. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(COMM_Port_Id( port_num_p))(%' %' %define(port_num)(%cleanup(%port_num_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public wake_up_port wake_up_port dw %port_num base_code ends %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the number of internal processes that will %' send messages via mip. Actually it is the number of response ports %' that rbs sent to the 186/530 can have. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(num_internal_ports( num_p))(%' %' %define(num)(%cleanup(%num_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public num_internal_ports num_internal_ports dw %num base_code ends %' %If (%Asm286) Then ( base_data segment RW public ) Else ( base_data segment byte public 'data' )FI public internal_ports, num_int_rbs internal_ports db %num dup (?) num_int_rbs dw %num dup (?) base_data ends %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the number of response mailboxes that %' iRMX application tasks can have in their rbs to the 186/530. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(num_external_mailboxes( num_p))(%' %' %define(num)(%cleanup(%num_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public no_of_mailboxes no_of_mailboxes db %num base_code ends %' %If (%Asm286) Then ( base_data segment RW public ) Else ( base_data segment byte public 'data' )FI public free_mbx_ptr public mailboxes, num_ext_rbs public mailboxe_in_use free_mbx_ptr db 1 dup(0) mailboxes dw %num dup (?) mailboxe_in_use db %num dup (0) num_ext_rbs dw %num dup (?) base_data ends %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the device ids of the RMX system and the comm board. %' There are 2 parameters. %' 1. The device id of the RMX system. %' 2. The device id of the comm board. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(device_ids( rmx_id_p, comm_board_id_p))(%' %' %define(rmx_id)(%cleanup(%rmx_id_p))%' %define(comm_board_id)(%cleanup(%comm_board_id_p))%' %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro specifies the layers that reside on the 186/530. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %set(num_layers,0)%'init number of layers on the 186/530. %' %*define(layer(num_p))(%' %define(num)(%cleanup(%num_p))%' %' %set(num_layers,%num_layers+1) %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI layer_%num_layers db %num base_code ends %' ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' Macro: comm_response_delay ( delay_time ) %' delay_time is the time to wait for the comm board response. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(comm_response_delay( delay_p ))(%' %' %define(delay)(%cleanup(%delay_p))%' %' %if (%Asm286) then (%' base_code segment ER public ) Else (%' base_code segment byte public 'code' )FI %' public resp_delay_time resp_delay_time dw %delay base_code ends ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' This macro must be the last macro in the configuration calls %' It has no parameters. %' It initializes all the data structures required by MIP. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(end_mip_cnfg)(%' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public Init_mip_device_info Init_mip_device_info db %comm_board_id db 0ffh ;status = 0ffh => enabled dw 00h,00h dw 00h,00h db 00h mip_time dw %delay public this_device this_device db %rmx_id public num_layers num_layers dw %num_layers %' initializes some variables to 0. %' also call define sublayer analysis %if ( %num_layers ne 0) then( extrn define_sublayer_analysis:far extrn mip_cmd:far extrn mip_delete:far )FI public mip_cnfg_init mip_cnfg_init: push ds pop es xor ax, ax cld xor cx,cx mov cl, no_of_mailboxes shl cx, 1 %If (%Asm286) Then ( mov di, offset mailboxes ) Else ( mov di, offset dgroup:mailboxes )FI rep stosw mov bx, num_internal_ports mov cx, bx shl bx, 1 add cx, bx %If (%Asm286) Then ( mov di, offset internal_ports ) Else ( mov di, offset dgroup:internal_ports )FI rep stosb %set(counter,%num_layers) %while(%counter ne 0 )(%' mov al, layer_%counter push ax push cs ;push code segment first %If (%Asm286) Then ( mov ax, offset mip_cmd ) Else ( mov ax, offset base_cgroup:mip_cmd )FI push ax push cs ;push code segment first %If (%Asm286) Then ( mov ax, offset mip_delete ) Else ( mov ax, offset base_cgroup:mip_delete )FI push ax %if (%num_layers ne 0) then( call define_sublayer_analysis )FI %set(counter,%counter-1) ) ret base_code ends ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' Macro: load( local, logical_name, file_name, comm_board ) %' load( remote, class_code, 0 , comm_board) %' load( null, 0, 0, comm_board ) %' If the first parameter is l, then the 186/530 is loaded locally. %' The token for the device on which the load file resides must %' be cataloged in the root dir as logical_name, the second parm. %' The third parameter is the name of the load file. %' If the first parameter is r, the 186/530 is loaded remotely. %' The second parameter is the class code that the 186/530 should use %' when requesting boot service. The third parameter must be 0. %' If the first parameter is n, then it is assumed that the 186/530 has already %' been loaded. The second and third parameters must be 0. %' The fourth parameter is the number of comm boards in MB II system. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(load( local_remote_p, log_name_p, file_name_p, comm_board_p))(%' %' %define(local_remote)(%cleanup(%local_remote_p))%' %define(log_name)(%cleanup(%log_name_p))%' %define(file_name)(%cleanup(%file_name_p))%' %define(comm_board)(%cleanup(%comm_board_p))%' %' %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment byte public 'code' )FI public file_name file_name db (%len(%file_name)), '%file_name' db %eval(30-%len(%file_name)) dup (0) public class_code, logical_name, how_load %if ( (%eqs(%local_remote,LOCAL)) or (%eqs(%local_remote,local)) ) then(%' class_code dw 1000H logical_name db (%len(%log_name)), '%log_name' db %eval(14-%len(%log_name)) dup (0) how_load db 1 )%' else( %if ( (%eqs(%local_remote,PROM)) or (%eqs(%local_remote,prom)) ) then(%' class_code dw 1000H logical_name db 15 dup (0) how_load db 3 )%' else( %if ( (%eqs(%local_remote,NOLOAD)) or (%eqs(%local_remote,noload)) ) then(%' class_code dw 1000H logical_name db 15 dup (0) how_load db 3 )%' else( class_code dw %log_name logical_name db 15 dup (0) how_load db 2 )fi )fi )fi%' public cfg_comm cfg_comm db %comm_board base_code ends )%' %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' Macro: commengine_error_reporting( Y/N ) %' If the first parameter is Y, then if the COMMengine initialization fails, %' a message gets printed on the iSDM console and the iRMXNET %' job gets deleted. %' If the first parameter is N, then if the COMMengine initialization fails, %' iRMXNET enters a do forever loop. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(commengine_error_reporting( y_n_p ))(%' %' %define(y_n)(%cleanup(%y_n_p))%' %' %if (%Asm286) then (%' base_code segment Er public ) Else (%' base_code segment byte public 'code' )FI %' %if ( (%eqs(%y_n,Y)) or (%eqs(%y_n,y)) ) then(%' public error_print error_print db 0ffh )%' else( public error_print, report_552_init_error error_print db 0 report_552_init_error: ret 2 )fi base_code ends ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' Macro: commengine_delay( start_delay_time ) %' start_delay_time is the time to delay calling start. %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(commengine_delay( del_p ))(%' %' %define(del)(%cleanup(%del_p))%' %' %if (%Asm286) then (%' base_code segment ER public ) Else (%' base_code segment byte public 'code' )FI %' public start_delay_time public timelimit start_delay_time dw %del timelimit dw %del base_code ends ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' Macro: mpb_info(small_Bufs, smallRxsz, large_bufs, largeRxSz, queuesize) %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(mpb_info(small_Bufs, smallRxSz, large_Bufs, largeRxSz,queuesize) ) ( %If (%Asm286) Then ( base_code segment Er public ) Else ( base_code segment public 'code' )FI %pubword(small_Bufs,%small_Bufs) %pubdword(smallRxSz,%smallRxSz) %pubword(large_Bufs,%large_Bufs) %pubdword(largeRxSz,%largeRxSz) %pubword(queueSize,%queueSize) base_code ends )