//////////////////////////////////////////////////////////////////////////////
//                                                                           /
// IAR ARM ANSI C/C++ Compiler V4.11A/W32              20/Jul/2004  18:58:50 /
// Copyright 1999-2004 IAR Systems. All rights reserved.                     /
//                                                                           /
//    Cpu mode        =  arm                                                 /
//    Endian          =  little                                              /
//    Stack alignment =  4                                                   /
//    Source file     =  C:\medusa\zl_frame.c                                /
//    Command line    =  -I "C:\Program Files\IAR Systems\Embedded           /
//                       Workbench 4.0\ARM\INC\" -lc C:\medusa\Debug\List\   /
//                       -la C:\medusa\Debug\List\ -o C:\medusa\Debug\Obj\   /
//                       -s2 --no_cse --no_unroll --no_inline                /
//                       --no_code_motion --no_tbaa --no_clustering          /
//                       --no_scheduling --debug --cpu_mode arm --endian     /
//                       little --cpu ARM7TDMI-S --stack_align 4 -e --fpu    /
//                       None "-D_DLIB_CONFIG_FILE=C:\Program Files\IAR      /
//                       Systems\Embedded Workbench                          /
//                       4.0\ARM\LIB\dl4tpannl8n.h" C:\medusa\zl_frame.c     /
//    List file       =  C:\medusa\Debug\List\zl_frame.s79                   /
//                                                                           /
//                                                                           /
//////////////////////////////////////////////////////////////////////////////

        NAME zl_frame

        RTMODEL "ARMv4M", "USED"
        RTMODEL "StackAlign4", "USED"
        RTMODEL "__cpu_mode", "__pcs__arm"
        RTMODEL "__data_model", "absolute"
        RTMODEL "__dlib_file_descriptor", "0"
        RTMODEL "__endian", "little"
        RTMODEL "__rt_version", "6"

        RSEG CSTACK:DATA:NOROOT(2)

??DataTable0 EQU 0
??DataTable1 EQU 0
??DataTable10 EQU 0
??DataTable2 EQU 0
??DataTable3 EQU 0
??DataTable4 EQU 0
??DataTable5 EQU 0
??DataTable6 EQU 0
??DataTable8 EQU 0
??DataTable9 EQU 0
        PUBWEAK ?init?tab?DATA_Z
        MULTWEAK cliRegisterCommand??rA
        MULTWEAK clicharGetOutputBuffer??rA
        MULTWEAK clicharSendOutputBuffer??rA
        FUNCTION frecvHandler,0603H
        LOCFRAME CSTACK, 32, STACK
        FUNCTION fsendHandler,0603H
        LOCFRAME CSTACK, 32, STACK
        FUNCTION fshowHandler,0603H
        LOCFRAME CSTACK, 20, STACK
        MULTWEAK sprintf??rA
        MULTWEAK strtol??rA
        MULTWEAK strutilHexdump??rA
        MULTWEAK zarlinkCommandWrite??rA
        PUBLIC zarlinkEthFrameRead
        FUNCTION zarlinkEthFrameRead,0203H
        LOCFRAME CSTACK, 36, STACK
        PUBLIC zarlinkEthFrameWrite
        FUNCTION zarlinkEthFrameWrite,0203H
        LOCFRAME CSTACK, 40, STACK
        PUBLIC zarlinkFrameInit
        FUNCTION zarlinkFrameInit,0203H
        LOCFRAME CSTACK, 4, STACK
        MULTWEAK zarlinkFrameRead??rA
        MULTWEAK zarlinkFrameWrite??rA
        MULTWEAK zarlinkStatusRead??rA
        
        CFI Names cfiNames0
        CFI StackFrame CFA R13 HUGEDATA
        CFI Resource R0:32, R1:32, R2:32, R3:32, R4:32, R5:32, R6:32, R7:32
        CFI Resource R8:32, R9:32, R10:32, R11:32, R12:32, CPSR:32, R13:32
        CFI Resource R14:32, SPSR:32
        CFI VirtualResource ?RET:32
        CFI EndNames cfiNames0
        
        CFI Common cfiCommon0 Using cfiNames0
        CFI CodeAlign 4
        CFI DataAlign 4
        CFI ReturnAddress ?RET CODE
        CFI CFA R13+0
        CFI R0 Undefined
        CFI R1 Undefined
        CFI R2 Undefined
        CFI R3 Undefined
        CFI R4 SameValue
        CFI R5 SameValue
        CFI R6 SameValue
        CFI R7 SameValue
        CFI R8 SameValue
        CFI R9 SameValue
        CFI R10 SameValue
        CFI R11 SameValue
        CFI R12 Undefined
        CFI CPSR SameValue
        CFI R14 Undefined
        CFI SPSR SameValue
        CFI ?RET R14
        CFI EndCommon cfiCommon0
        
cliRegisterCommand  SYMBOL "cliRegisterCommand"
clicharGetOutputBuffer SYMBOL "clicharGetOutputBuffer"
clicharSendOutputBuffer SYMBOL "clicharSendOutputBuffer"
sprintf             SYMBOL "sprintf"
strtol              SYMBOL "strtol"
strutilHexdump      SYMBOL "strutilHexdump"
zarlinkCommandWrite SYMBOL "zarlinkCommandWrite"
zarlinkFrameRead    SYMBOL "zarlinkFrameRead"
zarlinkFrameWrite   SYMBOL "zarlinkFrameWrite"
zarlinkStatusRead   SYMBOL "zarlinkStatusRead"
cliRegisterCommand??rA SYMBOL "??rA", cliRegisterCommand
clicharGetOutputBuffer??rA SYMBOL "??rA", clicharGetOutputBuffer
clicharSendOutputBuffer??rA SYMBOL "??rA", clicharSendOutputBuffer
sprintf??rA         SYMBOL "??rA", sprintf
strtol??rA          SYMBOL "??rA", strtol
strutilHexdump??rA  SYMBOL "??rA", strutilHexdump
zarlinkCommandWrite??rA SYMBOL "??rA", zarlinkCommandWrite
zarlinkFrameRead??rA SYMBOL "??rA", zarlinkFrameRead
zarlinkFrameWrite??rA SYMBOL "??rA", zarlinkFrameWrite
zarlinkStatusRead??rA SYMBOL "??rA", zarlinkStatusRead

        EXTERN cliRegisterCommand
        FUNCTION cliRegisterCommand,0202H
        EXTERN clicharGetOutputBuffer
        FUNCTION clicharGetOutputBuffer,0202H
        EXTERN clicharSendOutputBuffer
        FUNCTION clicharSendOutputBuffer,0202H
        EXTERN sprintf
        FUNCTION sprintf,010202H
        EXTERN strtol
        FUNCTION strtol,010202H
        EXTERN strutilHexdump
        FUNCTION strutilHexdump,0202H
        EXTERN zarlinkCommandWrite
        FUNCTION zarlinkCommandWrite,0202H
        EXTERN zarlinkFrameRead
        FUNCTION zarlinkFrameRead,0202H
        EXTERN zarlinkFrameWrite
        FUNCTION zarlinkFrameWrite,0202H
        EXTERN zarlinkStatusRead
        FUNCTION zarlinkStatusRead,0202H


        RSEG DATA_Z:DATA:SORT:NOROOT(2)
frameStatusData:
        DS8 8

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock0 Using cfiCommon0
        CFI Function zarlinkEthFrameWrite
   CODE32      
zarlinkEthFrameWrite:
   STMDB       SP!,{R4-R11,LR}    ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI R11 Frame(CFA, -8)
        CFI R10 Frame(CFA, -12)
        CFI R9 Frame(CFA, -16)
        CFI R8 Frame(CFA, -20)
        CFI R7 Frame(CFA, -24)
        CFI R6 Frame(CFA, -28)
        CFI R5 Frame(CFA, -32)
        CFI R4 Frame(CFA, -36)
        CFI CFA R13+36
   SUB         SP,SP,#+0x4
        CFI CFA R13+40
   MOV         R4,R0
   MOV         R5,R1
   MOV         R6,R2
   CMP         R5,#+0x0
   BNE         ??zarlinkEthFrameWrite_0
   MVN         R0,#+0x0
   B           ??zarlinkEthFrameWrite_1
??zarlinkEthFrameWrite_0:
   MOV         R4,R4, LSL #+16
   MOVS        R4,R4, LSR #+16
   CMP         R4,#+0x40
   BCS         ??zarlinkEthFrameWrite_2
   MOV         R0,#+0x40
   MOV         R4,R0
??zarlinkEthFrameWrite_2:
   MOV         R1,#+0x0
   MOV         R7,R1
??zarlinkEthFrameWrite_3:
   CMP         R7,#+0x8
   BGE         ??zarlinkEthFrameWrite_4
   LDR         R2,??DataTable7    ;; frameStatusData
   MOV         R3,#+0x0
   STRB        R3,[R7, +R2]
   ADDS        R7,R7,#+0x1
   B           ??zarlinkEthFrameWrite_3
??zarlinkEthFrameWrite_4:
   MOV         R12,#+0x0
   MOV         R9,R12
   MOV         LR,R4
   MOV         LR,LR, LSL #+16
   MOVS        LR,LR, LSR #+16
   TST         LR,#+0x7
   BEQ         ??zarlinkEthFrameWrite_5
   ANDS        R0,R4,#+0x7
   RSBS        R1,R0,#+0x8
   MOV         R9,R1
