// system.pas 单元开发时不用引用,这是编译器核心包含的
// 该单元定义了8051单片机所有资源
// 熟悉该单元是对使用TRUBO51 开发程序的基础
Unit System;
Interface
Const
// 定义常用控制字符常量,其值为 ASCII 码
BELL = $07;
BS = $08;
TAB = $09;
LF = $0A;
CR = $0D;
EOF = $1A;
ESC = $1B;
DEL = $7F;
// 定义常用中断 查询号
External0 = $0003; // 外部中断 0
Timer0 = $000B; // 定时器0
External1 = $0013; //
Timer1 = $001B; //
Serial = $0023; // 串口
Type TDeviceWriteProcedure = Procedure;
TDeviceReadFunction = Function: Char;
TFileRecord = Record
WriteProcedure: TDeviceWriteProcedure;
ReadFunction: TDeviceReadFunction;
end;
Var
// Rn registers at absolute address (bank dependent) - Must be declared before 8051 SFR
// Registers ARn SHOULD NOT be used in system unit since system procedures could be called
// from any procedure using any register bank
AR0: Byte absolute 0;
AR1: Byte absolute 1;
AR2: Byte absolute 2;
AR3: Byte absolute 3;
AR4: Byte absolute 4;
AR5: Byte absolute 5;
AR6: Byte absolute 6;
AR7: Byte absolute 7;
{
8051 SFR }
P0: Byte absolute $80; Volatile;
SP: Byte absolute $81; Volatile;
DPL: Byte absolute $82;
DPH: Byte absolute $83;
PCON: Byte absolute $87; Volatile;
TCON
51单片机-PASCAL语言实例:认识重要单元SYSTEM.PAS
最新推荐文章于 2023-05-14 08:38:34 发布