详见标题,仅供这 Keil C51 v9.60 版官网下载的链接,请自行入坑。并附上这版的 Release Note,但愿这 Release Note 的截图不会造成侵权!也请各位白鼠们自取用,不用谢。
连结于此 ->
C51v9.60 - (95,756K) - (MD5:3C29CCF5B8E7AF3340B3B5C4605CAF6D)
C51 Version 9.60 Release.jpg (577.04 KB, 下载次数: 18)
下载附件
C51 Version 9.60 Release
2019-5-15 12:27 上传
最近在编写教程中,发现有差异存在:下面是例子:
c代码:
9 // time0 中断服务,中断时间为50us, 运行模式12T
10 uchar time_1k_counter,time_100hz_counter,time_10hz_counter;
11 bit time_key_ok;
12
13 void Int_time0(void) interrupt T0_VECTOR
14 {
15 1 IE = 0;
16 1 if(++time_1k_counter >= 10)
17 1 {
18 2 clk_1k = !clk_1k;
19 2 time_1k_counter = 0;
20 2 if (++time_100hz_counter >= 10)
21 2 {
22 3 clk_100hz = !clk_100hz;
23 3 time_100hz_counter = 0;
24 3 time_key_ok = true;
25 3 if (++time_10hz_counter >= 10)
26 3 {
27 4 clk_10hz = !clk_10hz;
28 4 time_10hz_counter = 0;
29 4 }
30 3 }
31 2 }
32 1 IE = 1;
33 1 }
34
==================================================
版本C51 V9.54 编译生成汇编:共27条汇编指令组成
; FUNCTION Int_time0 (BEGIN)
0000 C0E0 PUSH ACC
0002 C0D0 PUSH PSW
; SOURCE LINE # 13
; SOURCE LINE # 15
0004 75A800 MOV IE,#00H
; SOURCE LINE # 16
0007 0500 R INC time_1k_counter
0009 E500 R MOV A,time_1k_counter
000B C3 CLR C
000C 940A SUBB A,#0AH
000E 4021 JC ?C0001
; SOURCE LINE # 17
; SOURCE LINE # 18
0010 B2B3 CPL clk_1k
; SOURCE LINE # 19
0012 750000 R MOV time_1k_counter,#00H
; SOURCE LINE # 20
0015 0500 R INC time_100hz_counter
0017 E500 R MOV A,time_100hz_counter
0019 940A SUBB A,#0AH
001B 4014 JC ?C0001
; SOURCE LINE # 21
; SOURCE LINE # 22
001D B2B2 CPL clk_100hz
; SOURCE LINE # 23
001F 750000 R MOV time_100hz_counter,#00H
; SOURCE LINE # 24
0022 D200 R SETB time_key_ok
; SOURCE LINE # 25
0024 0500 R INC time_10hz_counter
0026 E500 R MOV A,time_10hz_counter
0028 940A SUBB A,#0AH
002A 4005 JC ?C0001
; SOURCE LINE # 26
; SOURCE LINE # 27
002C B2B1 CPL clk_10hz
; SOURCE LINE # 28
002E 750000 R MOV time_10hz_counter,#00H
; SOURCE LINE # 29
; SOURCE LINE # 30
; SOURCE LINE # 31
0031 ?C0001:
; SOURCE LINE # 32
0031 75A801 MOV IE,#01H
; SOURCE LINE # 33
0034 D0D0 POP PSW
0036 D0E0 POP ACC
0038 32 RETI
; FUNCTION Int_time0 (END)
========================================
版本C51 V9.60 编译生成汇编:共33条汇编指令组成,多了6条,而且对比后这6条有点莫名其妙的
; FUNCTION Int_time0 (BEGIN)
0000 C0E0 PUSH ACC
0002 C0D0 PUSH PSW
; SOURCE LINE # 13
; SOURCE LINE # 15
0004 75A800 MOV IE,#00H
; SOURCE LINE # 16
0007 0500 R INC time_1k_counter
0009 C3 CLR C
000A E500 R MOV A,time_1k_counter
000C 940A SUBB A,#0AH ;此处判断A是否大于10,正常
000E 7480 MOV A,#080H ;;???
0010 9480 SUBB A,#080H ;;??? 这两条莫名其妙???
0012 4029 JC ?C0001
; SOURCE LINE # 17
; SOURCE LINE # 18
0014 B2B3 CPL clk_1k
; SOURCE LINE # 19
0016 750000 R MOV time_1k_counter,#00H
; SOURCE LINE # 20
0019 0500 R INC time_100hz_counter
001B E500 R MOV A,time_100hz_counter
001D 940A SUBB A,#0AH
001F 7480 MOV A,#080H ;;
0021 9480 SUBB A,#080H ;;??? 再次这两条莫名其妙???
0023 4018 JC ?C0001
; SOURCE LINE # 21
; SOURCE LINE # 22
0025 B2B2 CPL clk_100hz
; SOURCE LINE # 23
0027 750000 R MOV time_100hz_counter,#00H
; SOURCE LINE # 24
002A D200 R SETB time_key_ok
; SOURCE LINE # 25
002C 0500 R INC time_10hz_counter
002E E500 R MOV A,time_10hz_counter
0030 940A SUBB A,#0AH
0032 7480 MOV A,#080H ;;
0034 9480 SUBB A,#080H ;;??? 第三次的莫名其妙???
0036 4005 JC ?C0001
; SOURCE LINE # 26
; SOURCE LINE # 27
0038 B2B1 CPL clk_10hz
; SOURCE LINE # 28
003A 750000 R MOV time_10hz_counter,#00H
; SOURCE LINE # 29
; SOURCE LINE # 30
; SOURCE LINE # 31
003D ?C0001:
; SOURCE LINE # 32
003D 75A801 MOV IE,#01H
; SOURCE LINE # 33
0040 D0D0 POP PSW
0042 D0E0 POP ACC
0044 32 RETI
; FUNCTION Int_time0 (END)
一周热门 更多>