📄 mc_display.ls
字号:
1959 037a 5b03 addw sp,#3
1960 ; 293 display_printstr(pdevice,Out);
1962 037c 96 ldw x,sp
1963 037d 1c0007 addw x,#OFST-8
1965 ; 295 break;
1967 0380 cc049b jp LC003
1968 0383 L717:
1969 ; 298 s16 wVal=((PFN_gets16_t)pSelTab->pField[i].pGetValue)();
1971 0383 7b0f ld a,(OFST+0,sp)
1972 0385 97 ld xl,a
1973 0386 a609 ld a,#9
1974 0388 160d ldw y,(OFST-2,sp)
1975 038a 42 mul x,a
1976 038b 90ee01 ldw y,(1,y)
1977 038e 90bf00 ldw c_x,y
1978 0391 72bb0000 addw x,c_x
1979 0395 ee05 ldw x,(5,x)
1980 0397 fd call (x)
1982 0398 1f03 ldw (OFST-12,sp),x
1983 ; 300 display_setcurrpos((display_index_t)10,(display_index_t)(i+1));
1985 039a 7b0f ld a,(OFST+0,sp)
1986 039c 4c inc a
1987 039d 97 ld xl,a
1988 039e a60a ld a,#10
1989 03a0 95 ld xh,a
1990 03a1 cd0050 call _display_setcurrpos
1992 ; 301 if (wVal < 0)
1994 03a4 1e03 ldw x,(OFST-12,sp)
1995 03a6 2a0f jrpl L3501
1996 ; 303 display_printchar(pdevice,'-');
1998 03a8 4b2d push #45
1999 03aa 1e11 ldw x,(OFST+2,sp)
2000 03ac cd006f call _display_printchar
2002 03af 84 pop a
2003 ; 304 wVal = -wVal;
2005 03b0 1e03 ldw x,(OFST-12,sp)
2006 03b2 50 negw x
2007 03b3 1f03 ldw (OFST-12,sp),x
2009 03b5 2008 jra L5501
2010 03b7 L3501:
2011 ; 308 display_printchar(pdevice,' ');
2013 03b7 4b20 push #32
2014 03b9 1e11 ldw x,(OFST+2,sp)
2015 03bb cd006f call _display_printchar
2017 03be 84 pop a
2018 03bf L5501:
2019 ; 310 display_setcurrpos((display_index_t)11,(display_index_t)(i+1));
2021 03bf 7b0f ld a,(OFST+0,sp)
2022 03c1 4c inc a
2023 03c2 97 ld xl,a
2024 03c3 a60b ld a,#11
2025 03c5 95 ld xh,a
2026 03c6 cd0050 call _display_setcurrpos
2028 ; 311 APP_sPrintDec(Out,wVal,5);
2030 03c9 4b05 push #5
2031 03cb 1e04 ldw x,(OFST-11,sp)
2032 03cd 89 pushw x
2033 03ce 96 ldw x,sp
2034 03cf 1c000a addw x,#OFST-5
2035 03d2 cd00f0 call _APP_sPrintDec
2037 03d5 5b03 addw sp,#3
2038 ; 312 display_printstr(pdevice,Out);
2040 03d7 96 ldw x,sp
2041 03d8 1c0007 addw x,#OFST-8
2043 ; 314 break;
2045 03db cc049b jp LC003
2046 03de L127:
2047 ; 317 u16 wVal=((PFN_getu16_t)pSelTab->pField[i].pGetValue)();
2049 03de 7b0f ld a,(OFST+0,sp)
2050 03e0 97 ld xl,a
2051 03e1 a609 ld a,#9
2052 03e3 160d ldw y,(OFST-2,sp)
2053 03e5 42 mul x,a
2054 03e6 90ee01 ldw y,(1,y)
2055 03e9 90bf00 ldw c_x,y
2056 03ec 72bb0000 addw x,c_x
2057 03f0 ee05 ldw x,(5,x)
2058 03f2 fd call (x)
2060 03f3 1f03 ldw (OFST-12,sp),x
2061 ; 319 display_setcurrpos((display_index_t)11,(display_index_t)(i+1));
2063 03f5 7b0f ld a,(OFST+0,sp)
2064 03f7 4c inc a
2065 03f8 97 ld xl,a
2066 03f9 a60b ld a,#11
2067 03fb 95 ld xh,a
2068 03fc cd0050 call _display_setcurrpos
2070 ; 320 bTmp = (u8)(wVal/10);
2072 03ff 1e03 ldw x,(OFST-12,sp)
2073 0401 90ae000a ldw y,#10
2074 0405 65 divw x,y
2075 0406 9f ld a,xl
2076 0407 6b06 ld (OFST-9,sp),a
2077 ; 321 APP_sPrintDec(Out,bTmp,2);
2079 0409 4b02 push #2
2080 040b 7b07 ld a,(OFST-8,sp)
2081 040d 5f clrw x
2082 040e 97 ld xl,a
2083 040f 89 pushw x
2084 0410 96 ldw x,sp
2085 0411 1c000a addw x,#OFST-5
2086 0414 cd00f0 call _APP_sPrintDec
2088 0417 5b03 addw sp,#3
2089 ; 323 display_printstr(pdevice,Out);
2091 0419 96 ldw x,sp
2092 041a 1c0007 addw x,#OFST-8
2093 041d 89 pushw x
2094 041e 1e12 ldw x,(OFST+3,sp)
2095 0420 cd008e call _display_printstr
2097 0423 85 popw x
2098 ; 324 display_setcurrpos((display_index_t)13,(display_index_t)(i+1));
2100 0424 7b0f ld a,(OFST+0,sp)
2101 0426 4c inc a
2102 0427 97 ld xl,a
2103 0428 a60d ld a,#13
2104 042a 95 ld xh,a
2105 042b cd0050 call _display_setcurrpos
2107 ; 325 display_printchar(pdevice,'.');
2109 042e 4b2e push #46
2110 0430 1e11 ldw x,(OFST+2,sp)
2111 0432 cd006f call _display_printchar
2113 0435 84 pop a
2114 ; 326 display_setcurrpos((display_index_t)14,(display_index_t)(i+1));
2116 0436 7b0f ld a,(OFST+0,sp)
2117 0438 4c inc a
2118 0439 97 ld xl,a
2119 043a a60e ld a,#14
2120 043c 95 ld xh,a
2121 043d cd0050 call _display_setcurrpos
2123 ; 327 APP_sPrintDec(Out,wVal-(bTmp*10),1);
2125 0440 4b01 push #1
2126 0442 7b07 ld a,(OFST-8,sp)
2127 0444 97 ld xl,a
2128 0445 a60a ld a,#10
2129 0447 42 mul x,a
2130 0448 1f02 ldw (OFST-13,sp),x
2131 044a 1e04 ldw x,(OFST-11,sp)
2132 044c 72f002 subw x,(OFST-13,sp)
2133 044f 89 pushw x
2134 0450 96 ldw x,sp
2135 0451 1c000a addw x,#OFST-5
2136 0454 cd00f0 call _APP_sPrintDec
2138 0457 5b03 addw sp,#3
2139 ; 328 display_printstr(pdevice,Out);
2141 0459 96 ldw x,sp
2142 045a 1c0007 addw x,#OFST-8
2144 ; 330 break;
2146 045d 203c jp LC003
2147 045f L327:
2148 ; 333 display_setcurrpos((display_index_t)11,(display_index_t)(i+1));
2150 045f 7b0f ld a,(OFST+0,sp)
2151 0461 4c inc a
2152 0462 97 ld xl,a
2153 0463 a60b ld a,#11
2154 0465 95 ld xh,a
2155 0466 cd0050 call _display_setcurrpos
2157 ; 334 display_printchar(pdevice,' ');
2159 0469 4b20 push #32
2160 046b 1e11 ldw x,(OFST+2,sp)
2161 046d cd006f call _display_printchar
2163 0470 84 pop a
2164 ; 335 display_setcurrpos((display_index_t)12,(display_index_t)(i+1));
2166 0471 7b0f ld a,(OFST+0,sp)
2167 0473 4c inc a
2168 0474 97 ld xl,a
2169 0475 a60c ld a,#12
2170 0477 95 ld xh,a
2171 0478 cd0050 call _display_setcurrpos
2173 ; 336 if (((PFN_getu8_t)pSelTab->pField[i].pGetValue)())
2175 047b 7b0f ld a,(OFST+0,sp)
2176 047d 97 ld xl,a
2177 047e a609 ld a,#9
2178 0480 160d ldw y,(OFST-2,sp)
2179 0482 42 mul x,a
2180 0483 90ee01 ldw y,(1,y)
2181 0486 90bf00 ldw c_x,y
2182 0489 72bb0000 addw x,c_x
2183 048d ee05 ldw x,(5,x)
2184 048f fd call (x)
2186 0490 4d tnz a
2187 0491 2705 jreq L7501
2188 ; 338 display_printstr(pdevice,"ON");
2190 0493 ae0005 ldw x,#L1601
2193 0496 2003 jp LC003
2194 0498 L7501:
2195 ; 342 display_printstr(pdevice,"OFF");
2197 0498 ae0001 ldw x,#L5601
2199 049b LC003:
2200 049b 89 pushw x
2201 049c 1e12 ldw x,(OFST+3,sp)
2202 049e cd008e call _display_printstr
2203 04a1 85 popw x
2204 04a2 L5401:
2205 ; 348 if ((Size != TYPE_TXT) && (Size != TYPE_S16_NU))
2207 04a2 7b05 ld a,(OFST-10,sp)
2208 04a4 a105 cp a,#5
2209 04a6 2729 jreq L7601
2211 04a8 a103 cp a,#3
2212 04aa 2725 jreq L7601
2213 ; 350 display_setcurrpos((display_index_t)15,(display_index_t)(i+1));
2215 04ac 7b0f ld a,(OFST+0,sp)
2216 04ae 4c inc a
2217 04af 97 ld xl,a
2218 04b0 a60f ld a,#15
2219 04b2 95 ld xh,a
2220 04b3 cd0050 call _display_setcurrpos
2222 ; 351 display_printchar(pdevice,pSelTab->pField[i].Unit);
2224 04b6 7b0f ld a,(OFST+0,sp)
2225 04b8 97 ld xl,a
2226 04b9 a609 ld a,#9
2227 04bb 160d ldw y,(OFST-2,sp)
2228 04bd 42 mul x,a
2229 04be 90ee01 ldw y,(1,y)
2230 04c1 90bf00 ldw c_x,y
2231 04c4 72bb0000 addw x,c_x
2232 04c8 e602 ld a,(2,x)
2233 04ca 88 push a
2234 04cb 1e11 ldw x,(OFST+2,sp)
2235 04cd cd006f call _display_printchar
2237 04d0 84 pop a
2238 04d1 L7601:
2239 ; 236 for (i=0;i<pSelTab->bFieldsNumber;i++)
2241 04d1 0c0f inc (OFST+0,sp)
2242 04d3 L5201:
2245 04d3 1e0d ldw x,(OFST-2,sp)
2246 04d5 f6 ld a,(x)
2247 04d6 110f cp a,(OFST+0,sp)
2248 04d8 2303cc024c jrugt L1201
2249 ; 355 }
2252 04dd 5b11 addw sp,#17
2253 04df 81 ret
2282 ; 357 void display_welcome_message(void)
2282 ; 358 {
2283 switch .text
2284 04e0 _display_welcome_message:
2288 ; 359 display_clsscr(g_pdevice);
2290 04e0 be07 ldw x,L7_g_pdevice
2291 04e2 cd001b call _display_clsscr
2293 ; 360 display_setcurrpos(1,1);
2295 04e5 ae0101 ldw x,#257
2296 04e8 cd0050 call _display_setcurrpos
2298 ; 361 display_printstr(g_pdevice,g_pUserInterface->pWelcomeMSG_Line1);
2300 04eb be05 ldw x,L5_g_pUserInterface
2301 04ed ee0a ldw x,(10,x)
2302 04ef 89 pushw x
2303 04f0 be07 ldw x,L7_g_pdevice
2304 04f2 cd008e call _display_printstr
2306 04f5 85 popw x
2307 ; 362 display_setcurrpos(1,2);
2309 04f6 ae0102 ldw x,#258
2310 04f9 cd0050 call _display_setcurrpos
2312 ; 363 display_printstr(g_pdevice,g_pUserInterface->pWelcomeMSG_Line2);
2314 04fc be05 ldw x,L5_g_pUserInterface
2315 04fe ee0c ldw x,(12,x)
2316 0500 89 pushw x
2317 0501 be07 ldw x,L7_g_pdevice
2318 0503 cd008e call _display_printstr
2320 0506 85 popw x
2321 ; 366 g_pdevice->ios.out8(VDEV_OUT8_DISPLAY_FLUSH,0);
2323 0507 4b00 push #0
2324 0509 ae0002 ldw x,#2
2325 050c 89 pushw x
2326 050d 5f clrw x
2327 050e 89 pushw x
2328 050f be07 ldw x,L7_g_pdevice
2329 0511 ee1b ldw x,(27,x)
2330 0513 fd call (x)
2332 0514 5b05 addw sp,#5
2333 ; 367 }
2336 0516 81 ret
2366 ; 371 void display_create_locked_screen(void)
2366 ; 372 {
2367 switch .text
2368 0517 _display_create_locked_screen:
2372 ; 373 UIErrMsg.pErrorStatus = "";
2374 0517 ae0000 ldw x,#L3111
2375 051a bf00 ldw L1011_UIErrMsg,x
2376 ; 374 UserInterface_GetErrorMsg(&UIErrMsg);
2378 051c ae0000 ldw x,#L1011_UIErrMsg
2379 051f cd0000 call _UserInterface_GetErrorMsg
2381 ; 375 if (UIErrMsg.pErrorStatus != "")
2383 0522 be00 ldw x,L1011_UIErrMsg
2384 0524 a30000 cpw x,#L3111
2385 0527 2723 jreq L5111
2386 ; 377 display_clsscr(g_pdevice);
2388 0529 be07 ldw x,L7_g_pdevice
2389 052b cd001b call _display_clsscr
2391 ; 378 display_setcurrpos(1,1);
2393 052e ae0101 ldw x,#257
2394 0531 cd0050 call _display_setcurrpos
2396 ; 379 display_printstr(g_pdevice,(u8*)UIErrMsg.pErrorStatus);
2398 0534 be00 ldw x,L1011_UIErrMsg
2399 0536 89 pushw x
2400 0537 be07 ldw x,L7_g_pdevice
2401 0539 cd008e call _display_printstr
2403 053c 85 popw x
2404 ; 380 display_setcurrpos(1,2);
2406 053d ae0102 ldw x,#258
2407 0540 cd0050 call _display_setcurrpos
2409 ; 381 display_printstr(g_pdevice,(u8*)UIErrMsg.pErrorMsg); //g_pUserInterface->pWelcomeMSG_Line2
2411 0543 be02 ldw x,L1011_UIErrMsg+2
2412 0545 89 pushw x
2413 0546 be07 ldw x,L7_g_pdevice
2414 0548 cd008e call _display_printstr
2416 054b 85 popw x
2417 054c L5111:
2418 ; 383 }
2421 054c 81 ret
2563 switch .ubsct
2564 0000 L1011_UIErrMsg:
2565 0000 00000000 ds.b 4
2566 xdef _display_create_locked_screen
2567 xdef _display_create
2568 xdef _APP_sPrintDec
2569 xdef _display_printstr
2570 xdef _display_printchar
2571 xdef _display_setcurrpos
2572 xdef _display_clsscr
2573 xdef _DEV_Display
2574 xref _vtimer_SetTimer
2575 xdef _display_welcome_message
2576 xdef _display_setpoint_blink
2577 xdef _display_flush
2578 xdef _displayInit
2579 xref _UserInterface_GetErrorMsg
2580 .const: section .text
2581 0000 L3111:
2582 0000 00 dc.b 0
2583 0001 L5601:
2584 0001 4f464600 dc.b "OFF",0
2585 0005 L1601:
2586 0005 4f4e00 dc.b "ON",0
2587 xref.b c_x
2607 xref c_imul
2608 end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -