//////////////////////////////////////////////////////////////////////////////
//                                                                           /
// IAR ARM ANSI C/C++ Compiler V4.11A/W32              20/Jul/2004  18:58:51 /
// Copyright 1999-2004 IAR Systems. All rights reserved.                     /
//                                                                           /
//    Cpu mode        =  arm                                                 /
//    Endian          =  little                                              /
//    Stack alignment =  4                                                   /
//    Source file     =  C:\medusa\clichar.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\clichar.c      /
//    List file       =  C:\medusa\Debug\List\clichar.s79                    /
//                                                                           /
//                                                                           /
//////////////////////////////////////////////////////////////////////////////

        NAME clichar

        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)

        PUBWEAK `?*?DATA_ID`
??DataTable0 EQU 0
??DataTable1 EQU 0
??DataTable10 EQU 0
??DataTable11 EQU 0
??DataTable12 EQU 0
??DataTable13 EQU 0
??DataTable14 EQU 0
??DataTable15 EQU 0
??DataTable16 EQU 0
??DataTable17 EQU 0
??DataTable18 EQU 0
??DataTable19 EQU 0
??DataTable2 EQU 0
??DataTable20 EQU 0
??DataTable21 EQU 0
??DataTable22 EQU 0
??DataTable23 EQU 0
??DataTable25 EQU 0
??DataTable26 EQU 0
??DataTable27 EQU 0
??DataTable28 EQU 0
??DataTable30 EQU 0
??DataTable4 EQU 0
??DataTable5 EQU 0
??DataTable6 EQU 0
??DataTable7 EQU 0
??DataTable8 EQU 0
??DataTable9 EQU 0
        PUBWEAK ?init?tab?DATA_I
        PUBWEAK ?init?tab?DATA_Z
        FUNCTION accumulateCmd,0203H
        LOCFRAME CSTACK, 12, STACK
        MULTWEAK cliDoCommand??rA
        MULTWEAK cliRegisterCommand??rA
        PUBLIC clicharEventTrigger
        FUNCTION clicharEventTrigger,0203H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC clicharGetOutputBuffer
        FUNCTION clicharGetOutputBuffer,0203H
        PUBLIC clicharInit
        FUNCTION clicharInit,0203H
        LOCFRAME CSTACK, 12, STACK
        PUBLIC clicharPuts
        FUNCTION clicharPuts,0203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC clicharSendOutputBuffer
        FUNCTION clicharSendOutputBuffer,0203H
        LOCFRAME CSTACK, 20, STACK
        PUBLIC echoHandler
        FUNCTION echoHandler,0603H
        LOCFRAME CSTACK, 28, STACK
        MULTWEAK eventqRegisterHandler??rA
        FUNCTION getBuffer,0203H
        FUNCTION handleEvent,0603H
        LOCFRAME CSTACK, 12, STACK
        FUNCTION outputString,0203H
        LOCFRAME CSTACK, 16, STACK
        FUNCTION putPrompt,0203H
        LOCFRAME CSTACK, 4, STACK
        FUNCTION returnBuffer,0203H
        MULTWEAK sprintf??rA
        MULTWEAK uart0RxOne??rA
        MULTWEAK uart0TxOne??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
        
cliDoCommand        SYMBOL "cliDoCommand"
cliRegisterCommand  SYMBOL "cliRegisterCommand"
eventqRegisterHandler SYMBOL "eventqRegisterHandler"
sprintf             SYMBOL "sprintf"
uart0RxOne          SYMBOL "uart0RxOne"
uart0TxOne          SYMBOL "uart0TxOne"
cliDoCommand??rA    SYMBOL "??rA", cliDoCommand
cliRegisterCommand??rA SYMBOL "??rA", cliRegisterCommand
eventqRegisterHandler??rA SYMBOL "??rA", eventqRegisterHandler
sprintf??rA         SYMBOL "??rA", sprintf
uart0RxOne??rA      SYMBOL "??rA", uart0RxOne
uart0TxOne??rA      SYMBOL "??rA", uart0TxOne

        EXTERN cliDoCommand
        FUNCTION cliDoCommand,0202H
        EXTERN cliRegisterCommand
        FUNCTION cliRegisterCommand,0202H
        EXTERN eventqRegisterHandler
        FUNCTION eventqRegisterHandler,0202H
        EXTERN sprintf
        FUNCTION sprintf,010202H
        EXTERN uart0RxOne
        FUNCTION uart0RxOne,0202H
        EXTERN uart0TxOne
        FUNCTION uart0TxOne,0202H


        RSEG DATA_I:DATA:SORT:NOROOT(0)
