📄 callsle4.c
字号:
/* 这是调用SLE4442卡汇编程序(SSLE4.ASM)的C51程序, */
/* 文件名为CALLSEL4.C 。 */
/* 功能: 将地址为f0h和f1h主存储器内容读出,看其是否大于300,若大于*/
/* 300,则把读出值减去300,再置入地址为f0h和f1h主存储器中去。*/
/* 若不大于 300,给出报警标志kc1=1。要写存储器,首先必须校验 */
/* 密码,密码校验通过后,方可写入。 */
#include <reg51.h>
#include <stdio.h>
#include <math.h>
#include <absacc.h>
#define uchar unsigned char
#define uint unsigned int
void delay1(uint x);
void timedelay(uint timess);
extern uint chai3;
extern uint a_func3(uint,uint);
uchar idata n,kc1;
uint 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;
chai3=a_func3(0x0000,0x0);
if (F0==1) goto bao1;
mid2=chai3;
if (mid2<=300) goto bao1;
mid1=mid2-300;
chai3=a_func3(0x00ff,mid1);
mid2=chai3;
while(1);
bao1:kc1=1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -