📄 callsle5.c
字号:
/* 这是调用SLE4442卡汇编程序(SSLE5.ASM)的C51程序, */
/* 文件名为CALLSEL5.C 。 */
/* 功能: 将地址为f0h、f1h、f2h、f3h的主存储器中内容读出,看其是否 */
/* 大于300,若大于300,则把读出值减去300,再置入原地址的 */
/* 主存储器中去。若不大于 300,给出报警标志kc1=1。 */
#include <reg51.h>
#include <stdio.h>
#include <math.h>
#include <absacc.h>
#define uchar unsigned char
#define uint unsigned int
#define ulong unsigned long
void delay1(uint x);
void timedelay(uint timess);
extern ulong a_func3(ulong va,uchar vb);
extern ulong chai3;
ulong idata va;
uchar idata vb;
uchar idata n,kc1;
ulong idata mid1,mid2;
void timedelay(uint timess)
{
uint tj;
for (tj=timess;tj>0;tj--){;}
}
void delay1(uint x)
{
uchar tw;
while (x-->0){
for (tw=0;tw<125;tw++){;}
}
}
void main()
{
timedelay(10000);
delay1(1);
EA=0;
kc1=0;
va=0x00;
vb=0x00;
chai3=a_func3(va,vb);
mid2=chai3;
if (mid2<=300) goto bao1;
mid1=mid2-300;
va=mid1;
vb=0xff;
chai3=a_func3(va,vb);
if (F0==1) goto bao1;
mid2=chai3;
while(1);
bao1:kc1=1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -