Enable to receive USER defined packets                    

Server

Y

Station

Y

Interrupt

21h

Input

Output

AX

FFh 9Ah     AX
          BX
CX         CX
ES:BX  Address of Receiving Buffer     DX
Notes:  1. The receiving buffer has the following format:
FFh Length D. ID S. ID Code Data ...
1 2 1 1 1 n
           FFh (1 byte) : This is the value of first byte.
           LENGTH (2 bytes) = Length of DATA field + 3

           D.ID (1 byte) : Dest Id = Receiving station Id for ARCnet
                                   = Receiving station Id for Ethernet
                                   = Receiving station Id x 4 for I+ boards
                                or = 0FFh for broadcasting message

           S.ID (1 byte) : Sending station Id
           CODE (1 byte) = 11h (all other codes are reserved for
                                TopWare)
           DATA (maximum 2000 bytes) : Messages have been received

        2. After returning from this function call, the "LENGTH" of the
           field MUST BE checked to determine if a message is actually
           available on the buffer to be received.  If:

           LENGTH     = 0 -> no message available to be received
           LENGTH NOT = 0 -> message available to be received

        3. This function must be re-invoked after the message has been
           received in order to receive the next USER defined message
           (CODE = 11h).

Programming example:

        MOV     AH,0FFh
        MOV     AL,9Ah
        PUSH    CS
        POP     ES
        MOV     BX, offset ReceiveBuffer
        INT 21h
@@1:
        CMP WORD PTR ES:[BX+1],0       ; Check LENGTH field
        JZ  @@1                        ; no message is available
         .
         .                             ; Process message to be received
         .                             ;
        MOV WORD PTR ES:[BX+1],0       ; Clear LENGTH to 0


Copyright © 1985 to 2022 Beta Systems                            Last modified: Wednesday, January 05, 2022 .