⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 init.lst

📁 8051带32Mflash的源代码
💻 LST
📖 第 1 页 / 共 2 页
字号:
A51 MACRO ASSEMBLER  INIT                                                                 08/31/2007 13:59:14 PAGE     1


MACRO ASSEMBLER A51 V7.01
OBJECT MODULE PLACED IN .\INIT.obj
ASSEMBLER INVOKED BY: C:\Keil\C51\BIN\A51.EXE C:\Keil\C51\LIB\INIT.A51 SET(SMALL) DEBUG PRINT(.\INIT.lst) OBJECT(.\INIT.
                      obj) EP

LOC  OBJ            LINE     SOURCE

                       1     $nomod51 
                       2     ;------------------------------------------------------------------------------
                       3     ;  This file is part of the C51 Compiler package
                       4     ;  Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
                       5     ;------------------------------------------------------------------------------
                       6     ;  INIT.A51:  This code is executed, if the application program contains
                       7     ;             initialized variables at file level.
                       8     ;
                       9     ;  If you are using uVision2, just add the file as last file to your project.
                      10     ;  *** IMPORTANT NOTE ***:  this file needs to be the last file of the linker 
                      11     ;  input list.  If you are using uVision2 this file should be therefore the 
                      12     ;  last file in your project tree.
                      13     ;
                      14     ;
                      15     ;  To translate this file use Ax51 with the following invocation:
                      16     ;
                      17     ;     Ax51 INIT.A51
                      18     ;
                      19     ;  To link the modified INIT.OBJ file to your application use the following
                      20     ;  linker invocation:
                      21     ;
                      22     ;     Lx51 <your object file list>, INIT.OBJ <controls>
                      23     ;
                      24     ;------------------------------------------------------------------------------
                      25     ;
                      26     ;  User-defined Watch-Dog Refresh.
                      27     ;
                      28     ;  If the C application contains many initialized variables uses a watchdog
                      29     ;  it might be possible that the user has to include a watchdog refresh into
                      30     ;  the initialization process. The watchdog refresh routine can be included
                      31     ;  in the following MACRO and can alter all CPU registers except
                      32     ;  DPTR.
                      33     ;
                      34     WATCHDOG        MACRO
                      35                                     ; Include any Watchdog refresh code here
                      36                     ENDM
                      37     ;
                      38     ;------------------------------------------------------------------------------
                      39     ;
                      40     ;  Far Memory Support
                      41     ;
                      42     ;  If the C application contains variables in the far memory space that are
                      43     ;  initialized, you need to set the following define to 1.
                      44     ;
                      45     ; --- Set XBANK = 1 when far variables should be initialized
                      46     $set  (XBANK = 0)
                      47     ;
                      48     ;------------------------------------------------------------------------------
                      49     ;
                      50     ;  Dallas 390/400/5240 CPU Contigious Mode
                      51     ;
                      52     ;  If you are using the Dallas Contigious Mode you need to set the following 
                      53     ;  define to 1.
                      54     ;
                      55     ; --- Set DS390 = 1 when CPU runs in Dallas Contigious Mode
                      56     $set  (DS390 = 0)
                      57     ;
A51 MACRO ASSEMBLER  INIT                                                                 08/31/2007 13:59:14 PAGE     2

                      58     ;------------------------------------------------------------------------------
                      59     
                      60     ; Standard SFR Symbols
  00E0                61     ACC     DATA    0E0H
  0082                62     DPL     DATA    82H
  0083                63     DPH     DATA    83H
                      64     
                      65                     NAME    ?C_INIT
                      66     
                      67     
                      68     ?C_C51STARTUP   SEGMENT   CODE
                      69     ?C_INITSEG      SEGMENT   CODE          ; Segment with Initializing Data
                      70     
                      71     INIT_IorP       MACRO
                      72     IorPData:                               ; If CY=1 PData Values
                      73                     CLR     A
                      74                     MOVC    A,@A+DPTR
                      75                     INC     DPTR
                      76                     MOV     R0,A            ; Start Address
                      77     IorPLoop:       CLR     A
                      78                     MOVC    A,@A+DPTR
                      79                     INC     DPTR
                      80                     JC      PData
                      81                     MOV     @R0,A
                      82                     SJMP    Common
                      83     PData:          MOVX    @R0,A
                      84     Common:         INC     R0
                      85                     DJNZ    R7,IorPLoop
                      86                     JMP    Loop
                      87                     ENDM
                      88     
                      89     
                      90                     EXTRN CODE (MAIN)
                      91                     PUBLIC  ?C_START
                      92     
----                  93                     RSEG    ?C_C51STARTUP
0000 020000   F       94     INITEND:        LJMP    MAIN
                      95     
                      96     $if  (XBANK = 0)
                      97                     INIT_IorP
                     113     $endif 
                     114     
0015 E4              115     Bits:           CLR     A
0016 93              116                     MOVC    A,@A+DPTR
0017 A3              117                     INC     DPTR
0018 F8              118                     MOV     R0,A
0019 5407            119                     ANL     A,#007H
001B 240C            120                     ADD     A,#Table-LoadTab
001D C8              121                     XCH     A,R0
001E C3              122                     CLR     C       
001F 33              123                     RLC     A               ; Bit Condition to Carry
0020 C4              124                     SWAP    A
0021 540F            125                     ANL     A,#00FH
0023 4420            126                     ORL     A,#20H          ; Bit Address
0025 C8              127                     XCH     A,R0            ; convert to Byte Addressen
0026 83              128                     MOVC    A,@A+PC
0027 4004            129     LoadTab:        JC      Setzen
0029 F4              130                     CPL     A
002A 56              131                     ANL     A,@R0
002B 8001            132                     SJMP    BitReady
002D 46              133     Setzen:         ORL     A,@R0
002E F6              134     BitReady:       MOV     @R0,A
002F DFE4            135                     DJNZ    R7,Bits
0031 800B            136                     SJMP    Loop
                     137     
0033 01              138     Table:          DB      00000001B
A51 MACRO ASSEMBLER  INIT                                                                 08/31/2007 13:59:14 PAGE     3

0034 02              139                     DB      00000010B
0035 04              140                     DB      00000100B
0036 08              141                     DB      00001000B
0037 10              142                     DB      00010000B
0038 20              143                     DB      00100000B
0039 40              144                     DB      01000000B
003A 80              145                     DB      10000000B
                     146                     
                     147     
003B                 148     ?C_START:       
003B 900000   F      149                     MOV     DPTR,#?C_INITSEG
003E                 150     Loop:
                     151                     WATCHDOG
003E E4              153                     CLR     A
003F 7E01            154                     MOV     R6,#1
0041 93              155                     MOVC    A,@A+DPTR
0042 60BC            156                     JZ      INITEND
0044 A3              157                     INC     DPTR
0045 FF              158                     MOV     R7,A
0046 543F            159                     ANL     A,#3FH
0048 30E509          160                     JNB     ACC.5,NOBIG
004B 541F            161                     ANL     A,#01FH
004D FE              162                     MOV     R6,A
004E E4              163                     CLR     A
004F 93              164                     MOVC    A,@A+DPTR
0050 A3              165                     INC     DPTR
0051 6001            166                     JZ      NOBIG
0053 0E              167                     INC     R6
0054 CF              168     NOBIG:          XCH     A,R7
                     169     
                     170     ; ---- Init for far Variables
                     171     $if  (XBANK = 1)
                             EXTRN CODE (?C?CSTPTR)
                                             ANL     A,#0E0H
                                             CJNE    A,#0E0H,NOHDATA
                             ;
                             HPTRINIT:       CLR     A

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -