Google
 

Trailing-Edge - PDP-10 Archives - BB-FB51A-RM - sna-ai/sources/saibls.r36
There are no other files named saibls.r36 in the archive.
%title 'SNA GATEWAY ACCESS INTERFACE FOR BLISS'

! Copyright (c) 1985 by
! DIGITAL EQUIPMENT CORPORATION, Maynard, Massachusetts 01754
!
! This software is furnished under a license and may be used and  copied
! only  in  accordance  with  the  terms  of  such  license and with the
! inclusion of the above copyright notice.  This software or  any  other
! copies  thereof may not be provided or otherwise made available to any
! other person.  No title to and ownership of  the  software  is  hereby
! transferred.
!
! The information in this software is subject to change  without  notice
! and  should  not  be  construed  as  a commitment by Digital Equipment
! Corporation.
!
! Digital assumes no responsibility for the use or  reliability  of  its
! software on equipment which is not supplied by Digital.
!++
%sbttl 'Supporting Macros'

macro $INITIALIZE (BLOCK, BLOCK_SIZE) =
    ch$fill (0, BLOCK_SIZE, ch$ptr (BLOCK,,36)) %;

macro $ASSIGN (ARG1, ARG2) =
    %if not %null (ARG2)
    %then ARG1 = ARG2 %fi %;

macro $VASSIGN (ARG1, ARG2) =
    %if not %null (ARG2)
    %then ARG1 = .ARG2 %fi %;

macro $RETURN (ARG1, ARG2) =
    %if not %null (ARG1)
    %then ARG1 = ARG2 %fi %;
%sbttl 'AACC - Accept Incoming BIND'

keywordmacro AACC (PORT_NUMBER,
                   RETURN_CODE = 0) =
    begin
    local ACCBLK: ARGUMENT_BLOCK;
    external routine
        A_ACC: MAC novalue;

    $INITIALIZE (ACCBLK, ARGUMENT_BLOCK_SIZE);

    ACCBLK[ACC_PORT_NUMBER] = PORT_NUMBER;

    A_ACC (ACCBLK);

    $RETURN (RETURN_CODE, .ACCBLK[ACC_RETURN_CODE]);

    end %;
%sbttl 'AREJ - Reject Connect Request'

keywordmacro AREJ (PORT_NUMBER,
                   SENSE_CODE = 0,
                   RETURN_CODE = 0) =
    begin
    local REJBLK: ARGUMENT_BLOCK;
    external routine
        A_REJ: MAC novalue;

    $INITIALIZE (REJBLK, ARGUMENT_BLOCK_SIZE);

    REJBLK[REJ_PORT_NUMBER] = PORT_NUMBER;
    REJBLK[REJ_SENSE_CODE] = SENSE_CODE;

    A_REJ (REJBLK);

    $RETURN (RETURN_CODE, .REJBLK[REJ_RETURN_CODE]);

    end %;
%sbttl 'ACON - Connect to IBM'

keywordmacro ACON (WORK_AREA_ADDRESS,
                   PSI_CHANNEL = -1,
                   PORT_NUMBER = 0,
                   NODE_NAME = 0,
                   CIRCUIT_ID = 0,
                   PASSWORD = 0,
                   LOGON_MODE = 0,
                   PLU_NAME = 0,
                   USER_NAME = 0,
                   USER_DATA_ADDRESS = 0,
                   USER_DATA_LENGTH = 0,
                   ACCESS,
                   SLU_NUMBER = 0,
                   RETURN_CODE = 0) =
    begin
    local CONBLK: ARGUMENT_BLOCK;
    external routine
        A_CON: MAC novalue;

    $INITIALIZE (CONBLK, ARGUMENT_BLOCK_SIZE);

    CONBLK[WORKING_AREA] = WORK_AREA_ADDRESS;
    CONBLK[INTERRUPT_CHANNEL] = PSI_CHANNEL;
    CONBLK[CON_NODE_NAME] = NODE_NAME;
    CONBLK[CON_CIRCUIT_NAME] = CIRCUIT_ID;
    CONBLK[CON_PASSWORD] = PASSWORD;
    CONBLK[CON_LOGON_MODE] = LOGON_MODE;
    CONBLK[CON_PLU_NAME] = PLU_NAME;
    CONBLK[CON_USER] = USER_NAME;
    CONBLK[CON_ACCESS_NAME] = ACCESS;
    CONBLK[CON_USER_DATA] = USER_DATA_ADDRESS;
    CONBLK[CON_USER_DATA_LENGTH] = USER_DATA_LENGTH;
    CONBLK[CON_SLU_NUMBER] = SLU_NUMBER;

    A_CON (CONBLK);

    PORT_NUMBER = .CONBLK[CON_PORT_NUMBER];
    $RETURN (RETURN_CODE, .CONBLK[CON_RETURN_CODE]);

    end %;
