内部RAM30H,31H和32H,33H单元分别存放着两个16位的无符号数,用C51编写程序,将其

2024-12-27 15:43:55
推荐回答(1个)
回答1:

#include
#define Puint(addr) (*(volatile unsigned int *)((unsigned int)addr))

void main(){
if(Puint(0x30)>Puint(0x32)){
Puint(0x34)=Puint(0x30);
}else {
Puint(0x34)=Puint(0x32);
}
while(1);
}