%' *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
%'  TRIM(a) - returns the input parameter trimmed of leading and
%'	 trailing blanks.
%*DEFINE(TRIM(a)) LOCAL x y (%MATCH( x y)(%a)%x)%'
%' *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
%'   ARG -  gets the next comma-delimited arg from variable named TAIL,
%'	stripped and trimmed.  Any macro that has a valid type of NONE
%'	uses this macro so that the other parameters are not needed.
%*DEFINE(ARG) LOCAL a (%MATCH(a,tail)(%tail)%TRIM(%a))%'
%' *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

%*DEFINE(B552A(parameters))(%DEFINE(tail)(%parameters)%' 
	name	b552a

	public  boot_addr_list
	public  boot_port_list
	public  indrct_addr_cs
	public  indrct_addr_off
    public  def_class_code

code_bs552a	segment	byte public 'CODE'

%SET(ADDR_COUNT,%ARG)
boot_addr_list	dw  %ADDR_COUNT
%WHILE(%ADDR_COUNT GT 0)
(
		dw		%ARG
%SET(ADDR_COUNT,%ADDR_COUNT-1)
)

%SET(PORT_COUNT,%ARG)
boot_port_list	dw  %PORT_COUNT
%WHILE(%PORT_COUNT GT 0)
(
		dw		%ARG
%SET(PORT_COUNT,%PORT_COUNT-1)
)

indrct_addr_cs	dw %ARG
indrct_addr_off dw 0

def_class_code dw %ARG
code_bs552a	ends
)	%' end of the BS552A macro