%sbttl 'AREC - Recieve Data Message'

keywordmacro AREC (PORT_NUMBER,
                   DATA_LENGTH,
                   DATA_POINTER,
                   SEQ_NUMBER,
                   RH,
                   RETURN_CODE = 0) =
    begin
    local RECBLK: ARGUMENT_BLOCK;
    external routine
        A_REC: MAC novalue;

    $INITIALIZE (RECBLK, ARGUMENT_BLOCK_SIZE);

    RECBLK[REC_PORT_NUMBER] = PORT_NUMBER;
    RECBLK[REC_DATA_POINTER] = .DATA_POINTER;
    RECBLK[REC_DATA_LENGTH] = .DATA_LENGTH;

    A_REC (RECBLK);

    SEQ_NUMBER = .RECBLK[REC_SEQ_NUMBER];
    RH = .RECBLK[REC_RH];
    DATA_POINTER = .RECBLK[REC_DATA_POINTER];
    DATA_LENGTH = .RECBLK[REC_DATA_LENGTH];
    $RETURN (RETURN_CODE, .RECBLK[REC_RETURN_CODE]);

    end %;
%sbttl 'AREM - Read Expedited Message'


keywordmacro AREM (PORT_NUMBER,
                   DATA_LENGTH,
                   DATA_POINTER,
                   SEQ_NUMBER,
                   RH,
                   RETURN_CODE = 0) =
    begin
    local REMBLK: ARGUMENT_BLOCK;
    external routine
        A_REM: MAC novalue;


    $INITIALIZE (REMBLK, ARGUMENT_BLOCK_SIZE);

    REMBLK[REM_PORT_NUMBER] = PORT_NUMBER;
    REMBLK[REM_DATA] = DATA_POINTER;
    REMBLK[REM_DATA_LENGTH] = .DATA_LENGTH;

    A_REM (REMBLK);

    SEQ_NUMBER = .REMBLK[REM_SEQ_NUMBER];
    RH = .REMBLK[REM_RH];
    DATA_LENGTH = .REMBLK[REM_DATA_LENGTH];
    $RETURN (RETURN_CODE, .REMBLK[REM_RETURN_CODE]);

    end %;
%sbttl 'ARDE - Read Data Event'

keywordmacro ARDE (PORT_NUMBER,
                   ERROR = 0,
                   STATE = 0,
                   DATA_AVAILABLE = 0,
                   INTERRUPT_AVAILABLE = 0,
                   RETURN_CODE = 0) =
    begin
    local RDEBLK: ARGUMENT_BLOCK;
    external routine
        A_RDE: MAC novalue;

    $INITIALIZE (RDEBLK, ARGUMENT_BLOCK_SIZE);

    RDEBLK[RDE_PORT_NUMBER] = PORT_NUMBER;

    A_RDE (RDEBLK);

    ERROR = .RDEBLK[RDE_ERROR];
    STATE = .RDEBLK[RDE_STATE];
    DATA_AVAILABLE = .RDEBLK[RDE_DATA_AVAILABLE];
    INTERRUPT_AVAILABLE = .RDEBLK[RDE_INTERRUPT_AVAILABLE];
    $RETURN (RETURN_CODE, .RDEBLK[RDE_RETURN_CODE]);

    end %;
%sbttl 'ARAD - Read Abort Data'

keywordmacro ARAD (PORT_NUMBER,
                   ABORT_STATUS = 0,
                   ABORT_REASON = 0,
                   SENSE_CODE = 0,
                   STATE = 0,
                   LENGTH = 0,
                   DATA_PTR = 0,
                   RETURN_CODE = 0) =
    begin
    local RADBLK: ARGUMENT_BLOCK;
    external routine
        A_RAD: MAC novalue;

    $INITIALIZE (RADBLK, ARGUMENT_BLOCK_SIZE);

    RADBLK[RAD_PORT_NUMBER] = PORT_NUMBER;
    RADBLK[RAD_DATA] = DATA_PTR;

    A_RAD (RADBLK);

    ABORT_STATUS = .RADBLK[RAD_ABORT_STATUS];
    ABORT_REASON = .RADBLK[RAD_ABORT_REASON];
    SENSE_CODE = .RADBLK[RAD_SENSE_CODE];
    STATE = .RADBLK[RAD_STATE];
    LENGTH = .RADBLK[RAD_LENGTH];
    $RETURN (RETURN_CODE, .RADBLK[RAD_RETURN_CODE]);

    end %;
%sbttl 'ARBD - Read BINDDATA'

