📄 ncrt0.lst
字号:
* M16C FAMILY ASSEMBLER * SOURCE LIST Fri Feb 25 10:58:05 2005 PAGE 001
SEQ. LOC. OBJ. 0XMSDA ....*....SOURCE STATEMENT....7....*....8....*....9....*....0....*....1....*....2....*....3....*....4
1 ;*************************************************************************** ;
2 ; C COMPILER for M16C/60
3 ; Copyright 1995-1998 MITSUBISHI ELECTRIC CORPORATION
4 ; AND MITSUBISHI ELECTRIC SEMICONDUCTOR SYSTEMS CORPORATION
5 ; All Rights Reserved.
6 ;
7 ; ncrt0.a30 : NC30 startup program
8 ;
9 ; This program is applicable when using the basic I/O library
10 ;
11 ; $Id: ncrt0.a30,v 1.9 97/11/05 11:27:21 ookura Exp $
12 ;
13 ;***************************************************************************
14
15 00000004h PM0 .equ 0004H ; upd 2000.02.08 sawada PMOD -> PM0
16 00000005h PM1 .equ 0005H ; add 2000.02.08 sawada
17
18 ;---------------------------------------------------------------------
19 ; HEEP SIZE definition
20 ;---------------------------------------------------------------------
21 00000000h HEAPSIZE .equ 0h
22
23 ;---------------------------------------------------------------------
24 ; STACK SIZE definition
25 ;---------------------------------------------------------------------
26 00000300h STACKSIZE .equ 300h
27
28 ;---------------------------------------------------------------------
29 ; INTERRUPT STACK SIZE definition
30 ;---------------------------------------------------------------------
31 00000300h ISTACKSIZE .equ 300h
32
33 ;---------------------------------------------------------------------
34 ; INTERRUPT VECTOR ADDRESS definition
35 ;---------------------------------------------------------------------
36 00005000h VECTOR_ADR .equ 5000h
37
38 ;---------------------------------------------------------------
39 ; special page defination
40 ;---------------------------------------------------------------
41 ; macro define for special page
42 ;
43 ;Format:
44 ; SPECIAL number
45 ;
46
47 D SPECIAL .macro NUM
48 D .org 0FFFFEH-(NUM*2)
49 D .glb __SPECIAL_@NUM
50 D .word __SPECIAL_@NUM & 0FFFFH
51 .endm
52 ;---------------------------------------------------------------------
53 ; Section allocation
54 ;---------------------------------------------------------------------
55 .list OFF
56 .include sect30.inc
ncrt0.a30 56 Error (mac30): Can't open include file 'sect30.inc'
57 .list ON
58
59 ;---------------------------------------------------------------------
60 ; SBDATA area definition
61 ;---------------------------------------------------------------------
62 .glb __SB__
* M16C FAMILY ASSEMBLER * SOURCE LIST Fri Feb 25 10:58:05 2005 PAGE 002
SEQ. LOC. OBJ. 0XMSDA ....*....SOURCE STATEMENT....7....*....8....*....9....*....0....*....1....*....2....*....3....*....4
63 __SB__ .equ data_SE_top
ncrt0.a30 63 Error (asp30): Operand value is not defined
64
65 ;====================================================================
66 ; Initialize Macro declaration
67 ;---------------------------------------------------------------------
68 D N_BZERO .macro TOP_ ,SECT_
69 D mov.b #00H, R0L
70 D mov.w #(TOP_ & 0FFFFH), A1
71 D mov.w #sizeof SECT_ , R3
72 D sstr.b
73 .endm
74
75 D N_BCOPY .macro FROM_,TO_,SECT_
76 D mov.w #(FROM_ & 0FFFFH),A0
77 D mov.b #(FROM_ >>16),R1H
78 D mov.w #TO_ ,A1
79 D mov.w #sizeof SECT_ , R3
80 D smovf.b
81 .endm
82
83 D BZERO .macro TOP_,SECT_
84 D push.w #sizeof SECT_ >> 16
85 D push.w #sizeof SECT_ & 0ffffh
86 D pusha TOP_ >>16
87 D pusha TOP_ & 0ffffh
88 D
89 D .glb _bzero
90 D jsr.a _bzero
91 .endm
92
93
94 D BCOPY .macro FROM_ ,TO_ ,SECT_
95 D push.w #sizeof SECT_ >> 16
96 D push.w #sizeof SECT_ & 0ffffh
97 D pusha TO_ >>16
98 D pusha TO_ & 0ffffh
99 D pusha FROM_ >>16
100 D pusha FROM_ & 0ffffh
101 D
102 D .glb _bcopy
103 D jsr.a _bcopy
104 .endm
105
106 ;====================================================================
107 ; Interrupt section start
108 ;---------------------------------------------------------------------
109 .glb start
110 .section interrupt
111 00000 start:
112 ;---------------------------------------------------------------------
113 ; after reset,this program will start
114 ;---------------------------------------------------------------------
115 00000 7DA7 ldipl #7 ; disable interrupt
116 00002 EB400000e ldc #istack_top, isp ;set istack pointer
ncrt0.a30 116 Error (asp30): Undefined symbol exist 'istack_top'
117 00006 7E9F5100 bset 1,0ah
118 0000A C7030400 S mov.b #03,PM0 ; Set Processor Mode Regsiter 0 ; edt 2000.02.08 sawada PMOD
119 ; (BCLK=Off, P4=Addr, Bus=separate, R/W=BHE, Processor Mode=micro processor)
120 ; mov.b #080H,PM1 ; Set Processor Mode Regsiter 1 ; add 2000.02.08 sawada
121 ; (WaitBit=On) ; add 2000.02.08 sawada
122 0000E 7E8F5100 bclr 1,0ah
* M16C FAMILY ASSEMBLER * SOURCE LIST Fri Feb 25 10:58:05 2005 PAGE 003
SEQ. LOC. OBJ. 0XMSDA ....*....SOURCE STATEMENT....7....*....8....*....9....*....0....*....1....*....2....*....3....*....4
123 00012 7E9F5000 bset 0,0AH
124 00016 C7080600 S mov.b #08H,0006H ; Set System Clock Control 0 Regsiter
125 ; (Xin, CM16,17 enable, Xin enable, Xcin disable, Xcin=High, in wait f1 enable, P57 enable)
126 0001A 7E8F5000 bclr 0,0AH
127 ; mov.b #00FH,0008H ; Set Chip Select Control Register ; add 2000.02.08 saw
128 ; (CS3-0 Wait=On, Output=Enable) ; add 2000.02.08 saw
129 ; mov.b #001H,40F9H ; Set System Clock Change Register ; add 2000.02.08 saw
130 ; (CLK=6.4MHz) ; add 2000.02.08 saw
131 0001E B74B00 Z mov.b #0,004BH ; disable DMA0 interrupt
132 00021 B74C00 Z mov.b #0,004CH ; disable DMA1 interrupt
133 00024 B74D00 Z mov.b #0,004DH ; disable Key interrupt
134 00027 B74E00 Z mov.b #0,004EH ; disable ADconvert interrupt
135 0002A B75100 Z mov.b #0,0051H ; disable UART0 Tx interrupt
136 0002D B75200 Z mov.b #0,0052H ; disable UART0 Rx interrupt
137 00030 B75300 Z mov.b #0,0053H ; disable UART1 Tx interrupt
138 00033 B75400 Z mov.b #0,0054H ; disable UART1 Rx interrupt
139 00036 B75500 Z mov.b #0,0055H ; disable TA0 interrupt
140 00039 B75600 Z mov.b #0,0056H ; disable TA1 interrupt
141 0003C B75700 Z mov.b #0,0057H ; disable TA2 interrupt
142 0003F B75800 Z mov.b #0,0058H ; disable TA3 interrupt
143 00042 B75900 Z mov.b #0,0059H ; disable TA4 interrupt
144 00045 B75A00 Z mov.b #0,005AH ; disable TB0 interrupt
145 00048 B75B00 Z mov.b #0,005BH ; disable TB1 interrupt
146 0004B B75C00 Z mov.b #0,005CH ; disable TB2 interrupt
147 0004E B75D00 Z mov.b #0,005DH ; disable INT0 interrupt
148 00051 B75E00 Z mov.b #0,005EH ; disable INT1 interrupt
149 00054 B75F00 Z mov.b #0,005FH ; disable INT2 interrupt
150 00057 EB308000 ldc #0080h, flg
151 0005B EB500000e ldc #stack_top, sp ;set stack pointer
ncrt0.a30 151 Error (asp30): Undefined symbol exist 'stack_top'
152 0005F EB600000e ldc #data_SE_top, sb ;set sb register
ncrt0.a30 152 Error (asp30): Undefined symbol exist 'data_SE_top'
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -