关于sdcc的下载,请参阅:https://zh.arslanbar.net/post.php?t=23368
新建一个空文件夹,名字随便取,这里取use_sdcc。
编写一个c文件,名称为test.c,内容:
#include <at89x51.h>
#define SEG7_POINT 0x7f
unsigned char seg7code[] = {0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x80, 0x90};
void main()
{
while (1)
P0 = seg7code[4] & SEG7_POINT;
}