|
|
|
|
MON51 User's Guide
MON_BANK.A51
When you install Monitor-51 for code banking, you must specify the
number of code banks your hardware provides as well as how the code
banks are switched. This is done by changing constants defined in the
assembly module MON_BANK.A51.
MON_BANK.A51 Constants
The banking method as well as the number of banks and thus the
number of address lines used are configured using this source file.
MON_BANK.A51 contains EQU statements at the beginning which are used
for the configuration. Following is a listing of these as well as a
description of each.
;************************ Configuration Section ****************************
?B_NBANKS EQU 8 ; Define max. Number of Code Banks (not *
; ; including XDATA or COMMON bank). *
; ; The max. value for ?B_BANKS is 32 *
; ; possible values are: 1,2,3,...32 *
; *
?B_MODE EQU 0 ; 0 for Bank-Switching via 8051 Port *
; ; 1 for Bank-Switching via XDATA Port *
; *
?B_BANKSTART EQU 08000H ; defines the start address of the code *
; ; banking area *
; *
?B_BANKEND EQU 0FFFFH ; defines the end address of the code *
; ; banking area *
; *
?B_COMMON EQU 0FFH ; 0FFH if the COMMON area is not mapped *
; ; into a code bank, otherwise *
; ; ?B_COMMON must be set to the bank *
; ; number which contains the COMMON area *
; *
?B_XRAM EQU 0FFH ; 0FFH if the XDATA RAM area is not *
; ; mapped into a code bank, otherwise *
; ; ?B_XRAM must be set to the bank number *
; ; which contains the XDATA RAM area *
; *
?B_MON_DATA_BANK EQU 007H ; Bank number where monitor data is *
; ; stored. *
; *
IF ?B_MODE = 0; *
;--------------------------------------------------------------------------*
; if ?BANK?MODE is 0 define the following values *
; For Bank-Switching via 8051 Port define Port Address / Bits *
?B_PORT EQU P1 ; default is P6 *
?B_FIRSTBIT EQU 0 ; default is Bit 5 *
;--------------------------------------------------------------------------*
-
?B_NBANKS indicates the number of banks to be supported.
The number must be between 2 and 32. Only one 8051 address line
(port terminal) is used for two banks. Three or four banks require
two address lines. Five to eight banks require three address lines.
Nine to sixteen banks require four address lines. Seventeen to
thirty-two banks require five address lines.
-
?B_MODE indicates if the bank switching code should use
an 8051 port or an XDATA port for the address extension. A value of
0 defines an arbitrary 8051 port for the address extension. A value
of 1 determines a XDATA port which is addressed in the external
address space of the 8051.
-
?B_BANKSTART specifies the start address of the banking
area. The value 0 means, that there is no physical common area. In
this case, the logical common area is automatically copied into
every code bank during the load process of your application. The
value 0FFFFH specifies, that you are running a banked version of
Monitor-51 on a non-banked hardware. 8000H is defined as the
default value.
-
?B_BANKEND specifies the end address of the banking
area. This value must be greater or equal than ?B_BANKSTART. 0FFFFH
is defined as the default value.
-
?B_COMMON indicates whether the physical common area
must be accessed as a bank or not. The default value 0FFH
specifies, that the common area is not mapped to a bank. Any other
value specifies the bank number of the common area. This option is
used to separate the common area and XDATA area, although the
common area is 'von Neumann' mapped.
-
?B_XRAM indicates whether the XDATA area must be
accessed as a bank or not. The default value 0FFH specifies, that
the XDATA area is not mapped to a bank. Any other value specifies
the bank number of the XDATA area. This option is used to separate
the common and XDATA area. Both, ?B_COMMON and ?B_XRAM have to be
set to 0FFH or both to different values.
-
?B_MON_DATA_BANK specifies the bank number of the XDATA
area used by Monitor-51. In order to save memory space, the 256
byte monitor XDATA area and the optional 5KB trace memory can be
located in a code bank instead of the commonarea.
-
?B_PORT specifies the port address used to select the
bank address. If the value 0 is used for ?B_MODE, ?B_PORT can be
used to specify the address of the internal data port. In this
case, the SFT address of an internal data port must be specified.
P1 is defined as the default value for port 1.
-
?B_XDATAPORT specifies the XDATA memory address used to
select the bank address. If the value 1 is used for ?B_MODE,
?B_XDATAPORT defines the address an external data port. In this
case, an arbitrary XDATA address can be specified (address range 0H
to 0FFFFH) under which a port can be addressed in the XDATA area.
0FFFFH is defined as the default value.
-
?B_FIRSTBIT indicates which bit of the defined port is
to be assigned first. The value ?B_FIRSTBIT EQU 3 (defined as the
default when ?B_MODE is 0) indicates that P1.3 is to be used as the
first port terminal for the address extension. If, for example two
port terminals are used for the extension, P1.3 and P1.4 are used
in this case. The remaining lines of the 8051 port can be used for
other purposes. If the value 1 is selected for ?B_MODE, remaining
bits of the XDATA port cannot be used for other purposes.
|
|
|