ARM application development SDK for MNT ZZ9000 graphics and coprocessor card for classic Amiga computers.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

crt.S 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* Runtime ABI for the ARM Cortex-M0
  2. * crt.S: C runtime environment
  3. *
  4. * Copyright (c) 2012 Jörg Mische <bobbl@gmx.de>
  5. *
  6. * Permission to use, copy, modify, and/or distribute this software for any
  7. * purpose with or without fee is hereby granted, provided that the above
  8. * copyright notice and this permission notice appear in all copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  11. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  12. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  13. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  14. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  15. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
  16. * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. .syntax unified
  19. .text
  20. .thumb
  21. .cpu cortex-a9
  22. @ _start
  23. @
  24. @ Program entry point: call main(), then exit()
  25. @
  26. .thumb_func
  27. .global _start
  28. _start:
  29. bl main
  30. @ fallthrough to exit()
  31. @ void exit(int status)
  32. @
  33. @ Exit from program: breakpoint 0
  34. @
  35. .thumb_func
  36. .global exit
  37. exit:
  38. bkpt #0
  39. @ void abort(void)
  40. @
  41. @ Abnormal program termination: breakpoint 1
  42. @
  43. .thumb_func
  44. .global abort
  45. abort:
  46. bkpt #1
  47. @ int __aeabi_idiv0(int r)
  48. @
  49. @ Handler for 32 bit division by zero
  50. @
  51. .thumb_func
  52. .global __aeabi_idiv0
  53. __aeabi_idiv0:
  54. @ long long __aeabi_ldiv0(long long r)
  55. @
  56. @ Handler for 64 bit division by zero
  57. @
  58. .thumb_func
  59. .global __aeabi_ldiv0
  60. __aeabi_ldiv0:
  61. bx lr