*********************************************************
*       Ethernet Programming Example Using Interrupts   *
*                                                       *
* This code is derived from the Ethernet sample code on *
* page 7-272 of the 68360 User's Manual but uses 4      *
* transmit and 4 receive BDs                            *
*                                                       *
* *** Note ****                                         *
* This example will only work properly on the QUADS     *
* board. This is because:                               *
*       a) the Clocks are reversed from the ETH_EX      *
*          code (see the SICR programming)              *
*       b) the Ethernet port is controlled by the       *
*          SLAVE QUICC.                                 *
* This Example Works with the Ethernet Channel on       *
* the slave QUICC on the QUADS board.  It will transmit *
* out onto the AUI or TP port that exists on the QUADS. *
*                                                       *
* This example is almost the same as ETH_EX.ASM, but    *
* modified to use the slave QUICC rather than the       *
* master and use a different SICR setting. It also      *
* doesn't use an interrupt-driven routine due to the    *
* differences in handling interrupts from the slave     *
* QUICC.  					        *
*                                    JS 7/14/94         *
*********************************************************
* Revision History										*
* 7/14/94 - Initial Version								*
* 11/8/94 - Fixed so that it works with 68160			*
* 11/10/94 - took EEST out of full duplex mode			*
*********************************************************
* 1) The code sets up SCC1 in Ethernet mode             *
* 2) It sets up 4 transmit buffer descriptors that      *
* that will send data when the transmitter is enabled.  *
* 3) It sets up 4 receive buffer descriptors to receive *
* the incoming data                                     *
* 5) Finally, it turns on the transmitter and receiver  *
* in normal mode                                        *
*********************************************************
*************************************************************
*
INIT    EQU     $0403000        ; QUADS Board DRAM User Space
*
************************** DUAL PORT RAM
MBAR    EQU     $03FF00 ; Module Base Address, (MBAR)=REGB
SMBAR   EQU     $03FF04 ; Slave Module Base Address
MBARE   EQU     $03FF08 ; Module Base Address Enable SLAVE
*
***********************************************************************
* The following equates assume that they will be used in register
* indirect addressing.  The address register  should hold the base
* address of the QUICC internal memory.  All system equates are
* offsets into this memory
REGB    EQU     $1000   ; Base address of Internal Registers
SCC1PB  EQU     $0C00   ; SCC1 Protocol Base address

************************ SIM Module registers

MCR     EQU     REGB+$0000      ; Module Configuration
AVR     EQU     REGB+$0008      ; Auto Vector
RSR     EQU     REGB+$0009      ; Reset Status
CLKOCR  EQU     REGB+$000C      ; CLKO Control
PPLCR   EQU     REGB+$0010      ; PPL Control
CDVCR   EQU     REGB+$0014      ; Clock Divider Control
*
PEPAR   EQU     REGB+$0016      ; Port E Pin Assignment
*
SYPCR   EQU     REGB+$0022      ; System Protection Control
SWIV    EQU     REGB+$0023      ; S/w Interrupt Vector
PICR    EQU     REGB+$0026      ; Periodic Interrupt Control
PITR    EQU     REGB+$002A      ; Periodic Interrupt Timing
SWSR    EQU     REGB+$002F      ; S/w Service
BKAR    EQU     REGB+$0032      ; Breakpoint Address
BKCQ    EQU     REGB+$0034      ; Breakpoint Control
*
*
************************ CPM Module registers *******************
*
ICCR    EQU     REGB+$0500      ; Channel Configuration
*** SDMA
SDSR    EQU     REGB+$051C      ; SDMA Status
SDCR    EQU     REGB+$051E      ; SDMA Configuration Register
SDAR    EQU     REGB+$0520      ; SDMA Address Register
*** CP Interrupt
CICR    EQU     REGB+$0540      ; CP Interrupt Configuration
CIPR    EQU     REGB+$0544      ; CP Interrupt Pending
CIMR    EQU     REGB+$0548      ; CP Interrupt Mask
CISR    EQU     REGB+$054C      ; CP Interrupt In-service
*** Port A, B, C
PADIR   EQU     REGB+$0550      ; Port A Data Direction Assignment
PAPAR   EQU     REGB+$0552      ; Port A Pin Function Assignment
PAODR   EQU     REGB+$0554      ; Port A Open Drain Assignment
PADAT   EQU     REGB+$0556      ; Port A Data Content
*
PBDIR   EQU     REGB+$06B8      ; Port B Data Direction Assignment
PBPAR   EQU     REGB+$06BC      ; Port B Pin Function Assignment
PBODR   EQU     REGB+$06C0      ; Port B Open Drain Assignment
PBDAT   EQU     REGB+$06C4      ; Port B Data Content
*
PCDIR   EQU     REGB+$0560      ; Port C Data Direction Assignment
PCPAR   EQU     REGB+$0562      ; Port C Pin Assignment
PCSO    EQU     REGB+$0564      ; Port C Special Options
PCDAT   EQU     REGB+$0566      ; Port C Data Content
PCINT   EQU     REGB+$0568      ; Port C Interrupt Control
*** CP
CR      EQU     REGB+$05C0      ; CP Command
RCCR    EQU     REGB+$05C4      ; RISC Configuration
RTER    EQU     REGB+$05D6      ; RISC Timer Event Register
RTMR    EQU     REGB+$05DA      ; RISC Timer Mask Register
* BRG 1, 2, 3, 4
BRGC1   EQU     REGB+$05F0      ; BRG1 Configuration
BRGC2   EQU     REGB+$05F4      ; BRG2 Configuration
BRGC3   EQU     REGB+$05F8      ; BRG3 Configuration
BRGC4   EQU     REGB+$05FC      ; BRG4 Configuration
*** SCC 1, 2, 3, 4
* SCC1
GSMR_L1 EQU     REGB+$0600      ; SCC1 General Mode
GSMR_H1 EQU     REGB+$0604      ; SCC1 General Mode
PSMR1   EQU     REGB+$0608      ; SCC1 Protocol Specific Mode
TODR1   EQU     REGB+$060C      ; SCC1 Transmit On Demand
DSR1    EQU     REGB+$060E      ; SCC1 Data Sync
SCCE1   EQU     REGB+$0610      ; SCC1 Event
SCCM1   EQU     REGB+$0614      ; SCC1 Mask
SCCS1   EQU     REGB+$0617      ; SCC1 Status