prompt:
        DS8 6
	REQUIRE `?<Initializer for prompt>`

        RSEG DATA_Z:DATA:SORT:NOROOT(2)
inputBuf:
        DS8 256

        RSEG DATA_Z:DATA:SORT:NOROOT(2)
currentBufIndex:
        DS8 4

        RSEG DATA_Z:DATA:SORT:NOROOT(2)
outputBuf:
        DS8 256

        RSEG DATA_Z:DATA:SORT:NOROOT(2)
pCurrentBuffer:
        DS8 4

        RSEG DATA_Z:DATA:SORT:NOROOT(2)
echoChars:
        DS8 4

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock0 Using cfiCommon0
        CFI Function getBuffer
   CODE32      
getBuffer:
   LDR         R0,??DataTable24   ;; currentBufIndex
   MOV         R1,#+0x0
   STR         R1,[R0, #+0]
   LDR         R2,??DataTable24   ;; currentBufIndex
   LDR         R3,[R2, #+0]
   LDR         R12,??getBuffer_0  ;; inputBuf
   ADDS        R0,R3,R12
   MOV         PC,LR              ;; return
   DATA        
??getBuffer_0:
   DC32        inputBuf
        CFI EndBlock cfiBlock0

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock1 Using cfiCommon0
        CFI Function returnBuffer
   CODE32      
returnBuffer:
   MOV         PC,LR              ;; return
        CFI EndBlock cfiBlock1

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock2 Using cfiCommon0
        CFI Function clicharGetOutputBuffer
   CODE32      
clicharGetOutputBuffer:
   MOV         R1,R0
   CMP         R1,#+0x0
   BEQ         ??clicharGetOutputBuffer_0
   MOV         R0,#+0x100
   STR         R0,[R1, #+0]
??clicharGetOutputBuffer_0:
   LDR         R0,??DataTable3    ;; outputBuf
   MOV         PC,LR              ;; return
        CFI EndBlock cfiBlock2

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock3 Using cfiCommon0
        CFI Function outputString
   CODE32      
outputString:
   STMDB       SP!,{R4-R6,LR}     ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI R6 Frame(CFA, -8)
        CFI R5 Frame(CFA, -12)
        CFI R4 Frame(CFA, -16)
        CFI CFA R13+16
   MOV         R4,R0
   MOV         R5,R1
   MOV         R0,#+0x0
   MOV         R6,R0
   LDRB        R1,[R4, #+0]
   CMP         R1,#+0x0
   BEQ         ??outputString_0
   CMP         R5,#+0x1
   BLT         ??outputString_0
??outputString_1:
   LDRB        R2,[R4, #+0]
   CMP         R2,#+0x0
   BEQ         ??outputString_0
   CMP         R6,R5
   BGE         ??outputString_0
   LDRB        R0,[R4, #+0]
   _BLF        uart0TxOne,uart0TxOne??rA
   CMP         R0,#+0x0
   BNE         ??outputString_1
   ADDS        R4,R4,#+0x1
   ADDS        R6,R6,#+0x1
   B           ??outputString_1
??outputString_0:
   LDMIA       SP!,{R4-R6,PC}     ;; return
        CFI EndBlock cfiBlock3

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock4 Using cfiCommon0
        CFI Function clicharPuts
   CODE32      
clicharPuts:
   STMDB       SP!,{R4,LR}        ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
   MOV         R4,R0
   MOV         R1,#+0xFF
   MOV         R0,R4
   BL          outputString
   LDMIA       SP!,{R4,PC}        ;; return
        CFI EndBlock cfiBlock4

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock5 Using cfiCommon0
        CFI Function clicharSendOutputBuffer
   CODE32      
clicharSendOutputBuffer:
   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
   CMP         R4,#+0x0
   BNE         ??clicharSendOutputBuffer_0
   LDR         R0,??DataTable3    ;; outputBuf
   MOV         R4,R0
   MOV         R1,#+0x100
   MOV         R5,R1
??clicharSendOutputBuffer_0:
   MOV         R7,R4
   MOV         R2,#+0x0
   MOV         R6,R2
??clicharSendOutputBuffer_1:
   LDRB        R3,[R7, #+0]
   CMP         R3,#+0x0
   BEQ         ??clicharSendOutputBuffer_2
   CMP         R6,R5
   BGE         ??clicharSendOutputBuffer_2
   LDRB        R0,[R7, #+0]
   _BLF        uart0TxOne,uart0TxOne??rA
   CMP         R0,#+0x0
   BNE         ??clicharSendOutputBuffer_1
   ADDS        R7,R7,#+0x1
   ADDS        R6,R6,#+0x1
   B           ??clicharSendOutputBuffer_1
??clicharSendOutputBuffer_2:
   LDMIA       SP!,{R4-R7,PC}     ;; return
        CFI EndBlock cfiBlock5

        RSEG CODE:CODE:NOROOT(2)
   DATA        
??DataTable3:
   DC32        outputBuf

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock6 Using cfiCommon0
        CFI Function putPrompt
   CODE32      
putPrompt:
   STMDB       SP!,{LR}           ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
   MOV         R1,#+0x6
   LDR         R0,??putPrompt_0   ;; prompt
   BL          clicharSendOutputBuffer
   LDMIA       SP!,{PC}           ;; return
   DATA        
??putPrompt_0:
   DC32        prompt
        CFI EndBlock cfiBlock6

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock7 Using cfiCommon0
        CFI Function accumulateCmd
   CODE32      
accumulateCmd:
   STMDB       SP!,{R4,R5,LR}     ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI R5 Frame(CFA, -8)
        CFI R4 Frame(CFA, -12)
        CFI CFA R13+12
   MOV         R4,R0
   MVN         R2,#+0x0
   MOV         R5,R2
   ANDS        R4,R4,#+0xFF       ;; Zero extend
   CMP         R4,#+0x1
   BCS         ??accumulateCmd_0
   MOV         R0,R5
   B           ??accumulateCmd_1
??accumulateCmd_0:
   MOV         R3,R4
   ANDS        R3,R3,#+0xFF       ;; Zero extend
   CMP         R3,#+0x3
   BEQ         ??accumulateCmd_2
   CMP         R3,#+0x8
   BEQ         ??accumulateCmd_3
   CMP         R3,#+0xA
   BEQ         ??accumulateCmd_4
   CMP         R3,#+0xD
   BEQ         ??accumulateCmd_4
   B           ??accumulateCmd_5
??accumulateCmd_2:
   LDR         LR,??DataTable29   ;; echoChars
   LDR         R0,[LR, #+0]
   CMP         R0,#+0x1
   BNE         ??accumulateCmd_6
   MOV         R0,#+0x5E
   _BLF        uart0TxOne,uart0TxOne??rA
   MOV         R0,#+0x43
   _BLF        uart0TxOne,uart0TxOne??rA
??accumulateCmd_6:
   LDR         R1,??DataTable24   ;; currentBufIndex
   MOV         R2,#+0x0
   STR         R2,[R1, #+0]
   BL          putPrompt
   B           ??accumulateCmd_7
??accumulateCmd_3:
   LDR         R3,??DataTable24   ;; currentBufIndex
   LDR         R12,[R3, #+0]
   CMP         R12,#+0x0
   BNE         ??accumulateCmd_8
   LDR         LR,??DataTable29   ;; echoChars
   LDR         R0,[LR, #+0]
   CMP         R0,#+0x1
   BNE         ??accumulateCmd_7
   MOV         R0,#+0x7
   _BLF        uart0TxOne,uart0TxOne??rA
   B           ??accumulateCmd_7
??accumulateCmd_8:
   LDR         R1,??DataTable29   ;; echoChars
   LDR         R2,[R1, #+0]
   CMP         R2,#+0x1
   BNE         ??accumulateCmd_9
   MOV         R0,#+0x8
   _BLF        uart0TxOne,uart0TxOne??rA
   MOV         R0,#+0x20
   _BLF        uart0TxOne,uart0TxOne??rA
   MOV         R0,#+0x8
   _BLF        uart0TxOne,uart0TxOne??rA
??accumulateCmd_9:
   LDR         R3,??DataTable24   ;; currentBufIndex
   LDR         R12,[R3, #+0]
   CMP         R12,#+0x0
   BNE         ??accumulateCmd_10
   MOV         R0,#+0xFF
   LDR         LR,??DataTable24   ;; currentBufIndex
   STR         R0,[LR, #+0]
   B           ??accumulateCmd_7
??accumulateCmd_10:
   LDR         R0,??DataTable24   ;; currentBufIndex
   LDR         R0,[R0, #+0]
   LDR         R1,??DataTable24   ;; currentBufIndex
   LDR         R2,??DataTable24   ;; currentBufIndex
   LDR         R3,[R2, #+0]
   SUBS        R12,R3,#+0x1
   STR         R12,[R1, #+0]
   B           ??accumulateCmd_7
??accumulateCmd_4:
   LDR         LR,??DataTable24   ;; currentBufIndex
   LDR         R0,[LR, #+0]
   LDR         R1,??DataTable31   ;; pCurrentBuffer
   LDR         R2,[R1, #+0]
   MOV         R3,#+0x0
   STRB        R3,[R0, +R2]
   LDR         R12,??DataTable29  ;; echoChars
   LDR         LR,[R12, #+0]
   CMP         LR,#+0x1
   BNE         ??accumulateCmd_11
   MOV         R0,#+0xD
   _BLF        uart0TxOne,uart0TxOne??rA
   MOV         R0,#+0xA
   _BLF        uart0TxOne,uart0TxOne??rA
??accumulateCmd_11:
   MOV         R0,#+0x0
   MOV         R5,R0
   B           ??accumulateCmd_7
??accumulateCmd_5:
   LDR         R1,??DataTable29   ;; echoChars
   LDR         R2,[R1, #+0]
   CMP         R2,#+0x1
   BNE         ??accumulateCmd_12
   MOV         R0,R4
   ANDS        R0,R0,#+0xFF       ;; Zero extend
   _BLF        uart0TxOne,uart0TxOne??rA
??accumulateCmd_12:
   LDR         R3,??DataTable24   ;; currentBufIndex
   LDR         R12,[R3, #+0]
   LDR         LR,??DataTable31   ;; pCurrentBuffer
   LDR         R0,[LR, #+0]
   STRB        R4,[R12, +R0]
   LDR         R1,??DataTable24   ;; currentBufIndex
   LDR         R2,[R1, #+0]
   CMP         R2,#+0xFF
   BNE         ??accumulateCmd_13
   MOV         R1,#+0x0
   LDR         R3,??DataTable24   ;; currentBufIndex
   STR         R1,[R3, #+0]
   B           ??accumulateCmd_7
??accumulateCmd_13:
   LDR         R12,??DataTable24  ;; currentBufIndex
   LDR         R1,[R12, #+0]
   LDR         LR,??DataTable24   ;; currentBufIndex
   LDR         R0,??DataTable24   ;; currentBufIndex
   LDR         R2,[R0, #+0]
   ADDS        R3,R2,#+0x1
   STR         R3,[LR, #+0]
??accumulateCmd_7:
   MOV         R0,R5
??accumulateCmd_1:
   LDMIA       SP!,{R4,R5,PC}     ;; return
        CFI EndBlock cfiBlock7

        RSEG CODE:CODE:NOROOT(2)
   DATA        
??DataTable24:
   DC32        currentBufIndex

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock8 Using cfiCommon0
        CFI Function clicharEventTrigger
   CODE32      
clicharEventTrigger:
   STMDB       SP!,{LR}           ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
   BL          handleEvent
   LDMIA       SP!,{PC}           ;; return
        CFI EndBlock cfiBlock8

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock9 Using cfiCommon0
        CFI Function handleEvent
   CODE32      
handleEvent:
   STMDB       SP!,{R4,LR}        ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
   SUB         SP,SP,#+0x4
        CFI CFA R13+12
??handleEvent_0:
   MOV         R0,SP
   _BLF        uart0RxOne,uart0RxOne??rA
   MOV         R4,R0
   CMN         R0,#+0x1
   BEQ         ??handleEvent_1
   LDRB        R0,[SP, #+0]
   BL          accumulateCmd
   MOV         R4,R0
   CMN         R0,#+0x1
   BEQ         ??handleEvent_0
   MOV         R1,#+0x100
   LDR         R2,??DataTable31   ;; pCurrentBuffer
   LDR         R0,[R2, #+0]
   _BLF        cliDoCommand,cliDoCommand??rA
   BL          returnBuffer
   BL          getBuffer
   LDR         R1,??DataTable31   ;; pCurrentBuffer
   STR         R0,[R1, #+0]
   BL          putPrompt
   B           ??handleEvent_0
??handleEvent_1:
   ADD         SP,SP,#+0x4        ;; stack cleaning
        CFI CFA R13+8
   LDMIA       SP!,{R4,PC}        ;; return
        CFI EndBlock cfiBlock9

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock10 Using cfiCommon0
        CFI Function echoHandler
   CODE32      
echoHandler:
   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,#+0x4
        CFI CFA R13+28
   MOV         R5,R0
   MOV         R6,R1
   MOV         R7,R2
   MVN         R0,#+0x0
   MOV         R8,R0
   CMP         R5,#+0x2
   BEQ         ??echoHandler_0
   MVN         R0,#+0x0
   B           ??echoHandler_1
??echoHandler_0:
   MOV         R0,SP
   BL          clicharGetOutputBuffer
   MOV         R4,R0
   LDR         R1,[R6, #+4]
   LDRB        R2,[R1, #+0]
   ANDS        R2,R2,#+0xFF       ;; Zero extend
   SUB         R2,R2,#+0x30
   CMP         R2,#+0x49
   BHI         ??echoHandler_2
   ADR         R3,`?<Jumptable for echoHandler>_0`
   LDRB        R3,[R3, R2]
   ADD         PC,PC,R3, LSL #+2
   DATA        
`?<Jumptable for echoHandler>_0`:
   DC8         +0x12,+0x1C,+0x25,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x25,+0x12,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x1C,+0x25,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x25,+0x12,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x25,+0x25,+0x25
   DC8         +0x25,+0x1C,+0x0,+0x0
   CODE32      
??echoHandler_3:
   LDR         R12,??DataTable29  ;; echoChars
   MOV         LR,#+0x0
   STR         LR,[R12, #+0]
   LDR         R2,[R6, #+0]
   LDR         R1,??echoHandler_4  ;; `?<Constant "%s: echo is off\\r\\n">`
   MOV         R0,R4
   _BLF        sprintf,sprintf??rA
   MOV         R0,#+0x0
   MOV         R8,R0
   B           ??echoHandler_2
??echoHandler_5:
   LDR         R1,??DataTable29   ;; echoChars
   MOV         R2,#+0x1
   STR         R2,[R1, #+0]
   LDR         R2,[R6, #+0]
   LDR         R1,??echoHandler_4+4  ;; `?<Constant "%s: echo is on\\r\\n">`
   MOV         R0,R4
   _BLF        sprintf,sprintf??rA
   MOV         R3,#+0x0
   MOV         R8,R3
??echoHandler_2:
   CMP         R8,#+0x0
   BNE         ??echoHandler_6
   LDR         R1,[SP, #+0]
   MOV         R0,R4
   BL          clicharSendOutputBuffer
??echoHandler_6:
   MOV         R0,R8
??echoHandler_1:
   ADD         SP,SP,#+0x4        ;; stack cleaning
        CFI CFA R13+24
   LDMIA       SP!,{R4-R8,PC}     ;; return
   DATA        
??echoHandler_4:
   DC32        `?<Constant "%s: echo is off\\r\\n">`
   DC32        `?<Constant "%s: echo is on\\r\\n">`
        CFI EndBlock cfiBlock10

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock11 Using cfiCommon0
        CFI Function clicharInit
   CODE32      
clicharInit:
   STMDB       SP!,{R4,R5,LR}     ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI R5 Frame(CFA, -8)
        CFI R4 Frame(CFA, -12)
        CFI CFA R13+12
   LDR         R0,??DataTable29   ;; echoChars
   MOV         R1,#+0x1
   STR         R1,[R0, #+0]
   BL          getBuffer
   LDR         R2,??DataTable31   ;; pCurrentBuffer
   STR         R0,[R2, #+0]
   LDR         R3,??DataTable31   ;; pCurrentBuffer
   LDR         R12,[R3, #+0]
   MOV         R4,R12
   MOV         LR,#+0x0
   MOV         R5,LR
??clicharInit_0:
   CMP         R5,#+0x100
   BGE         ??clicharInit_1
   MOV         R0,#+0x0
   MOV         R4,R0
   ADDS        R5,R5,#+0x1
   ADDS        R4,R4,#+0x1
   B           ??clicharInit_0
??clicharInit_1:
   LDR         R1,??clicharInit_2  ;; handleEvent
   MOV         R0,#+0xA
   _BLF        eventqRegisterHandler,eventqRegisterHandler??rA
   BL          putPrompt
   LDR         R2,??clicharInit_2+4  ;; `?<Constant "echo [{0 | n(o) | N(o...">`
   LDR         R1,??clicharInit_2+8  ;; echoHandler
   LDR         R0,??clicharInit_2+12  ;; `?<Constant "echo">`
   _BLF        cliRegisterCommand,cliRegisterCommand??rA
   MOV         R0,#+0x0
   LDMIA       SP!,{R4,R5,PC}     ;; return
   DATA        
??clicharInit_2:
   DC32        handleEvent
   DC32        `?<Constant "echo [{0 | n(o) | N(o...">`
   DC32        echoHandler
   DC32        `?<Constant "echo">`
        CFI EndBlock cfiBlock11

        RSEG CODE:CODE:NOROOT(2)
   DATA        
??DataTable29:
   DC32        echoChars

        RSEG CODE:CODE:NOROOT(2)
   DATA        
??DataTable31:
   DC32        pCurrentBuffer

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

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

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

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

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

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

        RSEG DATA_ID:CONST:SORT:NOROOT(0)
`?<Initializer for prompt>`:
        DC8 13, 10, 45, 62, 32, 0

        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_ID:CONST:SORT:NOROOT(2)
`?*?DATA_ID`:

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

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "%s: echo is off\\r\\n">`:
        DC8 "%s: echo is off\015\012"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "%s: echo is on\\r\\n">`:
        DC8 "%s: echo is on\015\012"
        DC8 0, 0, 0

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

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "echo [{0 | n(o) | N(o...">`:
        DC8 "echo [{0 | n(o) | N(o)} {1 | y(es) | Y(es)}]"
        DC8 0, 0, 0

        END
// 
// 1 384 bytes in segment CODE
//    96 bytes in segment DATA_C
//     6 bytes in segment DATA_I
//     6 bytes in segment DATA_ID
//   524 bytes in segment DATA_Z
//    24 bytes in segment INITTAB
// 
// 1 312 bytes of CODE  memory (+ 96 bytes shared)
//   102 bytes of CONST memory
//   530 bytes of DATA  memory
//
//Errors: none
//Warnings: 2
