Program NewProgram;
// 本程序使用 Trubo51( https://turbo51.com/ ) 单片机 PASCAL 编译器
//
// 开发环境使用 MC-51 集成开发环境
// 本程序对独立按键 KEY1 , KEY2 , KEY3 , KEY4 进行检测并开关对应的LED
// 电路图 CPU 部分请参考实例 1
uses
Delay;
var
// 定义LED 和 KEY 对应的 I/O
KEY1:boolean absolute P3.3 ;
KEY2:boolean absolute P3.4 ;
KEY3:boolean absolute P3.6 ;
KEY4:boolean absolute P3.7 ;
LED1:boolean absolute P1.