Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. 11)
  2. org 0xa0000000
  3. CODE32
  4. PORT0 equ 0xffffd400
  5. pc0 equ 0
  6. pc1 equ 4
  7. pc2 equ 8
  8. pdat equ 12
  9.  
  10. main
  11. bl Init_out ; Appel du sous-programme d’initialisation des ports d’E/S
  12. ldr r0,=0x5555
  13. ldr r1,=0xaaaa
  14. bclmain
  15. strh r0,[r10,#pdat]
  16. b bclmain
  17.  
  18. Init_out
  19. ldr r10,=PORT0
  20. ldr r0,=0
  21. ldr r1,=0xffff
  22. strh r1,[r10,#pc0]
  23. strh r0,[r10,#pc1]
  24. strh r1,[r10,#pc2]
  25. mov pc,lr
  26.  
  27.  
  28. end main
  29.  
  30. 12)
  31. org 0xa0000000
  32. CODE32
  33. PORT0 equ 0xffffd400
  34. pc0 equ 0
  35. pc1 equ 4
  36. pc2 equ 8
  37. pdat equ 12
  38.  
  39. main
  40. bl Init_out ; Appel du sous-programme d’initialisation des ports d’E/S
  41. ldr r0,=0x5555
  42. ldr r1,=0xaaaa
  43. bclmain
  44. strh r0,[r10,#pdat]
  45. bl tempo
  46. strh r1,[r10,#pdat]
  47. bl tempo
  48. b bclmain
  49.  
  50. Init_out
  51. ldr r10,=PORT0
  52. ldr r0,=0
  53. ldr r1,=0xffff
  54. strh r1,[r10,#pc0]
  55. strh r0,[r10,#pc1]
  56. strh r1,[r10,#pc2]
  57. mov pc,lr
  58.  
  59. NBR equ 30000
  60.  
  61. tempo
  62. ldr r5,=NBR
  63. cmp r5,r0
  64. bbb subs r5,r5,#1
  65. bne bbb
  66. mov pc,lr
  67. end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement