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

        NAME board

        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)

        PUBLIC boardInit
        FUNCTION boardInit,0203H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC boardSetBusyLed
        FUNCTION boardSetBusyLed,0203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC boardTimerLedToggle
        FUNCTION boardTimerLedToggle,0203H
        LOCFRAME CSTACK, 4, STACK
        MULTWEAK cliRegisterCommand??rA
        MULTWEAK clicharGetOutputBuffer??rA
        MULTWEAK clicharSendOutputBuffer??rA
        FUNCTION iostatHandler,0603H
        LOCFRAME CSTACK, 28, STACK
        MULTWEAK medusaInit??rA
        MULTWEAK medusaSetOrangeLed??rA
        MULTWEAK medusaToggleGreenLed??rA
        MULTWEAK sprintf??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"
medusaInit          SYMBOL "medusaInit"
medusaSetOrangeLed  SYMBOL "medusaSetOrangeLed"
medusaToggleGreenLed SYMBOL "medusaToggleGreenLed"
sprintf             SYMBOL "sprintf"
cliRegisterCommand??rA SYMBOL "??rA", cliRegisterCommand
clicharGetOutputBuffer??rA SYMBOL "??rA", clicharGetOutputBuffer
clicharSendOutputBuffer??rA SYMBOL "??rA", clicharSendOutputBuffer
medusaInit??rA      SYMBOL "??rA", medusaInit
medusaSetOrangeLed??rA SYMBOL "??rA", medusaSetOrangeLed
medusaToggleGreenLed??rA SYMBOL "??rA", medusaToggleGreenLed
sprintf??rA         SYMBOL "??rA", sprintf

        EXTERN cliRegisterCommand
        FUNCTION cliRegisterCommand,0202H
        EXTERN clicharGetOutputBuffer
        FUNCTION clicharGetOutputBuffer,0202H
        EXTERN clicharSendOutputBuffer
        FUNCTION clicharSendOutputBuffer,0202H
        EXTERN medusaInit
        FUNCTION medusaInit,0202H
        EXTERN medusaSetOrangeLed
        FUNCTION medusaSetOrangeLed,0202H
        EXTERN medusaToggleGreenLed
        FUNCTION medusaToggleGreenLed,0202H
        EXTERN sprintf
        FUNCTION sprintf,010202H


        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock0 Using cfiCommon0
        CFI Function boardSetBusyLed
   CODE32      
boardSetBusyLed:
   STMDB       SP!,{R4,LR}        ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
   MOV         R4,R0
   MOV         R0,R4
   _BLF        medusaSetOrangeLed,medusaSetOrangeLed??rA
   LDMIA       SP!,{R4,PC}        ;; return
        CFI EndBlock cfiBlock0

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock1 Using cfiCommon0
        CFI Function boardTimerLedToggle
   CODE32      
boardTimerLedToggle:
   STMDB       SP!,{LR}           ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
   _BLF        medusaToggleGreenLed,medusaToggleGreenLed??rA
   LDMIA       SP!,{PC}           ;; return
        CFI EndBlock cfiBlock1

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock2 Using cfiCommon0
        CFI Function boardInit
   CODE32      
boardInit:
   STMDB       SP!,{LR}           ;; Push
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
   _BLF        medusaInit,medusaInit??rA
   MOV         R0,#+0x1
   _BLF        medusaSetOrangeLed,medusaSetOrangeLed??rA
   LDR         R2,??boardInit_0   ;; `?<Constant "iostat - shows lpc210...">`
   LDR         R1,??boardInit_0+4  ;; iostatHandler
   LDR         R0,??boardInit_0+8  ;; `?<Constant "iostat">`
   _BLF        cliRegisterCommand,cliRegisterCommand??rA
   LDMIA       SP!,{PC}           ;; return
   DATA        
??boardInit_0:
   DC32        `?<Constant "iostat - shows lpc210...">`
   DC32        iostatHandler
   DC32        `?<Constant "iostat">`
        CFI EndBlock cfiBlock2

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock3 Using cfiCommon0
        CFI Function iostatHandler
   CODE32      
iostatHandler:
   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
   MOV         R0,SP
   _BLF        clicharGetOutputBuffer,clicharGetOutputBuffer??rA
   MOV         R4,R0
   MOV         R1,#+0xE0000008
   ORR         R1,R1,#+0x28000
   LDR         R3,[R1, #+0]
   MOV         R2,#+0xE0000000
   ORR         R2,R2,#+0x28000
   LDR         R2,[R2, #+0]
   LDR         R1,??iostatHandler_0  ;; `?<Constant "IOPIN[%08x] IODIR[%08x]\\n">`
   MOV         R0,R4
   _BLF        sprintf,sprintf??rA
   LDR         R1,[SP, #+0]
   MOV         R0,R4
   _BLF        clicharSendOutputBuffer,clicharSendOutputBuffer??rA
   MOV         R12,#+0x0
   MOV         R8,R12
   MOV         R0,R8
   ADD         SP,SP,#+0x4        ;; stack cleaning
        CFI CFA R13+24
   LDMIA       SP!,{R4-R8,PC}     ;; return
   DATA        
??iostatHandler_0:
   DC32        `?<Constant "IOPIN[%08x] IODIR[%08x]\\n">`
        CFI EndBlock cfiBlock3

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

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

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

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

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

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

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

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

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "iostat - shows lpc210...">`:
        DC8 "iostat - shows lpc210x IOPIN and IODIR regs"

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "IOPIN[%08x] IODIR[%08x]\\n">`:
        DC8 "IOPIN[%08x] IODIR[%08x]\012"
        DC8 0, 0, 0

        END
// 
// 276 bytes in segment CODE
//  80 bytes in segment DATA_C
// 
// 192 bytes of CODE  memory (+ 84 bytes shared)
//  80 bytes of CONST memory
//
//Errors: none
//Warnings: 1
