|
![](static/image/common/ico_lz.png)
楼主 |
发表于 2009-4-29 11:05:07
|
显示全部楼层
m128没有,所以不能用IO寄存器,IO寄存器与IO端口寄存器还是有区别。
typedef struct
{
unsigned char SoudFreq: 1;
unsigned char DisOrCleSetVal: 1;
unsigned char ConfAndQiut: 1;
unsigned char bIs_Meas_Volt: 1;
unsigned char IntSetChag: 1;
unsigned char DataMissErr: 1;
unsigned char DataAck: 1;
unsigned char SystRemFromGPIB: 1;
unsigned char SystLocFromGPIB: 1;
unsigned char SystRwlockFromGPIB: 1;
unsigned char IFCSDCFromGPIB: 1;
unsigned char LoadSystRwlockFromGPIB: 1;
unsigned char FlagOfFlow: 1;
unsigned char TmpFlagOfFlow: 1;
}Int_flag_type;
Int_flag.SoudFreq=!Int_flag.SoudFreq;
这是一段汇编结果,我正在研究。
+00001E76: 91800750 LDS R24,0x0750 Load direct from data space
+00001E78: 7081 ANDI R24,0x01 Logical AND with immediate
+00001E79: 821E STD Y+6,R1 Store indirect with displacement
+00001E7A: 2388 TST R24 Test for Zero or Minus
+00001E7B: F411 BRNE PC+0x03 Branch if not equal
+00001E7C: E081 LDI R24,0x01 Load immediate
+00001E7D: 838E STD Y+6,R24 Store indirect with displacement
+00001E7E: 819E LDD R25,Y+6 Load indirect with displacement
+00001E7F: 7091 ANDI R25,0x01 Logical AND with immediate
+00001E80: 91800750 LDS R24,0x0750 Load direct from data space
+00001E82: 7F8E ANDI R24,0xFE Logical AND with immediate
+00001E83: 2B89 OR R24,R25 Logical OR
+00001E84: 93800750 STS 0x0750,R24 Store direct to data space
主要研究“在中断赋值后,返回主循环中可能会出现赋值不成功 ”这种说法。 |
|