📄 liveosci.rst
字号:
015A 5D 949 anl a,r5 015B F5 80 950 mov _IOA,a 951 ;liveosci.c:258: for(i=0; i<8; i++) 952 ; genPlus 953 ; genPlusIncr 015D 0C 954 inc r4 955 ; Peephole 112.b changed ljmp to sjmp 015E 80 C0 956 sjmp 00131$ 0160 957 00134$: 958 ;liveosci.c:272: if(keep_rck_high) 959 ; genIfx 0160 EA 960 mov a,r2 961 ; genIfxJump 962 ; Peephole 110 removed ljmp by inverse jump logic 0161 60 05 963 jz 00129$ 0163 964 00146$: 965 ;liveosci.c:274: SET_CKGEN_INT1_SREG_RCK_HIGH(); 966 ; genOr 0163 43 80 02 967 orl _IOA,#0x02 968 ; Peephole 112.b changed ljmp to sjmp 0166 80 07 969 sjmp 00135$ 0168 970 00129$: 971 ;liveosci.c:282: uint8 tmp=IOA; 972 ; genAssign 0168 AA 80 973 mov r2,_IOA 974 ;liveosci.c:283: SET_CKGEN_INT1_SREG_RCK_HIGH(); 975 ; genOr 016A 43 80 02 976 orl _IOA,#0x02 977 ;liveosci.c:284: IOA=tmp; 978 ; genAssign 016D 8A 80 979 mov _IOA,r2 016F 980 00135$: 016F 22 981 ret 982 ;------------------------------------------------------------ 983 ;Allocation info for local variables in function 'SetClockSpeed' 984 ;------------------------------------------------------------ 985 ;ckspeed Allocated to registers r2 986 ;rv Allocated to registers 987 ;j Allocated to registers 988 ;------------------------------------------------------------ 989 ;liveosci.c:292: static uint8 SetClockSpeed(uint8 ckspeed) 990 ; ----------------------------------------- 991 ; function SetClockSpeed 992 ; ----------------------------------------- 0170 993 _SetClockSpeed: 994 ; genReceive 0170 AA 82 995 mov r2,dpl 996 ;liveosci.c:303: WriteIOModuleConfig(/*keep_rck_high=*/1); 997 ; genCall 0172 75 82 01 998 mov dpl,#0x01 0175 C0 02 999 push ar2 0177 12 01 0C 1000 lcall _WriteIOModuleConfig 017A D0 02 1001 pop ar2 1002 ;liveosci.c:317: for(j=0; j<100; j++) 1003 ; genAssign 017C 7B 64 1004 mov r3,#0x64 017E 1005 00106$: 1006 ;liveosci.c:318: { NOP; NOP; NOP; NOP; NOP; NOP; NOP; NOP; NOP; NOP; } 1007 ; genInline 017E 00 1008 nop; 1009 ; genInline 017F 00 1010 nop; 1011 ; genInline 0180 00 1012 nop; 1013 ; genInline 0181 00 1014 nop; 1015 ; genInline 0182 00 1016 nop; 1017 ; genInline 0183 00 1018 nop; 1019 ; genInline 0184 00 1020 nop; 1021 ; genInline 0185 00 1022 nop; 1023 ; genInline 0186 00 1024 nop; 1025 ; genInline 0187 00 1026 nop; 1027 ; genDjnz 1028 ; Peephole 112.b changed ljmp to sjmp 1029 ; Peephole 205 optimized misc jump sequence 0188 DB F4 1030 djnz r3,00106$ 018A 1031 00111$: 018A 1032 00112$: 1033 ;liveosci.c:317: for(j=0; j<100; j++) 1034 ;liveosci.c:320: CkGen_SerialIOByte(CMD_CKGEN_SET_CLOCK_SPEED); 1035 ; genCall 018A 75 82 01 1036 mov dpl,#0x01 018D C0 02 1037 push ar2 018F 12 00 AD 1038 lcall _CkGen_SerialIOByte 0192 D0 02 1039 pop ar2 1040 ;liveosci.c:321: rv=(CkGen_SerialIOByte(ckspeed)!=CMD_CKGEN_SET_CLOCK_SPEED); 1041 ; genCall 0194 8A 82 1042 mov dpl,r2 0196 12 00 AD 1043 lcall _CkGen_SerialIOByte 0199 AA 82 1044 mov r2,dpl 1045 ; genCast 019B 7B 00 1046 mov r3,#0x00 1047 ; genCmpEq 1048 ; Peephole 241.b optimized compare 019D E4 1049 clr a 019E BA 01 04 1050 cjne r2,#0x01,00113$ 01A1 BB 00 01 1051 cjne r3,#0x00,00113$ 01A4 04 1052 inc a 01A5 1053 00113$: 01A5 1054 00114$: 1055 ; genNot 1056 ; Peephole 105 removed redundant mov 01A5 FA 1057 mov r2,a 01A6 B4 01 00 1058 cjne a,#0x01,00115$ 01A9 1059 00115$: 01A9 E4 1060 clr a 01AA 33 1061 rlc a 01AB F5 82 1062 mov dpl,a 1063 ;liveosci.c:326: SET_CKGEN_INT1_SREG_RCK_LOW(); 1064 ; genAssign 01AD AA 80 1065 mov r2,_IOA 1066 ; genAnd 01AF 74 FD 1067 mov a,#0xFD 01B1 5A 1068 anl a,r2 01B2 F5 80 1069 mov _IOA,a 1070 ;liveosci.c:328: return(rv); 1071 ; genRet 01B4 1072 00107$: 01B4 22 1073 ret 1074 ;------------------------------------------------------------ 1075 ;Allocation info for local variables in function 'SetIOModuleConfig' 1076 ;------------------------------------------------------------ 1077 ;config Allocated to registers 1078 ;------------------------------------------------------------ 1079 ;liveosci.c:336: static uint8 SetIOModuleConfig(uint8 config) 1080 ; ----------------------------------------- 1081 ; function SetIOModuleConfig 1082 ; ----------------------------------------- 01B5 1083 _SetIOModuleConfig: 1084 ; genReceive 01B5 85 82 08 1085 mov _iomodule_config,dpl 1086 ;liveosci.c:340: WriteIOModuleConfig(/*keep_rck_high=*/0); 1087 ; genCall 01B8 75 82 00 1088 mov dpl,#0x00 01BB 12 01 0C 1089 lcall _WriteIOModuleConfig 1090 ;liveosci.c:342: return(0); 1091 ; genRet 01BE 75 82 00 1092 mov dpl,#0x00 01C1 1093 00101$: 01C1 22 1094 ret 1095 ;------------------------------------------------------------ 1096 ;Allocation info for local variables in function 'HandleEP1Data' 1097 ;------------------------------------------------------------ 1098 ;len Allocated to registers r2 1099 ;buf Allocated to registers 1100 ;rv Allocated to registers r3 1101 ;speed Allocated to registers r4 1102 ;config Allocated to registers r4 1103 ;dest Allocated to registers 1104 ;------------------------------------------------------------ 1105 ;liveosci.c:348: static void HandleEP1Data(void) 1106 ; ----------------------------------------- 1107 ; function HandleEP1Data 1108 ; ----------------------------------------- 01C2 1109 _HandleEP1Data: 1110 ;liveosci.c:350: uint8 len=EP1OUTBC; // 0..64 1111 ; genAssign 01C2 90 E6 8D 1112 mov dptr,#_EP1OUTBC 01C5 E0 1113 movx a,@dptr 01C6 FA 1114 mov r2,a 1115 ;liveosci.c:351: xdata uint8 *buf=EP1OUTBUF; 1116 ;liveosci.c:352: uint8 rv=0xff; // "Unknown command." 1117 ; genAssign 01C7 7B FF 1118 mov r3,#0xFF 1119 ;liveosci.c:356: if(len<2) return; 1120 ; genCmpLt 1121 ; genCmp 01C9 BA 02 00 1122 cjne r2,#0x02,00120$ 01CC 1123 00120$: 1124 ; genIfxJump 1125 ; Peephole 108 removed ljmp by inverse jump logic 01CC 50 02 1126 jnc 00102$ 01CE 1127 00121$: 1128 ; genRet 1129 ; Peephole 112.b changed ljmp to sjmp 01CE 80 6D 1130 sjmp 00112$ 01D0 1131 00102$: 1132 ;liveosci.c:358: switch(*buf) 1133 ; genPointerGet 1134 ; genFarPointerGet 01D0 90 E7 80 1135 mov dptr,#_EP1OUTBUF 01D3 E0 1136 movx a,@dptr 01D4 FC 1137 mov r4,a 1138 ; genCast 01D5 7D 00 1139 mov r5,#0x00 1140 ; genCmpEq 01D7 BC 01 05 1141 cjne r4,#0x01,00122$ 01DA BD 00 02 1142 cjne r5,#0x00,00122$ 1143 ; Peephole 112.b changed ljmp to sjmp 01DD 80 08 1144 sjmp 00105$ 01DF 1145 00122$: 1146 ; genCmpEq 1147 ; Peephole 112.b changed ljmp to sjmp 1148 ;liveosci.c:368: } break; 1149 ; Peephole 112.b changed ljmp to sjmp 1150 ; Peephole 198 optimized misc jump sequence 01DF BC 02 31 1151 cjne r4,#0x02,00109$ 01E2 BD 00 2E 1152 cjne r5,#0x00,00109$ 01E5 80 17 1153 sjmp 00108$ 1154 ;00123$: 01E7 1155 00105$: 1156 ;liveosci.c:363: if(len>=3) 1157 ; genCmpLt 1158 ; genCmp 01E7 BA 03 00 1159 cjne r2,#0x03,00124$ 01EA 1160 00124$: 1161 ; genIfxJump 1162 ; Peephole 112.b changed ljmp to sjmp 1163 ; Peephole 160 removed sjmp by inverse jump logic 01EA 40 27 1164 jc 00109$ 01EC 1165 00125$: 1166 ;liveosci.c:365: uint8 speed=buf[2]; 1167 ; genPointerGet 1168 ; genFarPointerGet 01EC 90 E7 82 1169 mov dptr,#(_EP1OUTBUF + 0x0002) 01EF E0 1170 movx a,@dptr 1171 ;liveosci.c:366: rv=SetClockSpeed(speed); 1172 ; genCall 1173 ; Peephole 244.c loading dpl from a instead of r4 01F0 FC 1174 mov r4,a 01F1 F5 82 1175 mov dpl,a 01F3 C0 02 1176 push ar2 01F5 12 01 70 1177 lcall _SetClockSpeed 01F8 AB 82 1178 mov r3,dpl 01FA D0 02 1179 pop ar2 1180 ;liveosci.c:368: } break; 1181 ;liveosci.c:377: } break; 1182 ; Peephole 112.b changed ljmp to sjmp 01FC 80 15 1183 sjmp 00109$ 01FE 1184 00108$: 1185 ;liveosci.c:372: if(len>=
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -