📄 start_mx.lst
字号:
AX51 MACRO ASSEMBLER START_MX 11/21/05 17:35:22 PAGE 1
MACRO ASSEMBLER AX51 V3.01
OBJECT MODULE PLACED IN .\Keil\START_MX.obj
ASSEMBLER INVOKED BY: C:\Keil\C51\BIN\AX51.EXE START_MX.A51 MOD_MX51 SET(SMALL) DEBUG PRINT(.\Keil\START_MX.lst) OBJECT(
.\Keil\START_MX.obj) EP
LOC OBJ LINE SOURCE
1 $mod_mx51
2 ;------------------------------------------------------------------------------
3 ; This file is part of the PK51 Professional Developers Kit
4 ; Startup Code for the Philips 80C51MX architecture
5 ; Copyright (c) 2000-2002 Keil Elektronik GmbH and Keil Software, Inc.
6 ; Version 1.03
7 ;------------------------------------------------------------------------------
8 ; START_MX.A51: This code is executed after processor reset.
9 ; You may add this file to a uVision2 project.
10 ;
11 ; To translate this file manually use AX51 with the following invocation:
12 ;
13 ; AX51 START_MX.A51
14 ;
15 ; To link the modified START_MX.OBJ file to your application use the
16 ; following LX51 invocation:
17 ;
18 ; LX51 START_MX.OBJ, <your object file list> <controls>
19 ;
20 ;------------------------------------------------------------------------------
21 ;
22 ; Setup 80C51MX Configuration Register (MXCON)
23 ;
24 ; Extended Call Return Mode (intermixed subroutine call with ECALL/LCALL/ACALL)
25 ; ECRM Val Description
26 ; --- --- -----------
0000 27 ECRM EQU 0 ; 0 = classic CALL/RET instructions with 2-byte stack frame
28 ; ; 1 = CALL/RET save and restore the full 3-byte program counter
29 ; NOTE: ECRM is only available on some devices, check your chip specification
30 ; ECRM Mode is currently available only on 8xC51MB2/MC2 devices.
31 ;
32 ; Extended Addressing Mode (enable upper address multiplex on Port 2)
33 ; EAM Val Description
34 ; --- --- -----------
0001 35 EAM EQU 1 ; 0 = do not change configuration state of the CPU
36 ; ; 1 = enable extended addressing mode (multiplex A16..A22 on Port 2)
37 ;
38 ; Extended Stack Memory Mode (16-bit Stack Pointer)
39 ; ESMM Val Description
40 ; ---- --- -----------
0000 41 ESMM EQU 0 ; 0 = classic 8051 stack pointer (8-bit) addressing IDATA space
42 ; ; 1 = extended 16-bit stack pointer addressing EDATA space
43 ;
44 ; Extended Interrupt Frame
45 ; EIFM Val Description
46 ; -- --- -----------
0001 47 EIFM EQU 1 ; 0 = classic 8051 interrupt frame (16-bit address pushed)
48 ; ; 1 = extended 24-bit interrupt frame (3 bytes pushed on interrupt)
49 ;
50 ;
51 ;
52 ; Setup Additional Features (AUXR, AUXR1)
53 ;
54 ; XDATA access (External XDATA space)
55 ; EXTRAM Val Description
56 ; --- --- -----------
0000 57 EXTRAM EQU 0; 0 = access on-chip XDATA RAM
AX51 MACRO ASSEMBLER START_MX 11/21/05 17:35:22 PAGE 2
58 ; ; 1 = disable on-chip XDATA and access off-chip XDATA space
59 ;
60 ; ALE (Address Latch Enable) Output Signal
61 ; AO Val Description
62 ; -- --- -----------
0000 63 AO EQU 0 ; 0 = ALE signal is generate at a constant rate
64 ; ; 1 = ALE signal is active only during a MOVX or MOVC instruction
65 ;
66 ; Low Volatage (Vcc) configuration
67 ; LPEP Val Description
68 ; ---- --- -----------
0000 69 LPEP EQU 0 ; 0 = chip supply volatage (Vcc) is above 4V
70 ; ; 1 = chip supply volatage (Vcc) is below 4V
71 ;------------------------------------------------------------------------------
72 ;
73 ; CPU Stack Size Definition
74 ;
75 ; The following EQU statement defines the stack space available in extended
76 ; stack mode (ESMM set to 1) for the application program. It should be noted
77 ; that the stack space must be adjusted according the actual requirements of
78 ; the application.
79 ;
0100 80 STACKSIZE EQU 100H ; set to 100H Bytes.
81 ;
82 ;------------------------------------------------------------------------------
83 ;
84 ; User-defined Power-On Initialization of Memory
85 ;
86 ; With the following EQU statements the initialization of memory
87 ; at processor reset can be defined:
88 ;
89 ; ; the absolute start-address of IDATA memory is always 0
00FF 90 IDATALEN EQU 0FFH ; the length of IDATA memory in bytes.
91 ;
0000 92 XDATASTART EQU 0H ; the absolute start-address of XDATA memory
02FF 93 XDATALEN EQU 2FFH ; the length of XDATA memory in bytes.
94 ;
0000 95 PDATASTART EQU 0H ; the absolute start-address of PDATA memory
0000 96 PDATALEN EQU 0H ; the length of PDATA memory in bytes.
97 ;
98 ; Notes: The IDATA space overlaps physically the DATA and BIT areas of the
99 ; 80C51MX CPU.
100 ;------------------------------------------------------------------------------
101 ;
102 ; Reentrant Stack Initilization
103 ;
104 ; The following EQU statements define the stack pointer for reentrant
105 ; functions and initialized it:
106 ;
107 ; Stack Space for reentrant functions in the SMALL model.
0000 108 IBPSTACK EQU 0 ; set to 1 if small reentrant is used.
0100 109 IBPSTACKTOP EQU 0FFH+1 ; set top of stack to highest location+1.
110 ;
111 ; Stack Space for reentrant functions in the LARGE model.
0000 112 XBPSTACK EQU 0 ; set to 1 if large reentrant is used.
00010000 113 XBPSTACKTOP EQU 0FFFFH+1; set top of stack to highest location+1.
114 ;
115 ; Stack Space for reentrant functions in the COMPACT model.
0000 116 PBPSTACK EQU 0 ; set to 1 if compact reentrant is used.
00010000 117 PBPSTACKTOP EQU 0FFFFH+1; set top of stack to highest location+1.
118 ;
119 ;------------------------------------------------------------------------------
120 ;
121 ; Page Definition for Using the Compact Model with 64 KByte xdata RAM
122 ;
123 ; The following EQU statements define the xdata page used for pdata
AX51 MACRO ASSEMBLER START_MX 11/21/05 17:35:22 PAGE 3
124 ; variables. The EQU PPAGE must conform with the PPAGE control used
125 ; in the linker invocation.
126 ;
0000 127 PPAGEENABLE EQU 0 ; set to 1 if pdata object are used.
0000 128 PPAGE EQU 0 ; define PPAGE number.
129 ;
130 ;------------------------------------------------------------------------------
131
132 ; Define CPU Symbols
0081 133 sfr SP = 0x81;
01FB 134 sfr SPE = 0x1FB;
008E 135 sfr AUXR = 0x8E;
00A2 136 sfr AUXR1 = 0xA2;
01FF 137 sfr MXCON = 0x1FF;
138
139 NAME ?C_STARTUP
140
------ 141 ?C_C51STARTUP SEGMENT CODE
142
143 IF ESMM == 1
?STACK SEGMENT EDATA
RSEG ?STACK
DS STACKSIZE ; Stack Space 100H Bytes
ELSE
150
------ 151 ?STACK SEGMENT IDATA
------ 152 RSEG ?STACK
000000 153 DS 1
154
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -