📄 ex4_root.lst
字号:
114: case PORTB_PAGE : portb_info();
0014 060000 JMP portb_info
115: break;
116: case PORTB_PAGE_DE : portb_info_detail();
0017 160000 JSR portb_info_detail
117: break;
118: }
119: }
001a 3d RTS
120:
121: /*******************************************************************
122: * root info display subroutine
123: * Description : Display root info via RS232
124: * :
125: * Example : N/A
126: * Input : N/A
127: * Output : N/A
128: * Modify : N/A
129: * Return : N/A
130: ********************************************************************/
131: void root_info()
132: {
Function: root_info
Source : D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\sources\ex4_root.c
Options : -DNON_BANK -Env"GENPATH=D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31;D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\bin;D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\cmd;D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\prm;D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\sources;C:\Program Files\Metrowerks\CodeWarrior CW12_V3.1\lib\HC12c\LIB;C:\Program Files\Metrowerks\CodeWarrior CW12_V3.1\lib\HC12c\SRC;C:\Program Files\Metrowerks\CodeWarrior CW12_V3.1\lib\HC12c\INCLUDE" -Env"LIBPATH=C:\Program Files\Metrowerks\CodeWarrior CW12_V3.1\lib\HC12c\INCLUDE" -Env"OBJPATH=D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\bin" -Env"TEXTPATH=D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\bin" -Lasm=%n.lst -ObjN="D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\S12_Ex4_Portb_ICD_CW31_Data\Flash_Application\ObjectCode\ex4_root.c.o" -Ol0
133: // hex_asc((byte)(RAM_Add>>8));
134: // hex_asc((byte)(RAM_Add));
135: // printf0("\r\n");
136: }
0000 3d RTS
137:
138: /*******************************************************************
139: * root menu subroutine
140: * Description : Root menu data to be displayed via RS232
141: * :
142: * Example : N/A
143: * Input : wait for terminal input
144: * Output : point to corresponding page
145: * Modify : N/A
146: * Return : N/A
147: ********************************************************************/
148: void root_menu(void)
149: {
Function: root_menu
Source : D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\sources\ex4_root.c
Options : -DNON_BANK -Env"GENPATH=D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31;D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\bin;D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\cmd;D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\prm;D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\sources;C:\Program Files\Metrowerks\CodeWarrior CW12_V3.1\lib\HC12c\LIB;C:\Program Files\Metrowerks\CodeWarrior CW12_V3.1\lib\HC12c\SRC;C:\Program Files\Metrowerks\CodeWarrior CW12_V3.1\lib\HC12c\INCLUDE" -Env"LIBPATH=C:\Program Files\Metrowerks\CodeWarrior CW12_V3.1\lib\HC12c\INCLUDE" -Env"OBJPATH=D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\bin" -Env"TEXTPATH=D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\bin" -Lasm=%n.lst -ObjN="D:\Profiles\r63492.FSL\My Documents\技术资料\培训教材\HCS12\S12 Ex4 Portb ICD CW31\S12_Ex4_Portb_ICD_CW31_Data\Flash_Application\ObjectCode\ex4_root.c.o" -Ol0
0000 1b9d LEAS -3,SP
150: byte cdata,loop=ENABLE;
0002 c601 LDAB #1
0004 6b81 STAB 1,SP
151:
152: while(loop==ENABLE)
153: {
154: printf0("\n Root Test Menu\r");
0006 cc0000 LDD #"\012\011\011Root Test Menu\015"
0009 160000 JSR printf0
155: printf0("\n 0. Root Test Menu\r");
000c cc0000 LDD #"\012\0110. Root Test Menu\015"
000f 160000 JSR printf0
156: printf0("\n 1. Modify RAM\r");
0012 cc0000 LDD #"\012\0111. Modify RAM\015"
0015 160000 JSR printf0
157: printf0("\n 2. PORTB Test Menu\r");
0018 cc0000 LDD #"\012\0112. PORTB Test Menu\015"
001b 160000 JSR printf0
158: printf0("\n 9. Display DATA\n\r");
001e cc0000 LDD #"\012\0119. Display DATA\012\015"
0021 160000 JSR printf0
159:
160: do
161: {
162: cdata=menurx_char0(ROOT_PAGE);
0024 c601 LDAB #1
0026 160000 JSR menurx_char0
0029 6b82 STAB 2,SP
163: if(cdata==CR || cdata=='9')
002b c10d CMPB #13
002d 270c BEQ *+14 ;abs = 003b
002f c139 CMPB #57
0031 2708 BEQ *+10 ;abs = 003b
164: break;
165: }
166: while((cdata>'2') || (cdata<'0'));
0033 c132 CMPB #50
0035 22ed BHI *-17 ;abs = 0024
0037 c130 CMPB #48
0039 25e9 BCS *-21 ;abs = 0024
167: //get input from user
168:
169: switch(cdata)
003b c139 CMPB #57
003d 2226 BHI *+40 ;abs = 0065
003f c130 CMPB #48
0041 6b80 STAB 0,SP
0043 250d BCS *+15 ;abs = 0052
0045 c132 CMPB #50
0047 2209 BHI *+11 ;abs = 0052
0049 c030 SUBB #48
004b 87 CLRA
004c 160000 JSR _CASE_DIRECT_BYTE
004f 1b DC.B 27
0050 09 DC.B 9
0051 0e DC.B 14
0052 c139 CMPB #57
0054 270c BEQ *+14 ;abs = 0062
0056 200d BRA *+15 ;abs = 0065
170: {
171: case '0': loop=DISABLE;
172: break;
173: case '1': init_RAM_start_address();
0058 160000 JSR init_RAM_start_address
174: break;
005b 2008 BRA *+10 ;abs = 0065
175: case '2': portb_test_menu();
005d 160000 JSR portb_test_menu
176: break;
0060 2003 BRA *+5 ;abs = 0065
177: case '9': data_display();
0062 160000 JSR data_display
0065 e681 LDAB 1,SP
0067 04119c DBEQ B,*-97 ;abs = 0006
178: break;
179:
180: }
181: }
182: }
006a 1b83 LEAS 3,SP
006c 3d RTS
183:
184:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -