


ARM Macro Assembler    Page 1 


    1 00000000         #line   1                "LT776_Graphic\\misc_s.s"
    1 00000000         
    2 00000000         ; Utility for debug message 
    3 00000000         
    4 00000000         
    5 00000000         
    6 00000000                 AREA             UTILITY, CODE, READONLY
    7 00000000         
    8 00000000         ;======ok===============================================
                       =========
    9 00000000         ; r0 : HEX value(00H~0FH), transfer to ASCII code:0~9,A~
                       F  
   10 00000000                 EXPORT           DigitToHexAscii
   11 00000000         DigitToHexAscii
                               PROC                         ; signed number
   12 00000000 B500            stmfd            sp!,{lr}
   13 00000002 F010 000F       ands             r0,r0,#0x0F
   14 00000006 280A            cmp              r0,#10
   15 00000008 DB01            blt              dth0
   16 0000000A F100 0007       add              r0,r0,#7    ; value >= 10
   17 0000000E         dth0
   18 0000000E F100 0030       add              r0,r0,#0x30
   19 00000012 BD00            ldmfd            sp!,{pc}
   20 00000014                 ENDP
   21 00000014         
   22 00000014         ;-------------------------------------------------
   23 00000014         ; Arguments in : r0 = THE NUMBER OF THE INPUT BYTE
   24 00000014         ;              : r1 = THE POINTER OF THE INPUT BUFFER
   25 00000014         ;  Result out  : r0 = THE RESULT WORD
   26 00000014         HexToBin
                               PROC
   27 00000014 B50C            stmfd            sp!,{r2-r3,lr}
   28 00000016 F04F 0200       mov              r2,#0
   29 0000001A EA4F 1202 
                       htb1    mov              r2,r2,LSL #4
   30 0000001E F811 3B01       ldrb             r3,[r1],#1
   31 00000022 F013 0F40       tst              r3,#0x40
   32 00000026 BF14 3B37       subne            r3,r3,#55
   33 0000002A 3B30            subeq            r3,r3,#48
   34 0000002C 441A            add              r2,r2,r3
   35 0000002E 1E40            subs             r0,r0,#1
   36 00000030 D1F3            bne              htb1
   37 00000032 4610            mov              r0,r2
   38 00000034 BD0C            ldmfd            sp!,{r2-r3,pc}
   39 00000036                 ENDP
   40 00000036         
   41 00000036         ;======ok===============================================
                       =========
   42 00000036         ; Convert 1 byte data to 2 digits hex ASCII code
   43 00000036         ; r0 : value
   44 00000036         ; r1 : storage data address
   45 00000036                 EXPORT           ByteToHexAscii
   46 00000036         
   47 00000036         ByteToHexAscii
                               PROC
   48 00000036 B504            stmfd            sp!,{r2,lr}
   49 00000038 4602            mov              r2,r0
   50 0000003A EA4F 1020       mov              r0,r0,asr#4 ; high 4 bits
   51 0000003E F7FF FFFE       bl               DigitToHexAscii



ARM Macro Assembler    Page 2 


   52 00000042 7008            strb             r0,[r1]
   53 00000044 F101 0101       add              r1,r1,#1
   54 00000048         
   55 00000048 F002 000F       and              r0,r2,#0x0f ; low  4 bits
   56 0000004C F7FF FFFE       bl               DigitToHexAscii
   57 00000050 7008            strb             r0,[r1]
   58 00000052         
   59 00000052 BD04            ldmfd            sp!,{r2,pc}
   60 00000054                 ENDP
   61 00000054         
   62 00000054                 END
Command Line: --debug --xref --cpreproc --diag_suppress=9931 --cpu=Cortex-M4.fp
 --apcs=interwork --depend=.\object\bin\misc_s.d -o.\object\bin\misc_s.o -I.\RT
E\_LT776_FreeRTOS -ID:\Keil_v5\ARM\PACK\ARM\CMSIS\5.4.0\Device\ARM\ARMCM4\Inclu
de -ID:\Keil_v5\ARM\CMSIS\Include --predefine="__MICROLIB SETA 1" --predefine="
__UVISION_VERSION SETA 527" --predefine="ARMCM4_FP SETA 1" --list=.\object\misc
_s.lst LT776_Graphic\misc_s.s



ARM Macro Assembler    Page 1 Alphabetic symbol ordering
Relocatable symbols

ByteToHexAscii 00000036

Symbol: ByteToHexAscii
   Definitions
      At line 47 in file LT776_Graphic\\misc_s.s
   Uses
      At line 45 in file LT776_Graphic\\misc_s.s
Comment: ByteToHexAscii used once
DigitToHexAscii 00000000

Symbol: DigitToHexAscii
   Definitions
      At line 11 in file LT776_Graphic\\misc_s.s
   Uses
      At line 10 in file LT776_Graphic\\misc_s.s
      At line 51 in file LT776_Graphic\\misc_s.s
      At line 56 in file LT776_Graphic\\misc_s.s

HexToBin 00000014

Symbol: HexToBin
   Definitions
      At line 26 in file LT776_Graphic\\misc_s.s
   Uses
      None
Comment: HexToBin unused
UTILITY 00000000

Symbol: UTILITY
   Definitions
      At line 6 in file LT776_Graphic\\misc_s.s
   Uses
      None
Comment: UTILITY unused
dth0 0000000E

Symbol: dth0
   Definitions
      At line 17 in file LT776_Graphic\\misc_s.s
   Uses
      At line 15 in file LT776_Graphic\\misc_s.s
Comment: dth0 used once
htb1 0000001A

Symbol: htb1
   Definitions
      At line 29 in file LT776_Graphic\\misc_s.s
   Uses
      At line 36 in file LT776_Graphic\\misc_s.s
Comment: htb1 used once
6 symbols
340 symbols in table
