PAM Programming Manual
Link-Level Programming Examples
PAM Programming Manual—142482
B-5
Procedures
 @startup^message^ptr := end^addr + 1;
 SCAN startup^message^ptr WHILE " " -> @startup^message^ptr;
 end^addr := NumIn ( startup^message^ptr,
 Port^type, 10, error );
 IF error THEN
 BEGIN
 CALL Clear^Report^Buffer;
 report^buf^ptr ':=' ["Port type is bad"];
 CALL Write^Report^Buf^and^AbEnd;
 END;
--/---------------------------------------------------------------/
-- Look for Command Code ( ZLAM^Val^SDU^Type^... )
--/---------------------------------------------------------------/
 @startup^message^ptr := end^addr + 1;
 SCAN startup^message^ptr WHILE " " -> @startup^message^ptr;
 end^addr := NumIn 
 ( startup^message^ptr, command^code, 10, error );
 IF error THEN
 BEGIN
 CALL Clear^Report^Buffer;
 report^buf^ptr ':=' ["Command Code is bad"];
 CALL Write^Report^Buf^and^AbEnd;
 END;
--/---------------------------------------------------------------/
-- Get P/F flag
--/---------------------------------------------------------------/
 @startup^message^ptr := end^addr + 1;
 SCAN startup^message^ptr WHILE " " -> @startup^message^ptr;
 end^addr := NumIn ( startup^message^ptr, P^F^flag, 10, error );
 IF error OR
 ( P^F^flag > 1 ) OR
 ( P^F^flag < 0 ) THEN
 BEGIN
 CALL Clear^Report^Buffer;
 report^buf^ptr ':=' ["P F flag is bad"];
 CALL Write^Report^Buf^and^AbEnd;
 END;
--/---------------------------------------------------------------/
-- Get response flag
--/---------------------------------------------------------------/
 @startup^message^ptr := end^addr + 1;
 SCAN startup^message^ptr WHILE " " -> @startup^message^ptr;
 end^addr := NumIn ( startup^message^ptr, rsp^flag, 10, error );
 IF error OR
 ( rsp^flag > 1 ) OR
 ( rsp^flag < 0 ) THEN
 BEGIN
 CALL Clear^Report^Buffer;
 report^buf^ptr ':=' ["Response flag is bad"];
 CALL Write^Report^Buf^and^AbEnd;
 END;
--/---------------------------------------------------------------/
-- Look for Loop Count.
--/---------------------------------------------------------------/
 @startup^message^ptr := end^addr + 1;
 SCAN startup^message^ptr WHILE " " -> @startup^message^ptr;
 end^addr := NumIn ( startup^message^ptr, loop^cnt, 10, error );
 IF error OR










