summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/IAR/module.asm
blob: 1e0823648596a49a4c04ed782a0fd05a66b1bac7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#if defined(__IASM8051__) || defined(__IASM430__)
  NAME main
#else
  MODULE main
#endif

  PUBLIC main
  PUBLIC __iar_program_start
  PUBLIC __program_start

#if defined(__IASMSTM8__)
  EXTERN CSTACK$$Limit
  SECTION `.near_func.text`:CODE:NOROOT(0)
#elif defined(__IASMAVR__)
  ORG  $0
  RJMP main
  RSEG CODE
#elif defined(__IASM8051__)
  ORG  0FFFEh
  DC16 main
  RSEG RCODE
?cmain:
#elif defined(__IASM430__)
  ORG  0FFFEh
  DC16 init
  RSEG CSTACK
  RSEG CODE
init:
  MOV #SFE(CSTACK), SP
#else
  EXTERN __iar_static_base$$GPREL
  SECTION CSTACK:DATA:NOROOT(4)
  SECTION `.cstartup`:CODE(2)
  CODE
#endif

__program_start:
__iar_program_start:
main:
  NOP
  END