keywordmacro ARBD (PORT_NUMBER,
                   LENGTH,
                   DATA_PTR,
                   RETURN_CODE = 0) =
    begin
    local RBDBLK: ARGUMENT_BLOCK;
    external routine
        A_RBD: MAC novalue;

    $INITIALIZE (RBDBLK, ARGUMENT_BLOCK_SIZE);

    RBDBLK[RBD_PORT_NUMBER] = PORT_NUMBER;
    RBDBLK[RBD_BIND_DATA] = DATA_PTR;

    A_RBD (RBDBLK);

    LENGTH = .RBDBLK[RBD_BIND_LENGTH];
    $RETURN (RETURN_CODE, .RBDBLK[RBD_RETURN_CODE]);

    end %;
%sbttl 'ARCN - Recconect'

keywordmacro ARCN (PORT_NUMBER,
                   RETURN_CODE = 0) =
    begin
    local RCNBLK: ARGUMENT_BLOCK;
    external routine
        A_RCN: MAC novalue;

    $INITIALIZE (RCNBLK, ARGUMENT_BLOCK_SIZE);

    RCNBLK[RCN_PORT_NUMBER] = PORT_NUMBER;

    A_RCN (RCNBLK);

    $RETURN (RETURN_CODE, .RCNBLK[RCN_RETURN_CODE]);

    end %;
%sbttl 'ATRA - Transmit Data Message'

keywordmacro ATRA (PORT_NUMBER,
                   DATA_TYPE,
                   DATA_LENGTH,
                   DATA_POINTER,
                   SEQ_NUMBER,
                   RH,
                   RETURN_CODE = 0) =
    begin
    local TRABLK: ARGUMENT_BLOCK;
    external routine
        A_TRA: MAC novalue;

    $INITIALIZE (TRABLK, ARGUMENT_BLOCK_SIZE);

    TRABLK[TRA_PORT_NUMBER] = PORT_NUMBER;
    TRABLK[TRA_DATA_TYPE] = DATA_TYPE;
    TRABLK[TRA_DATA_LENGTH] = .DATA_LENGTH;
    TRABLK[TRA_DATA_POINTER] = .DATA_POINTER; 
    TRABLK[TRA_SEQ_NUMBER] = SEQ_NUMBER;
    TRABLK[TRA_RH] = RH;

    A_TRA (TRABLK);


    DATA_POINTER = .TRABLK[TRA_DATA_POINTER];
    $RETURN (RETURN_CODE, .TRABLK[TRA_RETURN_CODE]);

    end %;
%sbttl 'ATER - Terminate Port Access'

keywordmacro ATER (PORT_NUMBER,
                   SENSE_CODE,
                   RETURN_CODE = 0) =
    begin
    local TERBLK: ARGUMENT_BLOCK;
    external routine
        A_TER: MAC novalue;

    $INITIALIZE (TERBLK, ARGUMENT_BLOCK_SIZE);

    TERBLK[TER_PORT_NUMBER] = PORT_NUMBER;
    TERBLK[TER_SENSE_CODE] = SENSE_CODE;

    A_TER (TERBLK);

    $RETURN (RETURN_CODE, .TERBLK[TER_RETURN_CODE]);

    end %;
%sbttl 'ALIS - Listen Incoming Connect'

keywordmacro ALIS (WORK_AREA_ADDRESS,
                   PORT_NUMBER,
                   PSI_CHANNEL = -1,
                   NODE_NAME = 0,
                   CIRCUIT_NAME = 0,
                   ACCESS,
                   SLU_NUMBER = 0,
                   RETURN_CODE = 0) =
    begin
    local LISBLK: ARGUMENT_BLOCK;
    external routine
        A_LIS: MAC novalue;

    $INITIALIZE (LISBLK, ARGUMENT_BLOCK_SIZE);

    LISBLK[WORKING_AREA] = WORK_AREA_ADDRESS;
    LISBLK[INTERRUPT_CHANNEL] = PSI_CHANNEL;
    LISBLK[LIS_NODE_NAME] = NODE_NAME;
    LISBLK[LIS_CIRCUIT_NAME] = CIRCUIT_NAME;
    LISBLK[LIS_ACCESS_NAME] = ACCESS;
    LISBLK[LIS_SLU_NUMBER] = SLU_NUMBER;

    A_LIS (LISBLK);

    PORT_NUMBER = .LISBLK[LIS_PORT_NUMBER];
    $RETURN (RETURN_CODE, .LISBLK[LIS_RETURN_CODE]);

    end %;
! Local Modes:
! Mode:BLISS
! Auto Save Mode:2
! Comment Column:40
! Comment Rounding:+1
! End: