PAM Programming Manual
Link-Level Programming Examples
PAM Programming Manual—142482
B-22
Sample Pascal Calling Sequences
Sample Pascal Calling Sequences 
The following paragraphs present an L2S Access Point exercise using Pascal coding 
examples that are functionally similar to the preceding TAL and C coding examples. In 
this sample exercise, the test program communicates with a node in an attached LAN by 
way of a PORT. Once the PORT has been OPENed, the application program 
communicates with the link-level interface by sending and receiving SDUs. Refer to a 
Pascal manual for detailed information on the conventions used in this example.
Data Definitions and Declarations
The sample calling sequences assume the presence of the following data definitions and 
declarations:
?SECTION Kludge_Externals
FUNCTION Subtract_Quad_ TAL ( arg1, arg2 : INT64 ) : INT64;
PROCEDURE Init_Buf_ TAL ( buf_addr: EXTADDR;
 length : INTEGER;
 source : BYTE );
FUNCTION Check_Buf_ TAL ( buf_addr: EXTADDR;
 length : INTEGER;
 exp_chr : BYTE ) : INTEGER;
?SECTION Definitions
?PAGE ’L2 Service Access Point Exercise Program: Definitions’
{------------------------------------------------------------------
 Hard Coded Limits
------------------------------------------------------------------}
CONST
 Max_Req_Size = 32000;
 Max_NoWait_Depth = 5;
TYPE
 Buffer_Lst_Entry_Template = RECORD
 in_use_flag : BOOLEAN;
 test_char : BYTE;
 user_data_size_b : INTEGER;
 buffer : FSTRING [ Max_Req_Size ];
 END;
?SECTION Declarations
?PAGE’L2 Service Access Point Exercise Program: Declarations’
{------------------------------------------------------------------
 L2SAP File Information
------------------------------------------------------------------}
VAR
 L2SAP_file_name : Internl_File_Name;
 L2SAP_file_num : File_Numbr;
{------------------------------------------------------------------
 Aggregate SDU Buffer List
------------------------------------------------------------------}
 buffer_lst : ARRAY [0..( Max_NoWait_Depth - 1 )] OF
 Buffer_Lst_Entry_Template;










