• 11.10


    1. .text
    2. .global _start
    3. _start:
    4. ldr r0,=0x50000a28
    5. ldr r1,[r0]
    6. orr r1,r1,#(0x3<<4)
    7. orr r1,r1,#(0x1<<1)
    8. str r1,[r0]
    9. ldr r0,=0x50006000
    10. ldr r1,[r0]
    11. bic r1,r1,#(0x3<<20)
    12. orr r1,r1,#(0x1<<20)
    13. bic r1,r1,#(0x3<<16)
    14. orr r1,r1,#(0x1<<16)
    15. str r1,[r0]
    16. ldr r0,=0x50007000
    17. ldr r1,[r0]
    18. bic r1,r1,#(0x3<<20)
    19. orr r1,r1,#(0x1<<20)
    20. str r1,[r0]
    21. ldr r0,=0x50003000
    22. ldr r1,[r0]
    23. bic r1,r1,#(0x3<<12)
    24. orr r1,r1,#(0x1<<12)
    25. str r1,[r0]
    26. ldr r0,=0x50006004
    27. ldr r1,[r0]
    28. bic r1,r1,#(0x1<<10)
    29. bic r1,r1,#(0x1<<8)
    30. str r1,[r0]
    31. ldr r0,=0x50007004
    32. ldr r1,[r0]
    33. bic r1,r1,#(0x1<<10)
    34. str r1,[r0]
    35. ldr r0,=0x50003004
    36. ldr r1,[r0]
    37. bic r1,r1,#(0x1<<6)
    38. str r1,[r0]
    39. ldr r0,=0x50006008
    40. ldr r1,[r0]
    41. bic r1,r1,#(0x3<<20)
    42. bic r1,r1,#(0x3<<16)
    43. str r1,[r0]
    44. ldr r0,=0x50007008
    45. ldr r1,[r0]
    46. bic r1,r1,#(0x3<<20)
    47. str r1,[r0]
    48. ldr r0,=0x50003008
    49. ldr r1,[r0]
    50. bic r1,r1,#(0x3<<12)
    51. str r1,[r0]
    52. ldr r0,=0x5000600c
    53. ldr r1,[r0]
    54. bic r1,r1,#(0x3<<20)
    55. bic r1,r1,#(0x3<<16)
    56. str r1,[r0]
    57. ldr r0,=0x5000700c
    58. ldr r1,[r0]
    59. bic r1,r1,#(0x3<<20)
    60. str r1,[r0]
    61. ldr r0,=0x5000300c
    62. ldr r1,[r0]
    63. bic r1,r1,#(0x3<<12)
    64. str r1,[r0]
    65. loop:
    66. bl led1_on
    67. bl delay
    68. bl led1_off
    69. bl delay
    70. bl led2_on
    71. bl delay
    72. bl led2_off
    73. bl delay
    74. bl led3_on
    75. bl delay
    76. bl led3_off
    77. bl delay
    78. bl bee_on
    79. bl delay
    80. bl bee_off
    81. bl delay
    82. b loop
    83. led1_on:
    84. ldr r0,=0x50006014
    85. ldr r1,[r0]
    86. orr r1,r1,#(0x1<<10)
    87. str r1,[r0]
    88. mov pc,lr
    89. led1_off:
    90. ldr r0,=0x50006014
    91. ldr r1,[r0]
    92. bic r1,r1,#(0x1<<10)
    93. str r1,[r0]
    94. mov pc,lr
    95. led2_on:
    96. ldr r0,=0x50007014
    97. ldr r1,[r0]
    98. orr r1,r1,#(0x1<<10)
    99. str r1,[r0]
    100. mov pc,lr
    101. led2_off:
    102. ldr r0,=0x50007014
    103. ldr r1,[r0]
    104. bic r1,r1,#(0x1<<10)
    105. str r1,[r0]
    106. mov pc,lr
    107. led3_on:
    108. ldr r0,=0x50006014
    109. ldr r1,[r0]
    110. orr r1,r1,#(0x1<<8)
    111. str r1,[r0]
    112. mov pc,lr
    113. led3_off:
    114. ldr r0,=0x50006014
    115. ldr r1,[r0]
    116. bic r1,r1,#(0x1<<8)
    117. str r1,[r0]
    118. mov pc,lr
    119. bee_on:
    120. ldr r0,=0x50003014
    121. ldr r1,[r0]
    122. orr r1,r1,#(0x1<<6)
    123. str r1,[r0]
    124. mov pc,lr
    125. bee_off:
    126. ldr r0,=0x50003014
    127. ldr r1,[r0]
    128. bic r1,r1,#(0x1<<6)
    129. str r1,[r0]
    130. mov pc,lr
    131. delay:
    132. ldr r1,=0x10000000
    133. mm:
    134. cmp r1,#0
    135. subne r1,r1,#1
    136. bne mm
    137. mov pc,lr
    138. .end

  • 相关阅读:
    Go语言入门【7】指针
    为什么反射慢?
    【pnpm】安装依赖基础
    亚马逊云科技加速大语言模型的创新应用
    PHP 中文匹配
    UML 类图
    ArrayBlockingQueue
    c# .NET 高级编程 高并发必备技巧(二) - 分布式锁
    Eureka介绍与使用
    马来酰亚胺聚谷氨酸天冬氨酸聚合物药物载顺铂/mPEg-PGA纳米微球的制备
  • 原文地址:https://blog.csdn.net/benbai_v/article/details/134338786