*** Serial Interface
SIMODE  EQU     REGB+$06E0      ; SI Mode
SIGMR   EQU     REGB+$06E4      ; SI Global Mode
SISTR   EQU     REGB+$06E6      ; SI Status
SICMR   EQU     REGB+$06E7      ; SI Command
SICR    EQU     REGB+$06EC      ; SI Clock Routing
SIRP    EQU     REGB+$06F0      ; SI RAM Pointer
SIRAM   EQU     REGB+$0700      ; SI Routing RAM

************************ END of SIM/CPM Register MAP

************************ SCC Parameters

****** SCC1
RBASE1  EQU     SCC1PB+$000     ; SCC1 RX BD Base Address
TBASE1  EQU     SCC1PB+$002     ; SCC1 TX BD Base Address
RFCR1   EQU     SCC1PB+$004     ; SCC1 RX Function Code
TFCR1   EQU     SCC1PB+$005     ; SCC1 TX Function Code
MRBLR1  EQU     SCC1PB+$006     ; SCC1 MAX Buffer Length - RX
RSTATE1 EQU     SCC1PB+$008     ; SCC1 RX Internal State
RBPRT1  EQU     SCC1PB+$010     ; SCC1 RX BD Pointer
TSTATE1 EQU     SCC1PB+$018     ; SCC1 TX Internal State
TBPRT1  EQU     SCC1PB+$020     ; SCC1 TX BD Pointer
RCRC1   EQU     SCC1PB+$028     ; SCC1 Temp Receive CRC
TCRC1   EQU     SCC1PB+$02C     ; SCC1 Temp Transmit CRC


************************** Specific Parameters

* SCC1, Ethernet Specific Parameter
C_PRES1      EQU     SCC1PB+$30   ; SCC1 Preset CRC ($FFFFFFFF)
C_MASK1      EQU     SCC1PB+$34   ; SCC1 Constant mask for CRC($20E3DEBB)
CRCEC1       EQU     SCC1PB+$38   ; SCC1 CRC error counter
ALEC1        EQU     SCC1PB+$3C   ; SCC1 alignment error counter
DISFC1       EQU     SCC1PB+$40   ; SCC1 discard frame counter
PADS1        EQU     SCC1PB+$44   ; SCC1 short frame PAD counter
RET_Lim1     EQU     SCC1PB+$46   ; SCC1 retry limit threshold
RET_cnt1     EQU     SCC1PB+$48   ; SCC1 retry limit counter
MFLR1        EQU     SCC1PB+$4A   ; SCC1 max. frame length reg.
MINFLR1      EQU     SCC1PB+$4C   ; SCC1 min. frame length reg.
MAXD11       EQU     SCC1PB+$4E   ; SCC1 max. DMA1 length reg.
MAXD21       EQU     SCC1PB+$50   ; SCC1 max. DMA2 length reg.
MAXD1        EQU     SCC1PB+$52   ; SCC1 Rx max DMA
DMA_cnt1     EQU     SCC1PB+$54   ; SCC1 Rx DMA count
MAX_b1       EQU     SCC1PB+$56   ; SCC1 max BD byte count
GADDR11      EQU     SCC1PB+$58   ; SCC1 Group Addr. Filter 1
GADDR21      EQU     SCC1PB+$5A   ; SCC1 Group Addr. Filter 2
GADDR31      EQU     SCC1PB+$5C   ; SCC1 Group Addr. Filter 3
GADDR41      EQU     SCC1PB+$5E   ; SCC1 Group Addr. Filter 4
TBUF0.data01 EQU     SCC1PB+$60   ; SCC1 save area 0 - current frame
TBUF0.data11 EQU     SCC1PB+$64   ; SCC1 save area 1 - current frame
TBUF0.rba01  EQU     SCC1PB+$68   ; SCC1
TBUF0.crc1   EQU     SCC1PB+$6C   ; SCC1
TBUF0.bcnt1  EQU     SCC1PB+$70   ; SCC1
PADDR1_H1    EQU     SCC1PB+$72   ; physical address 1 (MSB)
PADDR1_M1    EQU     SCC1PB+$74   ; physical address 1
PADDR1_L1    EQU     SCC1PB+$76   ; physical address 1 (LSB)
P_PER1       EQU     SCC1PB+$78   ; persistence
RFBD_ptr1    EQU     SCC1PB+$7A   ; Rx first BD pointer
TFBD_ptr1    EQU     SCC1PB+$7C   ; Tx first BD pointer
TLBD_ptr1    EQU     SCC1PB+$7E   ; Tx last BD pointer
TBUF1.data01 EQU     SCC1PB+$80   ; SCC1 save area 0 - next frame
TBUF1.data11 EQU     SCC1PB+$84   ; SCC1 save area 1 - next frame
TBUF1.rba01  EQU     SCC1PB+$88   ; SCC1
TBUF1.crc1   EQU     SCC1PB+$8C   ; SCC1
TBUF1.bcnt1  EQU     SCC1PB+$90   ; SCC1
TX_len1      EQU     SCC1PB+$92   ; SCC1 Tx frame length counter
IADDR11      EQU     SCC1PB+$94   ; SCC1 Individual Addr. Filter 1
IADDR21      EQU     SCC1PB+$96   ; SCC1 Individual Addr. Filter 2
IADDR31      EQU     SCC1PB+$98   ; SCC1 Individual Addr. Filter 3
IADDR41      EQU     SCC1PB+$9A   ; SCC1 Individual Addr. Filter 4
BOFF_CNT1    EQU     SCC1PB+$9C   ; back off counter
TADDR1_H1    EQU     SCC1PB+$9E   ; temp address  (MSB)
TADDR1_M1    EQU     SCC1PB+$A0   ; temp address
TADDR1_L1    EQU     SCC1PB+$A2   ; temp address  (LSB)

* Program Specific Equates
MBUFS   EQU     $05F0           ; Max Buffer Size = 1520 bytes
SCC1VEC EQU     $1e             ; Vector for SCC1 (5 bits)

* Physical Address is 00-19-22-33-48-55
* This value is programmed into the PADDR entries in the parameter RAM
* table in a byte-reversed manner.
* The SADDR is the "source address" for our demo frames.
* DADDR is the "destination address" for our demo frames.  If the code is
* in loopback, send frames with the same source and destination address.
* Note that the byte order is different in the frame configuration than
* in the PADDR entry in the parameter RAM.

SADDRL  EQU     $0019
SADDRM  EQU     $2233
SADDRH  EQU     $4855
DADDRL  EQU     $0019
DADDRM  EQU     $2233
DADDRH  EQU     $4855

*********
* Start of Program
*********
        ORG     INIT

*** Get Pointer to Base of the master QUICC DPRAM and place it in a5
        move.l  #7,d0           ; "0111" is the function code for CPU Space
        movec   d0,SFC          ; Store "0111" into both the Src Fcn Code Reg
        movec   d0,DFC          ; and the Dest. Fcn Code Reg
        moves.l MBAR,a0         ; Move MBAR into a0
        move.l  a0,d0
        andi.l  #$ffffe000,d0   ; Extract the base address from MBAR
        move.l  d0,a5           ; Move it to a5 for register indexing

