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

📄 mon_bank.lst

📁 单片机C语言参考程序
💻 LST
字号:
A51 MACRO ASSEMBLER  MON_BANK                                                             03/11/2004 21:40:55 PAGE     1


MACRO ASSEMBLER A51 V7.07
OBJECT MODULE PLACED IN MON_BANK.OBJ
ASSEMBLER INVOKED BY: D:\Keil\C51\BIN\A51.EXE MON_BANK.A51

LOC  OBJ            LINE     SOURCE

                       1     $nocond  DEBUGPUBLICS
                       2     ;------------------------------------------------------------------------------
                       3     ;  This file is part of the Monitor-51 Version 3 package
                       4     ;  Copyright KEIL ELEKTRONIK GmbH 1998
                       5     ;  Version 3.0
                       6     ;
                       7     ;  Most of the settings in this file must conform with the settings
                       8     ;  in the file L51_BANK.A51 which is used for code banking with the
                       9     ;  BL51 Linker/Locater
                      10     ;
                      11     ;------------------------------------------------------------------------------
                      12     ;************************ Configuration Section *******************************
  0008                13     ?B_NBANKS       EQU     8        ; Define max. Number of Code Banks (not      *
                      14     ;                                ; including XDATA or COMMON bank).           *
                      15     ;                                ; The max. value for ?B_BANKS is 32          *
                      16     ;                                ; possible values are: 1,2,3,...32           *
                      17     ;                                                                             *
  0000                18     ?B_MODE         EQU     0        ; 0 for Bank-Switching via 8051 Port         *
                      19     ;                                ; 1 for Bank-Switching via XDATA Port        *
                      20     ;                                                                             *
  8000                21     ?B_BANKSTART    EQU     08000H   ; defines the start address of the code      *
                      22     ;                                ; banking area                               *
                      23     ;                                                                             *
  FFFF                24     ?B_BANKEND      EQU     0FFFFH   ; defines the end address of the code        *
                      25     ;                                ; banking area                               *
                      26     ;                                                                             *
  00FF                27     ?B_COMMON       EQU     0FFH     ; 0FFH if the COMMON area is not mapped into *
                      28     ;                                ; a code bank.                               *
                      29     ;                                ; otherwise ?B_COMMON must be set to the     *
                      30     ;                                ; bank number which contains the COMMON area *
                      31     ;                                                                             *
  00FF                32     ?B_XRAM         EQU     0FFH     ; 0FFH if the XDATA RAM area is not mapped   *
                      33     ;                                ; into a code bank.                          *
                      34     ;                                ; otherwise ?B_XRAM must be set to the bank  *
                      35     ;                                ; number which contains the XDATA RAM area   *
                      36     ;                                                                             *
  0007                37     ?B_MON_DATA_BANK EQU    007H     ; Bank number where monitor data is stored   *
                      38     ;                                                                             *
                      39     IF  ?B_MODE = 0;                                                              *
                      40     ;-----------------------------------------------------------------------------*
                      41     ; if ?BANK?MODE is 0 define the following values                              *
                      42     ; For Bank-Switching via 8051 Port define Port Address / Bits                 *
  0090                43     ?B_PORT         EQU     P1       ; default is P1                              *
  0003                44     ?B_FIRSTBIT     EQU     3        ; default is Bit 3                           *
                      45     ;-----------------------------------------------------------------------------*
                      46     ENDIF;                                                                        *
                      47     ;
                             ENDIF;                                                                        *
                      56     ;                                                                             *
                      57     ;                                                                             *
                      58     ;******************************************************************************
                      59     
                      60                     NAME    ?BANK?SWITCHING
                      61     
                      62                     PUBLIC  ?B_NBANKS       ; Number of Banks
                      63                     PUBLIC  ?B_MODE         ; Banking Mode (currently 0)
                      64                     PUBLIC  ?B_COMMON       ; Bank Number of the COMMON area
                      65                     PUBLIC  ?B_XRAM         ; Bank Number of the XDATA RAM area
A51 MACRO ASSEMBLER  MON_BANK                                                             03/11/2004 21:40:55 PAGE     2

                      66                     PUBLIC  ?B_SWITCHBANK   ; Change to the Bank specified in ACC
                      67                     PUBLIC  ?B_GETCURRBANK  ; Returns in ACC the current Code Bank
                      68                     PUBLIC  ?B_BANKSTART    ; Banking Area Start Address
                      69                     PUBLIC  ?B_BANKEND      ; Banking Area End Address
                      70                     PUBLIC  ?B_INITBANKING  ; e.g. Initialize the Bank Ident Number
                      71                     PUBLIC  ?B_MON_DATA_BANK; Bank number where monitor data is stored
                      72     
                      73     ; generate Mask and Bank Number Information
                             ELSEIF  ?B_NBANKS <= 8
  0007                79       MASK          EQU     00000111B
                             ENDIF     
                      85     
  0038                86     ?B_MASK         EQU     MASK SHL ?B_FIRSTBIT
                      87     
                      88     
                      89     CODE_AREA       SEGMENT CODE
----                  90                     RSEG    CODE_AREA
                      91     
                               ENDIF
                               ENDIF
                               ENDIF
                     107     
                     108       IF  ?B_FIRSTBIT = 3
                     109       CONVTOPIN     MACRO
                     110                     SWAP    A
                     111                     RR      A
                     112                     ENDM
                     113       ENDIF
                     114     
                               ENDIF
                     120     
                               ENDIF
                     127     
                               ENDIF
                     134     
                               ENDIF
                     140     
                               ENDIF
                               ENDIF
                               ENDIF
                     156     
                     157       IF  ?B_FIRSTBIT = 3
                     158       CONVTOBANK    MACRO
                     159                     SWAP    A
                     160                     RL      A
                     161                     ENDM
                     162       ENDIF
                     163     
                               ENDIF
                     169     
                               ENDIF
                     176     
                               ENDIF
                     183     
                               ENDIF
                     189     
                     190     ;------------------------
                     191     ;  Switchbank function
                     192     ;------------------------
                     193      
                     194     IF  ?B_MODE = 0;
0000                 195     ?B_SWITCHBANK:
                             ENDIF
0000 5407            200     SWB1:           ANL     A,#MASK
                     201                     CONVTOPIN
0004 5390C7          204                     ANL     ?B_PORT,#LOW (NOT ?B_MASK)
A51 MACRO ASSEMBLER  MON_BANK                                                             03/11/2004 21:40:55 PAGE     3

0007 4290            205                     ORL     ?B_PORT,A
0009 00              206                     NOP
000A 22              207                     RET
                     208     ENDIF
                     209     
                             ENDIF
                     225     
                     226     ;------------------------
                     227     ; Getbank function
                     228     ;------------------------
                     229     
                     230     IF  ?B_MODE = 0;
000B E590            231     ?B_GETCURRBANK: MOV     A,?B_PORT
                     232                     CONVTOBANK
000F 5407            235                     ANL     A,#MASK
0011 22              236                     RET
                     237     ENDIF
                     238     
                             ENDIF
                     250     
                     251     ;------------------------
                     252     ; Init banking system
                     253     ;------------------------
                     254     
0012                 255     ?B_INITBANKING: 
                     256     ; -----
                     257     ; Add here code for user hardware initilization
                     258     
                     259     ; -----
                     260     
                             ENDIF
0012 22              275                     RET
                     276     
A51 MACRO ASSEMBLER  MON_BANK                                                             03/11/2004 21:40:55 PAGE     4

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


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

?BANK?SWITCHING. .  N NUMB   -----       
?B_BANKEND . . . .  N NUMB   FFFFH   A   
?B_BANKSTART . . .  N NUMB   8000H   A   
?B_COMMON. . . . .  N NUMB   00FFH   A   
?B_FIRSTBIT. . . .  N NUMB   0003H   A   
?B_GETCURRBANK . .  C ADDR   000BH   R   SEG=CODE_AREA
?B_INITBANKING . .  C ADDR   0012H   R   SEG=CODE_AREA
?B_MASK. . . . . .  N NUMB   0038H   A   
?B_MODE. . . . . .  N NUMB   0000H   A   
?B_MON_DATA_BANK .  N NUMB   0007H   A   
?B_NBANKS. . . . .  N NUMB   0008H   A   
?B_PORT. . . . . .  D ADDR   0090H   A   
?B_SWITCHBANK. . .  C ADDR   0000H   R   SEG=CODE_AREA
?B_XRAM. . . . . .  N NUMB   00FFH   A   
CODE_AREA. . . . .  C SEG    0013H       REL=UNIT
MASK . . . . . . .  N NUMB   0007H   A   
P1 . . . . . . . .  D ADDR   0090H   A   
SWB1 . . . . . . .  C ADDR   0000H   R   SEG=CODE_AREA


REGISTER BANK(S) USED: 0 

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

⌨️ 快捷键说明

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