PAM Programming Manual
Link-Level Programming Examples
PAM Programming Manual—142482
B-25
Procedures
 min_value : INTEGER;
 max_value : INTEGER ) : BOOLEAN;
 VAR
 error : INTEGER;
 start_addr : BYTEADDR;
 end_addr : BYTEADDR;
 BEGIN
 IF ( start_ndx > startup_msg_size_b ) THEN
 BEGIN
 Get_Int := False;
 RETURN;
 END;
 start_addr := BAddr ( startup_msg[ start_ndx ] );
 end_addr := NumIn ( start_addr,
 result,
 base,
 error );
 end_ndx := ( start_ndx
 + ( ReType ( end_addr, INTEGER )
 - ReType ( start_addr, INTEGER ) ) );
 Get_Int := ( error <> 0 ) OR
 ( result < min_value ) OR
 ( result > max_value );
 END; 
?PAGE ’Start of Initialize mainline’
{------------------------------------------------------------------
 Initialize mainline
------------------------------------------------------------------}
 BEGIN
 startup_msg_addr := XAddr ( startup_msg );
 startup_msg_size_B := Get_StartUp_Msg ( startup_msg_addr, 200 );
{-------------------- look for <L2S device name> -----------------}
 ndx := Scan_Blanks ( 66 );
 ndx2 := 1;
 FOR ndx1 := ndx TO ( ndx + 7 ) DO
 BEGIN
 L2SAP_file_name.subvol.volume[ ndx2 ] :=
 Chr ( startup_msg[ ndx1 ] );
 ndx2 := ( ndx2 + 1 );
 END;
 ndx := ndx + 8;
 ndx2 := 1;
 FOR ndx1 := ndx TO ( ndx + 7 ) DO
 BEGIN
 L2SAP_file_name.subvol.subvolume[ ndx2 ] :=
 Chr ( startup_msg[ ndx1 ] );
 ndx2 := ( ndx2 + 1 );
 END;
 ndx := ndx + 8;
 ndx2 := 1;
 FOR ndx1 := ndx TO ( ndx + 7 ) DO
 BEGIN
 L2SAP_file_name.filename[ ndx2 ] := 
 Chr ( startup_msg[ ndx1 ] );
 ndx2 := ( ndx2 + 1 );
 END;
 ndx := ndx + 8;