*** Get a Pointer to Base of the SLAVE QUICC DPRAM and place it in a4
        move.l  #7,d0           ; "0111" is the function code for CPU Space
        movec   d0,SFC          ; Store "0111" into both the Src Fcn Code Reg
        movec   d0,DFC          ; and the Dest. Fcn Code Reg
        move.l  #$bfffffff,d0
        moves.l d0,MBARE        ; Pull D30 low to assert MBARE* on
*                               ; Slave and place a 1 in the MBAR
*                               ; select bit (bit 31) to allow a write to
*                               ; MBAR on the slave. (This statement
*                               ; assumes a 32-bit data bus. See
*                               ; Section 3.5.1 of the QUADS Manual
*                               ; for 16-bit Bus information)
        moves.l SMBAR,a0        ; Set Slave MBAR
        move.l  a0,d0
        andi.l  #$ffffe000,d0   ; Extract the base address from SMBAR
        move.l  d0,a4           ; Move it to a4 for slave reg index

*** Set up SDMA Control Register for SCCs
        move.w  #$0740,SDCR(a4) ; SDMA interrupt service mask = 7,
*                               ;  bus arbit. priority = 4

*** Set up Port A Pins
* to get PA0, PA1, PA8, and PA9 to be RXD1, TXD1, CLK1, and CLK2
* we set PAPAR, PADIR, and PAODR as in Table 7-16 on page 7-351.
        or.w    #$0303,PAPAR(a4)        ; bits 1,2,8,& 9 must be 1
        and.w   #$FFFD,PAODR(a4)        ; bit 2 must be zero (no open dr)
        and.w   #$FCFC,PADIR(a4)        ; bits 1,2,8, &9  must be 0


*** Set up Port C pins
* to get PC4&PC5 to be CTS1&CD1 and PC0 to be RTS1,
* we set PCPAR, PCDIR, and PCODR as in Table 7-18 on page 7-358.
*** Fix 11/8/94 ***
* must set PC2 high (EEST SC2) to get EEST out of staandby mode
* must set PC7 high (EEST APEN) to allow auto port selection
* also enable other EEST specific lines 
* PC3=TPEN = output from EEST. Ignored
* PC8=TPACE = Set to 1
* PC9=TPSQEL = Set to 1 (active low in EEST)
* PC11=LOOP = Set to 0
*** end fix 11/8/94
*** fix 11/10/94
* PC10=TPFLDL = Set to 1 (active low in EEST)
*** end fix 11/10/94
* However, we don't want to enable PC0(TENA) yet.
        and.w   #$F043,PCPAR(a4)        ; bits 2,3,4,5,7,8-11 must = 0
        or.w    #$0000,PCPAR(a4)        ; and bit 0 must =1
*                                       ; but we will set that later
        and.w   #$FFC6,PCDIR(a4)        ; bits 3,4,5 and 0 = 0
        or.w	#$0F84,PCDIR(a4)		; bits 2,7,8-11 must = 1
        or.w    #$0030,PCSO(a4)         ; bits 4&5 must = 1
*                                       ; bit 0 is a don't care
		and.w	#$FF73,PCSO(a4)			; bit 2,3,7 should = 0
		and.w	#$FFFB,PCDAT(a4)		; bit 2 must be zero
		or.w	#$0780,PCDAT(a4)		; bits 7,8-9 must be 1


* this example is running in normal mode, (which requires external
* clocking from the SIA.) In order to use it in loopback, you have to
* provide clocks.  The demo code can be modified to do this by
* removing the '*'s from the third and fourth lines and commenting
* out the second line.
* It is also necessary to change the PSMR and GSMR settings as
* explained later.

        and.l   #$FFFFFF00,SICR(a4)     ; clear SCC1 entries in SICR
        or.l    #$0000002C,SICR(a4)   ; route CLK1+2 to SCC1 and select NMSI pins
*                                 ; Note that external clocks are being
*                                 ; provided by the transceiver.
*                                 ; NOTE:  TCLK1=CLK1. RCLK1=CLK2.  This is
*                                 ; switched from the example in the manual,
*                                 ; since this was the way the Slave QUICC
*                                 ; happened to be connected to the trans-
*                                 ; ceiver on the QUADS board.

*        move.l  #$00010004,BRGC2(a4) ; if you want to use loopback mode, you have
*        or.l    #$00000009,SICR(a4)  ; generate an int. clock. BRGC2 is generating
*                               ; a clock and this clk is routed to RCLK and
*                               ; TCLK of SCC1. The BRG clock will generate a
*                               ; frequency of 25Mhz/(2+1)=8.33Mhz

*** Set up General SCC Parameters
        move.w  #$0000,RBASE1(a4)       ; Receive BDs start at 0(a4)
        move.w  #$0020,TBASE1(a4)       ; Transmit BDs start at 32(a4)
        move.b  #$18,RFCR1(a4)  ; mot=1(msbyte first), rx function code = 1000
        move.b  #$18,TFCR1(a4)  ; mot=1(msbyte first), tx function code = 1000
        move.w  #MBUFS,MRBLR1(a4)       ; max. bytes per Buffer=MBUFS

*** Execute the INIT RX & TX Parameters for SCC1
        move.w  #$0001,CR(a4)   ; initialize transmit and receive parameter
*                               ; in the parameter ram of scc1


*** Set up Ethernet Specific Parameters
        move.l  #$DEBB20E3,C_MASK1(a4)  ; required setting for 32 Bit CCITT CRC
        move.l  #$FFFFFFFF,C_PRES1(a4)  ; required setting for 32 Bit CCITT CRC
        move.l  #$0,CRCEC1(a4)          ; clear CRC Error Counter
        move.l  #$0,ALEC1(a4)           ; clear Alignment Error Counter
        move.l  #$0,DISFC1(a4)          ; clear Discarded Frame Error Counter
        move.w  #$8888,PADS1(a4)        ; pad character pattern (standard value)
        move.w  #$000F,RET_Lim1(a4)     ; Retry Limit (standard value)
        move.w  #$05EE,MFLR1(a4)        ; Max Frame Length (standard value)
        move.w  #$0040,MINFLR1(a4)      ; Min Frame Length (64 is standard)
        move.w  #$05EE,MAXD11(a4)       ; user tunable parameters
        move.w  #$05EE,MAXD21(a4)       ;  see page 7-255
        move.w  #$05EE,DMA_cnt1(a4)     ; set to same as MFLR1
        move.w  #$0,GADDR11(a4)
        move.w  #$0,GADDR21(a4)         ; reset to zero before entering
        move.w  #$0,GADDR31(a4)         ; values into table
        move.w  #$0,GADDR41(a4)
        move.w  #$5548,PADDR1_H1(a4)    ;  This station address is
        move.w  #$3322,PADDR1_M1(a4)    ;  00-19-22-33-48-55  where 00
        move.w  #$1900,PADDR1_L1(a4)    ;  is the low order byte
        move.w  #$0000,P_PER1(a4)       ; User tunable parameter
        move.w  #$0,IADDR11(a4)
        move.w  #$0,IADDR21(a4)         ; reset to zero before
        move.w  #$0,IADDR31(a4)         ; entering values into table
        move.w  #$0,IADDR41(a4)
        move.w  #$0,TADDR1_H1(a4)
        move.w  #$0,TADDR1_M1(a4)       ; used for entry into table
        move.w  #$0,TADDR1_L1(a4)

*** Set up the Receive BDs
* (set the ready bit after the Buffer pointer is set up)
        move.l  a4,a0
        add.w   RBASE1(a4),a0           ; make pointer to Receive BDs
* BD1
        clr.w   2(a0)                   ; initialize length
        move.l  #RXBUF+0*MBUFS,4(a0)    ; pointer to buffer number 0
        move.w  #$9000,(a0)             ; empty, nowrap, int
* BD2
        clr.w   10(a0)                  ; initialize length
        move.l  #RXBUF+1*MBUFS,12(a0)   ; pointer to buffer number 1
        move.w  #$9000,8(a0)            ; empty, nowrap, int
* BD3
        clr.w   18(a0)                  ; initialize length
        move.l  #RXBUF+2*MBUFS,20(a0)   ; pointer to buffer number 2
        move.w  #$9000,16(a0)           ; empty, nowrap, int
* BD4
        clr.w   26(a0)                  ; initialize length
        move.l  #RXBUF+3*MBUFS,28(a0)   ; pointer to buffer number 3
        move.w  #$b000,24(a0)           ; empty, wrap, int



*** Set up Transmit BDs
* (set the ready bit after the Buffer pointer & length is set up)
        movea.l a4,a0                   ; get pointer to base of DPRAM
        adda.w  TBASE1(a4),a0           ; make pointer to Transmit BDs
* BD1
        move.w  #(TBUF1-TBUF0),2(a0)            ; length 13
        move.l  #TBUF0,4(a0)            ; pointer to buffer #0
        move.w  #$CC00,(a0)             ; ready, pad, nowrap, noint, Xmit CRC, Last
* BD2
        move.w  #(TBUF2-TBUF1),10(a0)           ; length 13
        move.l  #TBUF1,12(a0)           ; pointer to buffer #1
        move.w  #$CC00,8(a0)            ; ready, pad, nowrap, noint, Xmit CRC, Last
* BD3
        move.w  #(TBUF3-TBUF2),18(a0)           ; length 13
        move.l  #TBUF2,20(a0)           ; pointer to buffer #2
        move.w  #$CC00,16(a0)           ; ready, pad, nowrap, noint, Xmit CRC, Last
* BD4
        move.w  #(TBUF4-TBUF3),26(a0)           ; length 13
        move.l  #TBUF3,28(a0)           ; pointer to buffer #3
        move.w  #$EC00,24(a0)           ; ready, pad, nowrap, noint, Xmit CRC, Last


*** Final Set up
        move.w  #$ffff,SCCE1(a4)        ; clear scc1 event register
        move.w  #$0000,SCCM1(a4)        ; no interrupts
        andi.l  #$BFFFFFFF,CIMR(a4)     ; Turn off SCC1 interrupts
        andi.w  #$f8ff,SR               ; Set CPU IMASK to 0

* This example is in normal mode.  To change it to loopback,
* comment out the GSMR_L1 and PSMR setup lines and un-comment
* the corresponding ones.

        move.l   #$00000000,GSMR_H1(a4)

*       move.l   #$1088004C,GSMR_L1(a4) ; SCC1 conf. reg. set to automatic
*                                       ; control of CLSN and RENA, more setup
*                                       ; time for the EEST, loopback and 
*                                       ; ethernet mode.
*                                       ; ENR and ENT are not enabled yet.

        move.l  #$1088000C,GSMR_L1(a4)  ; SCC1 conf. reg. set to automatic
*                                       ; control of CLSN and RENA, more setup
*                                       ; time for the EEST and ethernet mode.
*                                       ; ENR and ENT are not enabled yet.

*       move.w   #$284A,PSMR1(a4)       ; ethernet mode reg. is set to receive
*                                       ; short frames, 32 bit CRC, 
*                                       ; loop operation and begin searching for the
*                                       ; start frame delimiter 22 bits after RENA

        move.w  #$280A,PSMR1(a4)         ; ethernet mode reg. is set to receive
*                                        ; short frames, 32 bit CRC, 
*                                        ; and begin searching for the
*                                        ; start frame delimiter 22 bits after RENA 

        move.w  #$D555,DSR1(a4)
        or.w    #$0001,PCPAR(a4)        ; enable TENA
        ori.l   #$00000030,GSMR_L1(a4)  ; enable transmitter and receiver


self    jmp     self

*** When this code is "done", all four TX Buffers will have been sent (and
*thus the Ready Bit in each BD will be clear). If in loopback mode, three
*receive BDs should have their "E" bits cleared because they have received
*information
*Only three of the four frames should be received into the receive buffers
*starting at INIT+$2000.  The third frame has an address that is not
*recognized by the controller because it has a different destination address.

**** demo data
                ORG INIT+$2000

RXBUF:  ds.b    MBUFS*4                 ; reserve space for 4 buffers


*put data in send buffers
TBUF0:  dc.w    DADDRL,DADDRM,DADDRH  ; dest address
        dc.w    SADDRL,SADDRM,SADDRH  ; source address
        dc.b    12                      ; length
        dc.b    'Frame 1 data'
TBUF1:  dc.w    DADDRL,DADDRM,DADDRH  ; dest address
        dc.w    SADDRL,SADDRM,SADDRH  ; source address
        dc.b    12                      ; length
        dc.b    'Frame 2 data'
TBUF2:  dc.w    $0000,0000,0000         ; dest address
        dc.w    SADDRL,SADDRM,SADDRH  ; source address
        dc.b    16                      ; length
        dc.b    'Unreceived Frame'
TBUF3:  dc.w    $ffff,$ffff,$ffff       ; broadcast address
        dc.w    SADDRL,SADDRM,SADDRH  ; source address
        dc.b    12                      ; length
        dc.b    'Frame 4 data'
TBUF4:                                  
*                                       ; Dummy label




        END




