Startup.txt 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. TIGCC Startup Section Numbers
  2. ===============================
  3. This file covers the numbers of the startup sections
  4. assigned in this library.
  5. There are two classes of startup sections: library and
  6. program sections. Library sections may appear in a
  7. program, too, but program sections may not appear in a
  8. library. If they do, they are probably never executed.
  9. Library sections are always included at the beginning,
  10. in front of program sections.
  11. Library Startup Sections
  12. --------------------------
  13. Range | Used by
  14. ---------------+--------------------------------------
  15. 1-5 | Kernel header
  16. 11-14 | Optional kernel sections
  17. 20 | Nostub DLL header
  18. 30-31 | Nostub comment header
  19. Program Startup Sections
  20. --------------------------
  21. Range | Used by
  22. ---------------+--------------------------------------
  23. 1 | Entry point
  24. 10 | Ghost space execution
  25. 15 | Custom relocation methods
  26. 20 * | Jump table optimization
  27. 30-35 * | Calculator detection
  28. 38-42 * | AMS detection
  29. 50 * | Failure message function
  30. 60-61 * | AMS detection
  31. 70 * | Calculator detection
  32. 80-82 * x | Register saving
  33. 85 * x | ROM call optimization
  34. 87 **x | In-use bit setting
  35. 90 ** | ROM call relocation
  36. 95-99 ** | Data variable support
  37. 100 ** | BSS support
  38. 110-112 ** | Screen saving
  39. 130 | Internal F-Line emulator
  40. 140 | Error return support
  41. 150-153 | BSS initialization
  42. 155 | Reg-relative initialization
  43. 160 | User-defined constructors
  44. 990 | Register saving for _main
  45. 995-996 | Stack pointer saving
  46. 1000 | User-defined _main function
  47. 1005 | Register saving for _main (restoring)
  48. 1010 | User-defined destructors
  49. 1015 | Reg-relative uninitialization
  50. 1020 | Error return support
  51. 1030 | Internal F-Line emulator (cleanup)
  52. 1050 | Screen saving (restoring)
  53. 1060 | BSS support (cleanup)
  54. 1061-1065 | Data variable support (cleanup)
  55. 1070 | ROM call relocation (cleanup)
  56. 1075 x | In-use bit setting (cleanup)
  57. 1080-1082 x | Register saving (restoring)
  58. 1090 | Custom relocation methods (cleanup)
  59. 1500-1502 | Error return support
  60. 9990 | Return value support
  61. 9999 | Program return
  62. |
  63. 10000-10002 | Different independent routines
  64. 10010-10013 | AMS detection
  65. 10020-10022 | Error messages
  66. 10030-10039 | Internal F-Line emulator
  67. 10040-10041 | Constructed jsr/jmp
  68. 10500-10502 | enter_ghost_space function
  69. 20000 | Reference symbols for compression
  70. * New code between program startup sections 20 and 90
  71. may not modify %a0.
  72. ** New code between program startup sections 90 and 110
  73. may not modify %a0, or it must reference
  74. __optimize_rom_calls.
  75. x New code between program startup sections 80 and 120
  76. as well as 1040 and 1082 may not modify d3-d5.