??zarlinkEthFrameWrite_5:
   MOV         R2,R4
   MOV         R2,R2, LSL #+16
   MOVS        R2,R2, LSR #+16
   MOV         R3,R9
   MOV         R3,R3, LSL #+16
   MOVS        R3,R3, LSR #+16
   ADDS        R12,R3,R2
   MOV         LR,R12, LSL #+18
   MOVS        LR,LR, LSR #+18
   MOV         R10,LR
   STRH        R10,[SP, #+0]
   LDR         R1,??DataTable7    ;; frameStatusData
   LDRB        R3,[SP, #+0]
   STRB        R3,[R1, #+0]
   LDR         R12,??DataTable7   ;; frameStatusData
   LDRB        R0,[SP, #+1]
   ANDS        R0,R0,#+0xFF       ;; Zero extend
   ORRS        R1,R0,#+0x40
   STRB        R1,[R12, #+1]
   MOV         R3,#+0x1
   MOV         R12,R3, LSL R6
   STRH        R12,[SP, #+0]
   LDRH        R0,[SP, #+0]
   MOV         R0,R0, LSL #+22
   MOV         R0,R0, LSR #+22
   STRH        R0,[SP, #+0]
   LDR         R1,??DataTable7    ;; frameStatusData
   LDRB        R3,[SP, #+0]
   STRB        R3,[R1, #+6]
   LDR         R12,??DataTable7   ;; frameStatusData
   LDRB        R0,[SP, #+1]
   ANDS        R0,R0,#+0xFF       ;; Zero extend
   ORRS        R1,R0,#+0x4
   STRB        R1,[R12, #+7]
   MOV         R2,#+0x0
   MOV         R7,R2
??zarlinkEthFrameWrite_6:
   CMP         R7,#+0x3E8
   BGE         ??zarlinkEthFrameWrite_7
   _BLF        zarlinkStatusRead,zarlinkStatusRead??rA
   MOV         R8,R0
   MOV         R3,R8
   ANDS        R3,R3,#+0xFF       ;; Zero extend
   TST         R3,#+0x10
   BNE         ??zarlinkEthFrameWrite_7
   ADDS        R7,R7,#+0x1
   B           ??zarlinkEthFrameWrite_6
??zarlinkEthFrameWrite_7:
   MOV         R12,R8
   ANDS        R12,R12,#+0xFF     ;; Zero extend
   TST         R12,#+0x10
   BNE         ??zarlinkEthFrameWrite_8
   MVN         R0,#+0x0
   B           ??zarlinkEthFrameWrite_1
??zarlinkEthFrameWrite_8:
   LDR         LR,??DataTable7    ;; frameStatusData
   MOV         R11,LR
   MOV         R0,#+0x0
   MOV         R7,R0
??zarlinkEthFrameWrite_9:
   CMP         R7,#+0x4
   BGE         ??zarlinkEthFrameWrite_10
   MOV         R1,#+0x2
   MLAS        R2,R1,R7,R11
   LDRH        R0,[R2, #+0]
   _BLF        zarlinkFrameWrite,zarlinkFrameWrite??rA
   ADDS        R7,R7,#+0x1
   B           ??zarlinkEthFrameWrite_9
??zarlinkEthFrameWrite_10:
   MOV         R3,#+0x0
   MOV         R7,R3
??zarlinkEthFrameWrite_11:
   CMP         R7,#+0x3E8
   BGE         ??zarlinkEthFrameWrite_12
   _BLF        zarlinkStatusRead,zarlinkStatusRead??rA
   MOV         R8,R0
   MOV         R12,R8
   ANDS        R12,R12,#+0xFF     ;; Zero extend
   TST         R12,#+0x10
   BNE         ??zarlinkEthFrameWrite_12
   ADDS        R7,R7,#+0x1
   B           ??zarlinkEthFrameWrite_11
??zarlinkEthFrameWrite_12:
   MOV         LR,R8
   ANDS        LR,LR,#+0xFF       ;; Zero extend
   TST         LR,#+0x10
   BNE         ??zarlinkEthFrameWrite_13
   MVN         R0,#+0x1
   B           ??zarlinkEthFrameWrite_1
??zarlinkEthFrameWrite_13:
   MOV         R11,R5
??zarlinkEthFrameWrite_14:
   MOV         R10,R10, LSL #+16
   MOVS        R10,R10, LSR #+16
   CMP         R10,#+0x1
   BCC         ??zarlinkEthFrameWrite_15
   MOV         R0,#+0x0
   MOV         R7,R0
??zarlinkEthFrameWrite_16:
   MOV         R10,R10, LSL #+16
   MOVS        R10,R10, LSR #+16
   CMP         R10,#+0x1
   BCC         ??zarlinkEthFrameWrite_17
   CMP         R7,#+0x8
   BGE         ??zarlinkEthFrameWrite_17
   MOV         R1,R9
   MOV         R1,R1, LSL #+16
   MOVS        R1,R1, LSR #+16
   MOV         R2,R10
   MOV         R2,R2, LSL #+16
   MOVS        R2,R2, LSR #+16
   CMP         R1,R2
   BGE         ??zarlinkEthFrameWrite_18
   LDRH        R0,[R11, #+0]
   _BLF        zarlinkFrameWrite,zarlinkFrameWrite??rA
   ADDS        R11,R11,#+0x2
   B           ??zarlinkEthFrameWrite_19
??zarlinkEthFrameWrite_18:
   MOV         R0,#+0x0
   _BLF        zarlinkFrameWrite,zarlinkFrameWrite??rA
??zarlinkEthFrameWrite_19:
   MOV         R3,#+0xFE
   ORR         R3,R3,#+0xFF00
   ADDS        R10,R10,R3
   ADDS        R7,R7,#+0x1
   B           ??zarlinkEthFrameWrite_16
??zarlinkEthFrameWrite_17:
   MOV         R12,#+0x0
   MOV         R7,R12
??zarlinkEthFrameWrite_20:
   CMP         R7,#+0x3E8
   BGE         ??zarlinkEthFrameWrite_21
   _BLF        zarlinkStatusRead,zarlinkStatusRead??rA
   MOV         R8,R0
   MOV         LR,R8
   ANDS        LR,LR,#+0xFF       ;; Zero extend
   TST         LR,#+0x10
   BNE         ??zarlinkEthFrameWrite_21
   ADDS        R7,R7,#+0x1
   B           ??zarlinkEthFrameWrite_20
??zarlinkEthFrameWrite_21:
   MOV         R0,R8
   ANDS        R0,R0,#+0xFF       ;; Zero extend
   TST         R0,#+0x10
   BNE         ??zarlinkEthFrameWrite_14
   MVN         R0,#+0x2
   B           ??zarlinkEthFrameWrite_1
??zarlinkEthFrameWrite_15:
   MOV         R1,#+0x0
   MOV         R7,R1
??zarlinkEthFrameWrite_22:
   CMP         R7,#+0x3E8
   BGE         ??zarlinkEthFrameWrite_23
   _BLF        zarlinkStatusRead,zarlinkStatusRead??rA
   MOV         R8,R0
   MOV         R2,R8
   ANDS        R2,R2,#+0xFF       ;; Zero extend
   TST         R2,#+0x10
   BNE         ??zarlinkEthFrameWrite_23
   ADDS        R7,R7,#+0x1
   B           ??zarlinkEthFrameWrite_22
??zarlinkEthFrameWrite_23:
   MOV         R3,R8
   ANDS        R3,R3,#+0xFF       ;; Zero extend
   TST         R3,#+0x10
   BNE         ??zarlinkEthFrameWrite_24
   MVN         R0,#+0x3
   B           ??zarlinkEthFrameWrite_1
??zarlinkEthFrameWrite_24:
   MOV         R0,#+0x10
   _BLF        zarlinkCommandWrite,zarlinkCommandWrite??rA
   MOV         R0,#+0x0
??zarlinkEthFrameWrite_1:
   ADD         SP,SP,#+0x4        ;; stack cleaning
        CFI CFA R13+36
   LDMIA       SP!,{R4-R11,PC}    ;; return
        CFI EndBlock cfiBlock0

        RSEG DATA_Z:DATA:SORT:NOROOT(2)
recvFrameBuffer:
        DS8 1536

        RSEG DATA_Z:DATA:SORT:NOROOT(1)
lastRecvFrameLen:
        DS8 2

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock1 Using cfiCommon0
        CFI Function zarlinkEthFrameRead
   CODE32      
zarlinkEthFrameRead:
   STMDB       SP!,{R4-R11,LR}    ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI R11 Frame(CFA, -8)
        CFI R10 Frame(CFA, -12)
        CFI R9 Frame(CFA, -16)
        CFI R8 Frame(CFA, -20)
        CFI R7 Frame(CFA, -24)
        CFI R6 Frame(CFA, -28)
        CFI R5 Frame(CFA, -32)
        CFI R4 Frame(CFA, -36)
        CFI CFA R13+36
   MOV         R8,R0
   MOV         R9,R1
   MVN         R0,#+0x0
   MOV         R11,R0
   CMP         R9,#+0x0
   BNE         ??zarlinkEthFrameRead_0
   LDR         R1,??DataTable12   ;; recvFrameBuffer
   MOV         R9,R1
??zarlinkEthFrameRead_0:
   LDR         R2,??DataTable7    ;; frameStatusData
   MOV         R6,R2
   MOV         R3,#+0x0
   MOV         R7,R3
   MOV         R12,#+0x0
   MOV         R10,R12
??zarlinkEthFrameRead_1:
   CMP         R10,#+0x4
   BGE         ??zarlinkEthFrameRead_2
   _BLF        zarlinkFrameRead,zarlinkFrameRead??rA
   MOV         LR,#+0x2
   MLAS        R1,LR,R10,R6
   STRH        R0,[R1, #+0]
   ADDS        R10,R10,#+0x1
   B           ??zarlinkEthFrameRead_1
??zarlinkEthFrameRead_2:
   MOV         R0,#+0x0
   MOV         R10,R0
??zarlinkEthFrameRead_3:
   CMP         R10,#+0x3E8
   BGE         ??zarlinkEthFrameRead_4
   _BLF        zarlinkStatusRead,zarlinkStatusRead??rA
   MOV         R4,R0
   MOV         R2,R4
   ANDS        R2,R2,#+0xFF       ;; Zero extend
   TST         R2,#+0x8
   BNE         ??zarlinkEthFrameRead_4
   ADDS        R10,R10,#+0x1
   B           ??zarlinkEthFrameRead_3
??zarlinkEthFrameRead_4:
   MOV         R3,R4
   ANDS        R3,R3,#+0xFF       ;; Zero extend
   TST         R3,#+0x8
   BNE         ??zarlinkEthFrameRead_5
   MVN         R12,#+0x0
   MOV         R11,R12
??zarlinkEthFrameRead_5:
   MOV         LR,R4
   ANDS        LR,LR,#+0xFF       ;; Zero extend
   TST         LR,#+0x20
   BEQ         ??zarlinkEthFrameRead_6
   MOV         R1,#+0x1
   MOV         R7,R1
??zarlinkEthFrameRead_6:
   MOV         R0,#+0x0
   MOV         R5,R0
   LDR         R2,??DataTable11   ;; lastRecvFrameLen
   MOV         R3,#+0x0
   STRH        R3,[R2, #+0]
   MOV         R6,R9
??zarlinkEthFrameRead_7:
   MOV         R12,#+0x0
   MOV         R10,R12
??zarlinkEthFrameRead_8:
   CMP         R10,#+0x4
   BGE         ??zarlinkEthFrameRead_9
   _BLF        zarlinkFrameRead,zarlinkFrameRead??rA
   STRH        R0,[R6, #+0]
   ADDS        R6,R6,#+0x2
   ADDS        R5,R5,#+0x2
   ADDS        R10,R10,#+0x1
   B           ??zarlinkEthFrameRead_8
??zarlinkEthFrameRead_9:
   CMP         R7,#+0x0
   BNE         ??zarlinkEthFrameRead_10
   MOV         LR,#+0x0
   MOV         R10,LR
??zarlinkEthFrameRead_11:
   CMP         R10,#+0x3E8
   BGE         ??zarlinkEthFrameRead_12
   _BLF        zarlinkStatusRead,zarlinkStatusRead??rA
   MOV         R4,R0
   MOV         R1,R4
   ANDS        R1,R1,#+0xFF       ;; Zero extend
   TST         R1,#+0x8
   BNE         ??zarlinkEthFrameRead_12
   ADDS        R10,R10,#+0x1
   B           ??zarlinkEthFrameRead_11
??zarlinkEthFrameRead_12:
   MOV         R0,R4
   ANDS        R0,R0,#+0xFF       ;; Zero extend
   TST         R0,#+0x8
   BNE         ??zarlinkEthFrameRead_13
   MVN         R2,#+0x1
   MOV         R11,R2
   B           ??zarlinkEthFrameRead_14
??zarlinkEthFrameRead_13:
   _BLF        zarlinkStatusRead,zarlinkStatusRead??rA
   MOV         R4,R0
   MOV         R3,R4
   ANDS        R3,R3,#+0xFF       ;; Zero extend
   TST         R3,#+0x20
   BEQ         ??zarlinkEthFrameRead_7
   MOV         R12,#+0x1
   MOV         R7,R12
   B           ??zarlinkEthFrameRead_7
??zarlinkEthFrameRead_10:
   MOV         LR,#+0x0
   MOV         R11,LR
??zarlinkEthFrameRead_14:
   MOV         R0,#+0x8
   _BLF        zarlinkCommandWrite,zarlinkCommandWrite??rA
   CMP         R8,#+0x0
   BEQ         ??zarlinkEthFrameRead_15
   MOV         R1,R5
   STRH        R1,[R8, #+0]
??zarlinkEthFrameRead_15:
   LDR         R0,??DataTable11   ;; lastRecvFrameLen
   MOV         R2,R5
   STRH        R2,[R0, #+0]
   MOV         R0,R11
   LDMIA       SP!,{R4-R11,PC}    ;; return
        CFI EndBlock cfiBlock1

        RSEG CODE:CODE:NOROOT(2)
   DATA        
??DataTable7:
   DC32        frameStatusData

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock2 Using cfiCommon0
        CFI Function fsendHandler
   CODE32      
fsendHandler:
   STMDB       SP!,{R4-R9,LR}     ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI R9 Frame(CFA, -8)
        CFI R8 Frame(CFA, -12)
        CFI R7 Frame(CFA, -16)
        CFI R6 Frame(CFA, -20)
        CFI R5 Frame(CFA, -24)
        CFI R4 Frame(CFA, -28)
        CFI CFA R13+28
   SUB         SP,SP,#+0x4
        CFI CFA R13+32
   MOV         R6,R0
   MOV         R7,R1
   MOV         R8,R2
   MVN         R0,#+0x0
   MOV         R9,R0
   MOV         R0,SP
   _BLF        clicharGetOutputBuffer,clicharGetOutputBuffer??rA
   MOV         R4,R0
   CMP         R6,#+0x2
   BGE         ??fsendHandler_0
   LDR         R2,[R7, #+0]
   LDR         R1,??fsendHandler_1  ;; `?<Constant "%s: sending eth frame...">`
   MOV         R0,R4
   _BLF        sprintf,sprintf??rA
   MOV         R1,#+0x1F
   MOV         R5,R1
   B           ??fsendHandler_2
??fsendHandler_0:
   CMP         R6,#+0x2
   BNE         ??fsendHandler_3
   MOV         R2,#+0x10
   MOV         R1,#+0x0
   LDR         R0,[R7, #+4]
   _BLF        strtol,strtol??rA
   MOV         R5,R0
   MOV         R3,R5
   ANDS        R3,R3,#+0xFF       ;; Zero extend
   LDR         R2,[R7, #+0]
   LDR         R1,??fsendHandler_1+4  ;; `?<Constant "%s: sending eth frame...">_1`
   MOV         R0,R4
   _BLF        sprintf,sprintf??rA
   B           ??fsendHandler_2
??fsendHandler_3:
   MOV         R0,R9
   B           ??fsendHandler_4
??fsendHandler_2:
   LDR         R1,[SP, #+0]
   MOV         R0,R4
   _BLF        clicharSendOutputBuffer,clicharSendOutputBuffer??rA
   MOV         R2,R5
   ANDS        R2,R2,#+0xFF       ;; Zero extend
   MOV         R1,#+0x0
   MOV         R0,#+0x0
   BL          zarlinkEthFrameWrite
??fsendHandler_4:
   ADD         SP,SP,#+0x4        ;; stack cleaning
        CFI CFA R13+28
   LDMIA       SP!,{R4-R9,PC}     ;; return
   DATA        
??fsendHandler_1:
   DC32        `?<Constant "%s: sending eth frame...">`
   DC32        `?<Constant "%s: sending eth frame...">_1`
        CFI EndBlock cfiBlock2

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock3 Using cfiCommon0
        CFI Function frecvHandler
   CODE32      
frecvHandler:
   STMDB       SP!,{R4-R8,LR}     ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI R8 Frame(CFA, -8)
        CFI R7 Frame(CFA, -12)
        CFI R6 Frame(CFA, -16)
        CFI R5 Frame(CFA, -20)
        CFI R4 Frame(CFA, -24)
        CFI CFA R13+24
   SUB         SP,SP,#+0x8
        CFI CFA R13+32
   MOV         R4,R0
   MOV         R5,R1
   MOV         R6,R2
   MVN         R0,#+0x0
   MOV         R7,R0
   MOV         R0,SP
   _BLF        clicharGetOutputBuffer,clicharGetOutputBuffer??rA
   MOV         R8,R0
   MOV         R1,#+0x0
   ADD         R0,SP,#+0x4
   BL          zarlinkEthFrameRead
   MOV         R7,R0
   CMP         R7,#+0x0
   BNE         ??frecvHandler_0
   LDRH        R3,[SP, #+4]
   MOV         R3,R3, LSL #+16
   MOVS        R3,R3, LSR #+16
   LDR         R2,[R5, #+0]
   LDR         R1,??frecvHandler_1  ;; `?<Constant "%s: received [%u] byt...">`
   MOV         R0,R8
   _BLF        sprintf,sprintf??rA
   B           ??frecvHandler_2
??frecvHandler_0:
   MOV         R3,R7
   LDR         R2,[R5, #+0]
   LDR         R1,??frecvHandler_1+4  ;; `?<Constant "%s: packet receive er...">`
   MOV         R0,R8
   _BLF        sprintf,sprintf??rA
??frecvHandler_2:
   LDR         R1,[SP, #+0]
   MOV         R0,R8
   _BLF        clicharSendOutputBuffer,clicharSendOutputBuffer??rA
   MOV         R0,R7
   ADD         SP,SP,#+0x8        ;; stack cleaning
        CFI CFA R13+24
   LDMIA       SP!,{R4-R8,PC}     ;; return
   DATA        
??frecvHandler_1:
   DC32        `?<Constant "%s: received [%u] byt...">`
   DC32        `?<Constant "%s: packet receive er...">`
        CFI EndBlock cfiBlock3

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock4 Using cfiCommon0
        CFI Function fshowHandler
   CODE32      
fshowHandler:
   STMDB       SP!,{R4-R7,LR}     ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI R7 Frame(CFA, -8)
        CFI R6 Frame(CFA, -12)
        CFI R5 Frame(CFA, -16)
        CFI R4 Frame(CFA, -20)
        CFI CFA R13+20
   MOV         R4,R0
   MOV         R5,R1
   MOV         R6,R2
   MVN         R0,#+0x0
   MOV         R7,R0
   LDR         R1,??DataTable11   ;; lastRecvFrameLen
   LDRH        R2,[R1, #+0]
   CMP         R2,#+0x0
   BEQ         ??fshowHandler_0
   LDR         R3,??DataTable11   ;; lastRecvFrameLen
   LDRH        R1,[R3, #+0]
   MOV         R1,R1, LSL #+16
   MOVS        R1,R1, LSR #+16
   LDR         R0,??DataTable12   ;; recvFrameBuffer
   _BLF        strutilHexdump,strutilHexdump??rA
   MOV         R12,#+0x0
   MOV         R7,R12
??fshowHandler_0:
   MOV         R0,R7
   LDMIA       SP!,{R4-R7,PC}     ;; return
        CFI EndBlock cfiBlock4

        RSEG CODE:CODE:NOROOT(2)
   DATA        
??DataTable11:
   DC32        lastRecvFrameLen

        RSEG CODE:CODE:NOROOT(2)
   DATA        
??DataTable12:
   DC32        recvFrameBuffer

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock5 Using cfiCommon0
        CFI Function zarlinkFrameInit
   CODE32      
zarlinkFrameInit:
   STMDB       SP!,{LR}           ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
   LDR         R2,??zarlinkFrameInit_0  ;; `?<Constant "fsend [port] - sends ...">`
   LDR         R1,??zarlinkFrameInit_0+4  ;; fsendHandler
   LDR         R0,??zarlinkFrameInit_0+8  ;; `?<Constant "fsend">`
   _BLF        cliRegisterCommand,cliRegisterCommand??rA
   LDR         R2,??zarlinkFrameInit_0+12  ;; `?<Constant "frecv - receives a pa...">`
   LDR         R1,??zarlinkFrameInit_0+16  ;; frecvHandler
   LDR         R0,??zarlinkFrameInit_0+20  ;; `?<Constant "frecv">`
   _BLF        cliRegisterCommand,cliRegisterCommand??rA
   LDR         R2,??zarlinkFrameInit_0+24  ;; `?<Constant "fshow - shows a hex d...">`
   LDR         R1,??zarlinkFrameInit_0+28  ;; fshowHandler
   LDR         R0,??zarlinkFrameInit_0+32  ;; `?<Constant "fshow">`
   _BLF        cliRegisterCommand,cliRegisterCommand??rA
   LDMIA       SP!,{PC}           ;; return
   DATA        
??zarlinkFrameInit_0:
   DC32        `?<Constant "fsend [port] - sends ...">`
   DC32        fsendHandler
   DC32        `?<Constant "fsend">`
   DC32        `?<Constant "frecv - receives a pa...">`
   DC32        frecvHandler
   DC32        `?<Constant "frecv">`
   DC32        `?<Constant "fshow - shows a hex d...">`
   DC32        fshowHandler
   DC32        `?<Constant "fshow">`
        CFI EndBlock cfiBlock5

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock6 Using cfiCommon0
        CFI NoFunction
   CODE32      
zarlinkStatusRead??rA:
   LDR         R12,??Subroutine0_0  ;; zarlinkStatusRead
   MOV         PC,R12
   DATA        
??Subroutine0_0:
   DC32        zarlinkStatusRead
        CFI EndBlock cfiBlock6

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock7 Using cfiCommon0
        CFI NoFunction
   CODE32      
zarlinkFrameWrite??rA:
   LDR         R12,??Subroutine1_0  ;; zarlinkFrameWrite
   MOV         PC,R12
   DATA        
??Subroutine1_0:
   DC32        zarlinkFrameWrite
        CFI EndBlock cfiBlock7

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock8 Using cfiCommon0
        CFI NoFunction
   CODE32      
zarlinkCommandWrite??rA:
   LDR         R12,??Subroutine2_0  ;; zarlinkCommandWrite
   MOV         PC,R12
   DATA        
??Subroutine2_0:
   DC32        zarlinkCommandWrite
        CFI EndBlock cfiBlock8

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock9 Using cfiCommon0
        CFI NoFunction
   CODE32      
zarlinkFrameRead??rA:
   LDR         R12,??Subroutine3_0  ;; zarlinkFrameRead
   MOV         PC,R12
   DATA        
??Subroutine3_0:
   DC32        zarlinkFrameRead
        CFI EndBlock cfiBlock9

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock10 Using cfiCommon0
        CFI NoFunction
   CODE32      
clicharGetOutputBuffer??rA:
   LDR         R12,??Subroutine4_0  ;; clicharGetOutputBuffer
   MOV         PC,R12
   DATA        
??Subroutine4_0:
   DC32        clicharGetOutputBuffer
        CFI EndBlock cfiBlock10

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock11 Using cfiCommon0
        CFI NoFunction
   CODE32      
sprintf??rA:
   LDR         R12,??Subroutine5_0  ;; sprintf
   MOV         PC,R12
   DATA        
??Subroutine5_0:
   DC32        sprintf
        CFI EndBlock cfiBlock11

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock12 Using cfiCommon0
        CFI NoFunction
   CODE32      
strtol??rA:
   LDR         R12,??Subroutine6_0  ;; strtol
   MOV         PC,R12
   DATA        
??Subroutine6_0:
   DC32        strtol
        CFI EndBlock cfiBlock12

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock13 Using cfiCommon0
        CFI NoFunction
   CODE32      
clicharSendOutputBuffer??rA:
   LDR         R12,??Subroutine7_0  ;; clicharSendOutputBuffer
   MOV         PC,R12
   DATA        
??Subroutine7_0:
   DC32        clicharSendOutputBuffer
        CFI EndBlock cfiBlock13

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock14 Using cfiCommon0
        CFI NoFunction
   CODE32      
strutilHexdump??rA:
   LDR         R12,??Subroutine8_0  ;; strutilHexdump
   MOV         PC,R12
   DATA        
??Subroutine8_0:
   DC32        strutilHexdump
        CFI EndBlock cfiBlock14

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock15 Using cfiCommon0
        CFI NoFunction
   CODE32      
cliRegisterCommand??rA:
   LDR         R12,??Subroutine9_0  ;; cliRegisterCommand
   MOV         PC,R12
   DATA        
??Subroutine9_0:
   DC32        cliRegisterCommand
        CFI EndBlock cfiBlock15

        RSEG INITTAB:CODE:ROOT(2)
   DATA
?init?tab?DATA_Z:
   DCD      sfe(DATA_Z) - sfb(DATA_Z), sfb(DATA_Z), sfb(DATA_Z)

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "%s: sending eth frame...">`:
        DC8 "%s: sending eth frame on all ports!\012"
        DC8 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "%s: sending eth frame...">_1`:
        DC8 "%s: sending eth frame on port [%d]\015\012"
        DC8 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "%s: received [%u] byt...">`:
        DC8 "%s: received [%u] bytes in packet buffer\015\012"
        DC8 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "%s: packet receive er...">`:
        DC8 "%s: packet receive error [%d]\015\012"

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "fsend">`:
        DC8 "fsend"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "fsend [port] - sends ...">`:
        DC8 66H, 73H, 65H, 6EH, 64H, 20H, 5BH, 70H
        DC8 6FH, 72H, 74H, 5DH, 20H, 2DH, 20H, 73H
        DC8 65H, 6EH, 64H, 73H, 20H, 61H, 20H, 31H
        DC8 32H, 38H, 20H, 62H, 79H, 74H, 65H, 20H
        DC8 65H, 74H, 68H, 65H, 72H, 6EH, 65H, 74H
        DC8 20H, 66H, 72H, 61H, 6DH, 65H, 20H, 6FH
        DC8 6EH, 20H, 73H, 77H, 69H, 74H, 63H, 68H
        DC8 20H, 70H, 6FH, 72H, 74H, 0
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "frecv">`:
        DC8 "frecv"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "frecv - receives a pa...">`:
        DC8 "frecv - receives a packet into internal memory"
        DC8 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "fshow">`:
        DC8 "fshow"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "fshow - shows a hex d...">`:
        DC8 66H, 73H, 68H, 6FH, 77H, 20H, 2DH, 20H
        DC8 73H, 68H, 6FH, 77H, 73H, 20H, 61H, 20H
        DC8 68H, 65H, 78H, 20H, 64H, 75H, 6DH, 70H
        DC8 20H, 6FH, 66H, 20H, 74H, 68H, 65H, 20H
        DC8 6CH, 61H, 73H, 74H, 20H, 72H, 65H, 63H
        DC8 65H, 69H, 76H, 65H, 64H, 20H, 70H, 61H
        DC8 63H, 6BH, 65H, 74H, 0
        DC8 0, 0, 0

        END
// 
// 1 820 bytes in segment CODE
//   348 bytes in segment DATA_C
// 1 546 bytes in segment DATA_Z
//    12 bytes in segment INITTAB
// 
// 1 700 bytes of CODE  memory (+ 132 bytes shared)
//   348 bytes of CONST memory
// 1 546 bytes of DATA  memory
//
//Errors: none
//Warnings: 2
