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

📄 startup.lst

📁 C51环境下的KTV用的娱乐投票器
💻 LST
字号:
A51 MACRO ASSEMBLER  STARTUP                                                              08/21/2004 16:34:40 PAGE     1


MACRO ASSEMBLER A51 V7.00a
OBJECT MODULE PLACED IN C:\WAVE\PEI\YXKTV\STARTUP.OBJ
ASSEMBLER INVOKED BY: c:\keil\c51\BIN\A51.EXE C:\WAVE\PEI\YXKTV\STARTUP.ASM DB SB

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     ;  STARTUP.A51:  This code is executed after processor reset.
                       7     ;
                       8     ;  To translate this file use A51 with the following invocation:
                       9     ;
                      10     ;     A51 STARTUP.A51
                      11     ;
                      12     ;  To link the modified STARTUP.OBJ file to your application use the following
                      13     ;  BL51 invocation:
                      14     ;
                      15     ;     BL51 <your object file list>, STARTUP.OBJ <controls>
                      16     ;
                      17     ;------------------------------------------------------------------------------
                      18     ;
                      19     ;  User-defined Power-On Initialization of Memory
                      20     ;
                      21     ;  With the following EQU statements the initialization of memory
                      22     ;  at processor reset can be defined:
                      23     ;
                      24     ;               ; the absolute start-address of IDATA memory is always 0
                      25     
                      26     extrn data (InitOkNum,InitOkNum1)
                      27     
  00FF                28     IDATALEN        EQU     0ffH     ; the length of IDATA memory in bytes.
                      29     ;
  0000                30     XDATASTART      EQU     0H      ; the absolute start-address of XDATA memory
  0000                31     XDATALEN        EQU     0H      ; the length of XDATA memory in bytes.
                      32     ;
  0000                33     PDATASTART      EQU     0H      ; the absolute start-address of PDATA memory
  0000                34     PDATALEN        EQU     0H      ; the length of PDATA memory in bytes.
                      35     ;
                      36     ;  Notes:  The IDATA space overlaps physically the DATA and BIT areas of the
                      37     ;          8051 CPU. At minimum the memory space occupied from the C51
                      38     ;          run-time routines must be set to zero.
                      39     ;------------------------------------------------------------------------------
                      40     ;
                      41     ;  Reentrant Stack Initilization
                      42     ;
                      43     ;  The following EQU statements define the stack pointer for reentrant
                      44     ;  functions and initialized it:
                      45     ;
                      46     ;  Stack Space for reentrant functions in the SMALL model.
  0000                47     IBPSTACK        EQU     0       ; set to 1 if small reentrant is used.
  0100                48     IBPSTACKTOP     EQU     0FFH+1  ; set top of stack to highest location+1.
                      49     ;
                      50     ;  Stack Space for reentrant functions in the LARGE model.
  0000                51     XBPSTACK        EQU     0       ; set to 1 if large reentrant is used.
  0000                52     XBPSTACKTOP     EQU     0FFFFH+1; set top of stack to highest location+1.
                      53     ;
                      54     ;  Stack Space for reentrant functions in the COMPACT model.
  0000                55     PBPSTACK        EQU     0       ; set to 1 if compact reentrant is used.
  0000                56     PBPSTACKTOP     EQU     0FFFFH+1; set top of stack to highest location+1.
                      57     ;
                      58     ;------------------------------------------------------------------------------
A51 MACRO ASSEMBLER  STARTUP                                                              08/21/2004 16:34:40 PAGE     2

                      59     ;
                      60     ;  Page Definition for Using the Compact Model with 64 KByte xdata RAM
                      61     ;
                      62     ;  The following EQU statements define the xdata page used for pdata
                      63     ;  variables. The EQU PPAGE must conform with the PPAGE control used
                      64     ;  in the linker invocation.
                      65     ;
  0000                66     PPAGEENABLE     EQU     0       ; set to 1 if pdata object are used.
                      67     ;
  0000                68     PPAGE           EQU     0       ; define PPAGE number.
                      69     ;
  00A0                70     PPAGE_SFR       DATA    0A0H    ; SFR that supplies uppermost address byte
                      71     ;               (most 8051 variants use P2 as uppermost address byte)
                      72     ;
                      73     ;------------------------------------------------------------------------------
                      74     
                      75     ; Standard SFR Symbols
  00E0                76     ACC     DATA    0E0H
  00F0                77     B       DATA    0F0H
  0081                78     SP      DATA    81H
  0082                79     DPL     DATA    82H
  0083                80     DPH     DATA    83H
                      81     
                      82                     NAME    ?C_STARTUP
                      83     
                      84     
                      85     ?C_C51STARTUP   SEGMENT   CODE
                      86     ?STACK          SEGMENT   IDATA
                      87     
----                  88                     RSEG    ?STACK
0000                  89                     DS      1
                      90     
                      91                     EXTRN CODE (?C_START)
                      92                     PUBLIC  ?C_STARTUP
                      93     
----                  94                     CSEG    AT      0
0000 020000   F       95     ?C_STARTUP:     LJMP    STARTUP1
                      96     
----                  97                     RSEG    ?C_C51STARTUP
                      98     
0000                  99     STARTUP1:
                     100     
                     101     ;pei上电不清砇AM区 有未初始化但InitOkNum=aa 的情况
0000 E500     F      102                     mov a,InitOkNum
0002 B4A607          103                     cjne a,#0a6h,CLRRAM
                     104                     ;sjmp STARTUP2
0005 E500     F      105                     mov a,InitOkNum1
0007 B45A02          106                     cjne a,#05ah,CLRRAM
000A 8006            107                     sjmp STARTUP2
000C                 108     CLRRAM:
                     109     IF IDATALEN <> 0
000C 78FE            110                     MOV     R0,#IDATALEN - 1
000E E4              111                     CLR     A
000F F6              112     IDATALOOP:      MOV     @R0,A
0010 D8FD            113                     DJNZ    R0,IDATALOOP
                     114     ENDIF
0012                 115     STARTUP2:
                     116     IF XDATALEN <> 0
                                             MOV     DPTR,#XDATASTART
                                             MOV     R7,#LOW (XDATALEN)
                               IF (LOW (XDATALEN)) <> 0
                                             MOV     R6,#(HIGH (XDATALEN)) +1
                               ELSE
                                             MOV     R6,#HIGH (XDATALEN)
                               ENDIF
                                             CLR     A
A51 MACRO ASSEMBLER  STARTUP                                                              08/21/2004 16:34:40 PAGE     3

                             XDATALOOP:      MOVX    @DPTR,A
                                             INC     DPTR
                                             DJNZ    R7,XDATALOOP
                                             DJNZ    R6,XDATALOOP
                             ENDIF
                     130     
                     131     IF PPAGEENABLE <> 0
                                             MOV     PPAGE_SFR,#PPAGE
                             ENDIF
                     134     
                     135     IF PDATALEN <> 0
                                             MOV     R0,#LOW (PDATASTART)
                                             MOV     R7,#LOW (PDATALEN)
                                             CLR     A
                             PDATALOOP:      MOVX    @R0,A
                                             INC     R0
                                             DJNZ    R7,PDATALOOP
                             ENDIF
                     143     
                     144     IF IBPSTACK <> 0
                             EXTRN DATA (?C_IBP)
                             
                                             MOV     ?C_IBP,#LOW IBPSTACKTOP
                             ENDIF
                     149     
                     150     IF XBPSTACK <> 0
                             EXTRN DATA (?C_XBP)
                             
                                             MOV     ?C_XBP,#HIGH XBPSTACKTOP
                                             MOV     ?C_XBP+1,#LOW XBPSTACKTOP
                             ENDIF
                     156     
                     157     IF PBPSTACK <> 0
                             EXTRN DATA (?C_PBP)
                                             MOV     ?C_PBP,#LOW PBPSTACKTOP
                             ENDIF
                     161     
0012 758100   F      162                     MOV     SP,#?STACK-1
                     163     ; This code is required if you use L51_BANK.A51 with Banking Mode 4
                     164     ; EXTRN CODE (?B_SWITCH0)
                     165     ;               CALL    ?B_SWITCH0      ; init bank mechanism to code bank 0
0015 020000   F      166                     LJMP    ?C_START
                     167     
                     168                     END
A51 MACRO ASSEMBLER  STARTUP                                                              08/21/2004 16:34:40 PAGE     4

SYMBOL TABLE LISTING
------ ----- -------


N A M E             T Y P E  V A L U E   ATTRIBUTES

?C_C51STARTUP. . .  C SEG    0018H       REL=UNIT
?C_START . . . . .  C ADDR   -----       EXT
?C_STARTUP . . . .  C ADDR   0000H   A   
?STACK . . . . . .  I SEG    0001H       REL=UNIT
ACC. . . . . . . .  D ADDR   00E0H   A   
B. . . . . . . . .  D ADDR   00F0H   A   
CLRRAM . . . . . .  C ADDR   000CH   R   SEG=?C_C51STARTUP
DPH. . . . . . . .  D ADDR   0083H   A   
DPL. . . . . . . .  D ADDR   0082H   A   
IBPSTACK . . . . .  N NUMB   0000H   A   
IBPSTACKTOP. . . .  N NUMB   0100H   A   
IDATALEN . . . . .  N NUMB   00FFH   A   
IDATALOOP. . . . .  C ADDR   000FH   R   SEG=?C_C51STARTUP
INITOKNUM. . . . .  D ADDR   -----       EXT
INITOKNUM1 . . . .  D ADDR   -----       EXT
PBPSTACK . . . . .  N NUMB   0000H   A   
PBPSTACKTOP. . . .  N NUMB   0000H   A   
PDATALEN . . . . .  N NUMB   0000H   A   
PDATASTART . . . .  N NUMB   0000H   A   
PPAGE. . . . . . .  N NUMB   0000H   A   
PPAGEENABLE. . . .  N NUMB   0000H   A   
PPAGE_SFR. . . . .  D ADDR   00A0H   A   
SP . . . . . . . .  D ADDR   0081H   A   
STARTUP1 . . . . .  C ADDR   0000H   R   SEG=?C_C51STARTUP
STARTUP2 . . . . .  C ADDR   0012H   R   SEG=?C_C51STARTUP
XBPSTACK . . . . .  N NUMB   0000H   A   
XBPSTACKTOP. . . .  N NUMB   0000H   A   
XDATALEN . . . . .  N NUMB   0000H   A   
XDATASTART . . . .  N NUMB   0000H   A   


REGISTER BANK(S) USED: 0 

ASSEMBLY COMPLETE.  0 WARNING(S), 0 ERROR(S)

⌨️ 快捷键说明

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