STARTUP.lst 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. A51 MACRO ASSEMBLER STARTUP 01/22/2019 11:21:48 PAGE 1
  2. MACRO ASSEMBLER A51 V8.02c
  3. OBJECT MODULE PLACED IN .\Objects\STARTUP.obj
  4. ASSEMBLER INVOKED BY: D:\Keil_v5\C51\BIN\A51.EXE STARTUP.A51 SET(SMALL) DEBUG PRINT(.\Listings\STARTUP.lst) OBJECT(.\Obj
  5. ects\STARTUP.obj) EP
  6. LOC OBJ LINE SOURCE
  7. 1 $nomod51
  8. 2 ;------------------------------------------------------------------------------
  9. 3 ; This file is part of the C51 Compiler package
  10. 4 ; Copyright (c) 1988-2005 Keil Elektronik GmbH and Keil Software, Inc.
  11. 5 ; Version 8.01
  12. 6 ;
  13. 7 ; *** <<< Use Configuration Wizard in Context Menu >>> ***
  14. 8 ;------------------------------------------------------------------------------
  15. 9 ; STARTUP.A51: This code is executed after processor reset.
  16. 10 ;
  17. 11 ; To translate this file use A51 with the following invocation:
  18. 12 ;
  19. 13 ; A51 STARTUP.A51
  20. 14 ;
  21. 15 ; To link the modified STARTUP.OBJ file to your application use the following
  22. 16 ; Lx51 invocation:
  23. 17 ;
  24. 18 ; Lx51 your object file list, STARTUP.OBJ controls
  25. 19 ;
  26. 20 ;------------------------------------------------------------------------------
  27. 21 ;
  28. 22 ; User-defined <h> Power-On Initialization of Memory
  29. 23 ;
  30. 24 ; With the following EQU statements the initialization of memory
  31. 25 ; at processor reset can be defined:
  32. 26 ;
  33. 27 ; <o> IDATALEN: IDATA memory size <0x0-0x100>
  34. 28 ; <i> Note: The absolute start-address of IDATA memory is always 0
  35. 29 ; <i> The IDATA space overlaps physically the DATA and BIT areas.
  36. 0080 30 IDATALEN EQU 80H
  37. 31 ;
  38. 32 ; <o> XDATASTART: XDATA memory start address <0x0-0xFFFF>
  39. 33 ; <i> The absolute start address of XDATA memory
  40. 0000 34 XDATASTART EQU 0
  41. 35 ;
  42. 36 ; <o> XDATALEN: XDATA memory size <0x0-0xFFFF>
  43. 37 ; <i> The length of XDATA memory in bytes.
  44. 0000 38 XDATALEN EQU 0
  45. 39 ;
  46. 40 ; <o> PDATASTART: PDATA memory start address <0x0-0xFFFF>
  47. 41 ; <i> The absolute start address of PDATA memory
  48. 0000 42 PDATASTART EQU 0H
  49. 43 ;
  50. 44 ; <o> PDATALEN: PDATA memory size <0x0-0xFF>
  51. 45 ; <i> The length of PDATA memory in bytes.
  52. 0000 46 PDATALEN EQU 0H
  53. 47 ;
  54. 48 ;</h>
  55. 49 ;------------------------------------------------------------------------------
  56. 50 ;
  57. 51 ;<h> Reentrant Stack Initialization
  58. 52 ;
  59. 53 ; The following EQU statements define the stack pointer for reentrant
  60. 54 ; functions and initialized it:
  61. 55 ;
  62. 56 ; <h> Stack Space for reentrant functions in the SMALL model.
  63. 57 ; <q> IBPSTACK: Enable SMALL model reentrant stack
  64. A51 MACRO ASSEMBLER STARTUP 01/22/2019 11:21:48 PAGE 2
  65. 58 ; <i> Stack space for reentrant functions in the SMALL model.
  66. 0000 59 IBPSTACK EQU 0 ; set to 1 if small reentrant is used.
  67. 60 ; <o> IBPSTACKTOP: End address of SMALL model stack <0x0-0xFF>
  68. 61 ; <i> Set the top of the stack to the highest location.
  69. 0100 62 IBPSTACKTOP EQU 0xFF +1 ; default 0FFH+1
  70. 63 ; </h>
  71. 64 ;
  72. 65 ; <h> Stack Space for reentrant functions in the LARGE model.
  73. 66 ; <q> XBPSTACK: Enable LARGE model reentrant stack
  74. 67 ; <i> Stack space for reentrant functions in the LARGE model.
  75. 0000 68 XBPSTACK EQU 0 ; set to 1 if large reentrant is used.
  76. 69 ; <o> XBPSTACKTOP: End address of LARGE model stack <0x0-0xFFFF>
  77. 70 ; <i> Set the top of the stack to the highest location.
  78. 0000 71 XBPSTACKTOP EQU 0xFFFF +1 ; default 0FFFFH+1
  79. 72 ; </h>
  80. 73 ;
  81. 74 ; <h> Stack Space for reentrant functions in the COMPACT model.
  82. 75 ; <q> PBPSTACK: Enable COMPACT model reentrant stack
  83. 76 ; <i> Stack space for reentrant functions in the COMPACT model.
  84. 0000 77 PBPSTACK EQU 0 ; set to 1 if compact reentrant is used.
  85. 78 ;
  86. 79 ; <o> PBPSTACKTOP: End address of COMPACT model stack <0x0-0xFFFF>
  87. 80 ; <i> Set the top of the stack to the highest location.
  88. 0100 81 PBPSTACKTOP EQU 0xFF +1 ; default 0FFH+1
  89. 82 ; </h>
  90. 83 ;</h>
  91. 84 ;------------------------------------------------------------------------------
  92. 85 ;
  93. 86 ; Memory Page for Using the Compact Model with 64 KByte xdata RAM
  94. 87 ; <e>Compact Model Page Definition
  95. 88 ;
  96. 89 ; <i>Define the XDATA page used for PDATA variables.
  97. 90 ; <i>PPAGE must conform with the PPAGE set in the linker invocation.
  98. 91 ;
  99. 92 ; Enable pdata memory page initalization
  100. 0000 93 PPAGEENABLE EQU 0 ; set to 1 if pdata object are used.
  101. 94 ;
  102. 95 ; <o> PPAGE number <0x0-0xFF>
  103. 96 ; <i> uppermost 256-byte address of the page used for PDATA variables.
  104. 0000 97 PPAGE EQU 0
  105. 98 ;
  106. 99 ; <o> SFR address which supplies uppermost address byte <0x0-0xFF>
  107. 100 ; <i> most 8051 variants use P2 as uppermost address byte
  108. 00A0 101 PPAGE_SFR DATA 0A0H
  109. 102 ;
  110. 103 ; </e>
  111. 104 ;------------------------------------------------------------------------------
  112. 105
  113. 106 ; Standard SFR Symbols
  114. 00E0 107 ACC DATA 0E0H
  115. 00F0 108 B DATA 0F0H
  116. 0081 109 SP DATA 81H
  117. 0082 110 DPL DATA 82H
  118. 0083 111 DPH DATA 83H
  119. 112
  120. 113 NAME ?C_STARTUP
  121. 114
  122. 115
  123. 116 ?C_C51STARTUP SEGMENT CODE
  124. 117 ?STACK SEGMENT IDATA
  125. 118
  126. ---- 119 RSEG ?STACK
  127. 0000 120 DS 1
  128. 121
  129. 122 EXTRN CODE (?C_START)
  130. 123 PUBLIC ?C_STARTUP
  131. A51 MACRO ASSEMBLER STARTUP 01/22/2019 11:21:48 PAGE 3
  132. 124
  133. ---- 125 CSEG AT 0
  134. 0000 020000 F 126 ?C_STARTUP: LJMP STARTUP1
  135. 127
  136. ---- 128 RSEG ?C_C51STARTUP
  137. 129
  138. 0000 130 STARTUP1:
  139. 131
  140. 132 IF IDATALEN <> 0
  141. 0000 787F 133 MOV R0,#IDATALEN - 1
  142. 0002 E4 134 CLR A
  143. 0003 F6 135 IDATALOOP: MOV @R0,A
  144. 0004 D8FD 136 DJNZ R0,IDATALOOP
  145. 137 ENDIF
  146. 138
  147. 139 IF XDATALEN <> 0
  148. MOV DPTR,#XDATASTART
  149. MOV R7,#LOW (XDATALEN)
  150. IF (LOW (XDATALEN)) <> 0
  151. MOV R6,#(HIGH (XDATALEN)) +1
  152. ELSE
  153. MOV R6,#HIGH (XDATALEN)
  154. ENDIF
  155. CLR A
  156. XDATALOOP: MOVX @DPTR,A
  157. INC DPTR
  158. DJNZ R7,XDATALOOP
  159. DJNZ R6,XDATALOOP
  160. ENDIF
  161. 153
  162. 154 IF PPAGEENABLE <> 0
  163. MOV PPAGE_SFR,#PPAGE
  164. ENDIF
  165. 157
  166. 158 IF PDATALEN <> 0
  167. MOV R0,#LOW (PDATASTART)
  168. MOV R7,#LOW (PDATALEN)
  169. CLR A
  170. PDATALOOP: MOVX @R0,A
  171. INC R0
  172. DJNZ R7,PDATALOOP
  173. ENDIF
  174. 166
  175. 167 IF IBPSTACK <> 0
  176. EXTRN DATA (?C_IBP)
  177. MOV ?C_IBP,#LOW IBPSTACKTOP
  178. ENDIF
  179. 172
  180. 173 IF XBPSTACK <> 0
  181. EXTRN DATA (?C_XBP)
  182. MOV ?C_XBP,#HIGH XBPSTACKTOP
  183. MOV ?C_XBP+1,#LOW XBPSTACKTOP
  184. ENDIF
  185. 179
  186. 180 IF PBPSTACK <> 0
  187. EXTRN DATA (?C_PBP)
  188. MOV ?C_PBP,#LOW PBPSTACKTOP
  189. ENDIF
  190. 184
  191. 0006 758100 F 185 MOV SP,#?STACK-1
  192. 186
  193. 187 ; This code is required if you use L51_BANK.A51 with Banking Mode 4
  194. 188 ;<h> Code Banking
  195. 189 ; <q> Select Bank 0 for L51_BANK.A51 Mode 4
  196. A51 MACRO ASSEMBLER STARTUP 01/22/2019 11:21:48 PAGE 4
  197. 190
  198. 195 ;</h>
  199. 0009 020000 F 196 LJMP ?C_START
  200. 197
  201. 198 END
  202. A51 MACRO ASSEMBLER STARTUP 01/22/2019 11:21:48 PAGE 5
  203. SYMBOL TABLE LISTING
  204. ------ ----- -------
  205. N A M E T Y P E V A L U E ATTRIBUTES
  206. ?C_C51STARTUP. . . C SEG 000CH REL=UNIT
  207. ?C_START . . . . . C ADDR ----- EXT
  208. ?C_STARTUP . . . . C ADDR 0000H A
  209. ?STACK . . . . . . I SEG 0001H REL=UNIT
  210. ACC. . . . . . . . D ADDR 00E0H A
  211. B. . . . . . . . . D ADDR 00F0H A
  212. DPH. . . . . . . . D ADDR 0083H A
  213. DPL. . . . . . . . D ADDR 0082H A
  214. IBPSTACK . . . . . N NUMB 0000H A
  215. IBPSTACKTOP. . . . N NUMB 0100H A
  216. IDATALEN . . . . . N NUMB 0080H A
  217. IDATALOOP. . . . . C ADDR 0003H R SEG=?C_C51STARTUP
  218. PBPSTACK . . . . . N NUMB 0000H A
  219. PBPSTACKTOP. . . . N NUMB 0100H A
  220. PDATALEN . . . . . N NUMB 0000H A
  221. PDATASTART . . . . N NUMB 0000H A
  222. PPAGE. . . . . . . N NUMB 0000H A
  223. PPAGEENABLE. . . . N NUMB 0000H A
  224. PPAGE_SFR. . . . . D ADDR 00A0H A
  225. SP . . . . . . . . D ADDR 0081H A
  226. STARTUP1 . . . . . C ADDR 0000H R SEG=?C_C51STARTUP
  227. XBPSTACK . . . . . N NUMB 0000H A
  228. XBPSTACKTOP. . . . N NUMB 0000H A
  229. XDATALEN . . . . . N NUMB 0000H A
  230. XDATASTART . . . . N NUMB 0000H A
  231. REGISTER BANK(S) USED: 0
  232. ASSEMBLY COMPLETE. 0 WARNING(S), 0 ERROR(S)