CGROUP GROUP IO_PORTS,VALUES,MISC,INT_VARS,INT_MASK,IAPX_186_INIT ASSUME CS:CGROUP IAPX_186_INIT SEGMENT WORD PUBLIC 'CODE' PUBLIC IAPX_186_START IAPX_186_START DW 0FFFFH IAPX_186_INIT ENDS %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' TITLE: NML ROM CONFIGURATION MACROS %' %' DATE: APRIL 24, 1983 %' %' ABSTRACT: This module contains the definitions of the %' MASTER_PIC macro, SLAVE_PIC macro (rev 1.0, no slave pic ) %' COMMUNICATION BOARD RELATED macros and NET MANAGEMENT %' macros. These macros allow the device characteristics %' and device ports to be selectively configured. If any %' parameter which has a default value is not specified, %' that parameter assumes its default value. %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' output of this macro file is the following:- %' %' segments io_ports and values to be used as follows:- %' i=0 %' do while io_ports(i) <> 0ffffh; %' output(io_ports(i))=values(i); %' i=i+1; %' end; %' %' segment misc is in the following format:- %' misc structure( %' boot server mc address (6) byte, %' this node host address (6) byte, /* use default if mc address */ %' comm_type word, /* 0 => 550a, 1 => 552, 2=> 186/51 */ %' parm_1 word, %' parm_2 word, %' parm_3 word, %' parm_4 word, %' if 550a then parm_1 = wake_up_port of 550a %' parm_2 = ignored %' parm_3 = offset$of(@scp) %' parm_4 = base$of(@scp) %' else if 186/51 then %' ignore all parms %' else if 552 then parm_1 = wake_up port %' %' int_type word, /* 0 => level, 1 => mem map, 2 => i/o */ %' int_val word, /* valid if i/o or mem mapped */ %' int_level word, /* encoded level in rmx way of dl ints*/ %' int_num word, /* position of int vector in int vector %' array */ %' ) %' %' segment int vars is as follows: %' int vars structure( %' eoi port of pic word, %' eoi value byte, %' ) %' %' segment int_mask is as follows %' int_mask structure( %' base port of pic word, %' val to write to above port to unmask dl ints byte, %' ) %' %' %' %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' UTILITY MACROS USED BY MASTER_PIC, SLAVE_PIC AND TIMER MACROS %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' 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(slave_bit(level))(%' %%level) %set(level00H,1) %set(level0,1) %set(level01H,2) %set(level1,2) %set(level02H,4) %set(level2,4) %set(level03H,8) %set(level3,8) %set(level04H,16) %set(level4,16) %set(level05H,32) %set(level5,32) %set(level06H,64) %set(level6,64) %set(level07H,128) %set(level7,128) %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' NAME: MASTER_PIC %' %' INPUT: type, master_base_port, port_delta, buffered %' where: %' type is the type of the PIC (8259A or 80130) %' master_base_port is the numerically lowest %' valued port of the PIC. %' port_delta is increments of ports %' buffered is y if cascaded ints allowed %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(master_pic(type_p,master_base_port_p,port_delta_p,buffered_p))( ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Definition of the Master PIC ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %define(type)(%cleanup(%type_p)) %define(master_base_port)(%cleanup(%master_base_port_p)) %define(port_delta)(%cleanup(%port_delta_p)) %define(buffered)(%cleanup(%buffered_p)) %' %IF (%EQS(%type,8259A) OR %EQS(%type,8259a))%' %' 'THEN (%' IO_PORTS SEGMENT WORD PUBLIC 'CODE' public io_ports_start io_ports_start dw %master_base_port ; icw1 port dw %master_base_port + %port_delta ; icw2 port DW %master_base_port + %port_delta ; icw4 port DW %master_base_port + %port_delta ; int mask port dw 0ffffh ; => end IO_PORTS ENDS VALUES SEGMENT WORD PUBLIC 'CODE' PUBLIC VALUES_START VALUES_START DB 17h ; icw1 DB 20H ; icw2 %IF (%EQS(%buffered,Y) OR %EQS(%buffered,y)) THEN ( DB 1DH )ELSE( DB 011H )FI DB 0FFH ; mask all ints VALUES ENDS )else (%' %if (%eqs(%type,80130)) then (%' %' IO_PORTS SEGMENT WORD PUBLIC 'CODE' PUBLIC IO_PORTS_START IO_PORTS_START DW %master_base_port ; icw1 port dw %master_base_port + %port_delta ; icw2 port dw %master_base_port + %port_delta ; icw4 port DW %master_base_port + %port_delta ; int mask port dw 0ffffh ; => end IO_PORTS ENDS VALUES SEGMENT WORD PUBLIC 'CODE' PUBLIC VALUES_START VALUES_START DB 13h ; icw1 DB 20H ; icw2 DB 1dh ; icw4 DB 0FFH ; int mask VALUES ENDS ) else ( ERROR - Incorrect master PIC Type )%' fi%' ) FI%' )%' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' NAME: BOOT_SERVER_MULTICAST ADDRESS %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(boot_server_multicast_address(a1_p,a2_p,a3_p,a4_p,a5_p,a6_p))(%' %' %define(a1)(%cleanup(%a1_p)) %define(a2)(%cleanup(%a2_p)) %define(a3)(%cleanup(%a3_p)) %define(a4)(%cleanup(%a4_p)) %define(a5)(%cleanup(%a5_p)) %define(a6)(%cleanup(%a6_p)) MISC SEGMENT WORD PUBLIC 'CODE' PUBLIC BS_MC_ADDR ORG 0 BS_MC_ADDR DB %A1,%A2,%A3,%A4,%A5,%A6 MISC ENDS )%' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' NAME: HOST_ID %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(host_id(b1_p,b2_p,b3_p,b4_p,b5_p,b6_p))(%' %' %define(b1)(%cleanup(%b1_p)) %define(b2)(%cleanup(%b2_p)) %define(b3)(%cleanup(%b3_p)) %define(b4)(%cleanup(%b4_p)) %define(b5)(%cleanup(%b5_p)) %define(b6)(%cleanup(%b6_p)) MISC SEGMENT WORD PUBLIC 'CODE' PUBLIC MY_HOST_ID ORG 6 MY_HOST_ID DB %B1,%B2,%B3,%B4,%B5,%B6 MISC ENDS )%' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' NAME: data_link_type %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(data_link_type(type_p))(%' %' %define(type)(%cleanup(%type_p)) )%' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' NAME: BOARD_TYPE %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(BOARD_type(r0_p,r1_p,r2_p,r3_p,r4_p))(%' %' %define(r0)(%cleanup(%r0_p)) %define(r1)(%cleanup(%r1_p)) %define(r2)(%cleanup(%r2_p)) %define(r3)(%cleanup(%r3_p)) %define(r4)(%cleanup(%r4_p)) %' %if (%eqs(%r0,550a) or %eqs(%r0,550A))then (%' %define(comm_type)(0) )%' else (%' %if (%eqs(%r0,552)) then (%' %define(comm_type)(1) )%' else (%' %if (%eqs(%r0,186/51)) then (%' %define(comm_type)(2) )%' else ( error - invalid comm board ) fi ) fi ) fi %' MISC SEGMENT WORD PUBLIC 'CODE' PUBLIC BOARD_TYPE ORG 12 BOARD_TYPE DW %comm_TYPE DW %R1 DW %R2 DW %R3 DW %R4 MISC ENDS ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' NAME: DATA_LINK_INTERRUPTS %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(data_link_interrupts(int_type_p,int_val_p,int_level_p))(%' %' %define(int_type)(%cleanup(%int_type_p)) %define(int_val)(%cleanup(%int_val_p)) %define(int_level)(%cleanup(%int_level_p)) MISC SEGMENT WORD PUBLIC 'CODE' PUBLIC INT_STR ORG 22 INT_STR DW %INT_TYPE DW %INT_VAL DW %INT_LEVEL dw 32 + ((%int_level and 70h) shr 4) MISC ENDS INT_VARS SEGMENT WORD PUBLIC 'CODE' PUBLIC INT_VARS_START INT_VARS_START LABEL WORD DW %MASTER_BASE_PORT DB 01100000b or (%int_level shr 4) INT_VARS ENDS INT_MASK SEGMENT WORD PUBLIC 'CODE' PUBLIC INT_MASK_START INT_MASK_START LABEL WORD DW %MASTER_BASE_PORT + %PORT_DELTA DB not (1 shl (%INT_LEVEL shr 4) ) INT_MASK ENDS )%' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' NAME: INITIALIZATION OF 186 CHIP SELECTS LINES %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(iapx_186_init(rmx_mode_p, umcs_p, lmcs_p, mpcs_p, mmcs_p, pacs_p))(%' %' %define(rmx_mode)(%cleanup(%rmx_mode_p)) %define(umcs)(%cleanup(%umcs_p)) %define(lmcs)(%cleanup(%lmcs_p)) %define(mpcs)(%cleanup(%mpcs_p)) %define(mmcs)(%cleanup(%mmcs_p)) %define(pacs)(%cleanup(%pacs_p)) %IF (%EQS(%rmx_mode,y) OR %EQS(%rmx_mode,Y))%' %' 'THEN (%' IAPX_186_INIT SEGMENT WORD PUBLIC 'CODE' ORG OFFSET ($-2) DW 0FFFEH DW 40FFH DW 0FFFFH IAPX_186_INIT ENDS )FI %IF (%EQS(%umcs,none) OR %eqs(%umcs,NONE) OR %EQS(umcs,None) ) then ( ) else ( IAPX_186_INIT SEGMENT WORD PUBLIC 'CODE' ORG OFFSET ($-2) DW 0FFA0H DW %UMCS DW 0FFFFH IAPX_186_INIT ENDS )FI %IF (%EQS(%lmcs,none) OR %eqs(%lmcs,NONE) OR %EQS(lmcs,None) ) then ( ) else ( IAPX_186_INIT SEGMENT WORD PUBLIC 'CODE' ORG OFFSET ($-2) DW 0FFA2H DW %LMCS DW 0FFFFH IAPX_186_INIT ENDS )FI %IF (%EQS(%mpcs,none) OR %eqs(%mpcs,NONE) OR %EQS(mpcs,None) ) then ( ) else ( IAPX_186_INIT SEGMENT WORD PUBLIC 'CODE' ORG OFFSET ($-2) DW 0FFA8H DW %MPCS DW 0FFFFH IAPX_186_INIT ENDS )FI %IF (%EQS(%mmcs,none) OR %eqs(%mmcs,NONE) OR %EQS(mmcs,None) ) then ( ) else ( IAPX_186_INIT SEGMENT WORD PUBLIC 'CODE' ORG OFFSET ($-2) DW 0FFA6H DW %MMCS DW 0FFFFH IAPX_186_INIT ENDS )FI %IF (%EQS(%pacs,none) OR %eqs(%pacs,NONE) OR %EQS(pacs,None) ) then ( ) else ( IAPX_186_INIT SEGMENT WORD PUBLIC 'CODE' ORG OFFSET ($-2) DW 0FFA4H DW %PACS DW 0FFFFH IAPX_186_INIT ENDS )FI ) %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %' %' NAME: SCP OF THE 82586 %' %';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; %*define(system_configuration_pointer(sys_bus_p, iscp_low_p, iscp_high_p))(%' %' %define(sys_bus)(%cleanup(%sys_bus_p)) %define(iscp_low)(%cleanup(%iscp_low_p)) %define(iscp_high)(%cleanup(%iscp_high_p)) ISCP_82586 SEGMENT AT 0FFFFH org 6 DB %sys_bus DB 5 DUP (?) DW %iscp_low DB %iscp_high ISCP_82586 ENDS )