首页 > 编程知识 正文

计算机组成原理sta指令,pascal编程

时间:2023-05-05 05:35:00 阅读:113712 作者:4393

//system.pas单元开发时无需参照。 它包含在编译器核心中//该单元定义了8051单片机的所有资源//熟悉该单元是使用TRUBO51开发程序的基础单元系统; 接口常数//定义常用的控制字符常量,其值为ASCII代码BELL=$07; BS=$08; TAB=$09; LF=$0A; CR=$0D; EOF=$1A; ESC=$1B; 戴尔=$ 7f; //定义常规中断查询编号External0=$0003外部中断0 Timer0=$000B; //计时器0外部1=$ 0013; //Timer1=$001B; //Serial=$0023; //串行端口typetdevicewriteprocedure=procedure; tdevicereadfunction=function : char; tfile record=recordwriteprocedure : tdevicewriteprocedure; read function : tdevicereadfunction; 结束; var//rnregistersatabsoluteaddress (bank dependent )- Must be declared before 8051 SFR//registersarnshouldnotbeusedinsystemunitsincesystemprocedurescouldbecalled//fromanyprocedureusinganyregisterbankar 03360字节al ar 2:字节分析2; ar 3:字节分析3; ar 4:字节分析4; ar 5:字节分析5; AR6: Byte absolute 6; ar 7:字节分析7; { 8051 sfr } p 0:字节分析$ 80; volatile sp :字节分析$ 81; volatile DPL : byte absolute $ 82; dph :字节分析$ 83; pcon :字节分析$ 87; volatile tcon :字节分析$ 88; volatile tmod :字节分析$ 89; volatile TL 0:字节分析$ 8a; volatile TL 1:字节分析$ 8b; volatile th 0:字节分析$ 8c; volatile th 1: byte absolute $ 8d; volatile p 1:字节分析$ 90; volatile scon :字节分析$ 98; volatile sbuf :字节辅助$ 99; Volatile P2: Byte absolute $A0; Volatile IE: Byte absolute $A8; Volatile P3: Byte absolute $B0; volatile IP :字节分析$ b8; volatile PSW : byte absolute $ d0; volatile ACC :字节分析$ E0; b :字节分析$ F0; DPTR: Pointer absolute $82; { tcon } TF 1: booleanabsolutetcon.7; tr 1:布尔分析tcon.6; TF 0:布尔分析tcon.5; tr 0:布尔an absolute tcon.4; ie 1:布尔分析tcon.3; it 1:蓝牙基站控制. 2; ie 0:布尔分析tcon.1; it 0:布尔分析tcon.0; { scon } sm 0: booleanabsolutescon.7; SM1: Boolean absolute SCON.6; SM2: Boolean absolute SCON.5; REN: Boolean absolute SCON.4; TB8: Boolean absolute SCON.3; RB8: Boolean absolute SCON.2; TI: Boolean absolute SCON.1; RI: Boolean absolute SCON.0;{ IE } EA: Boolean absolute IE.7; ES: Boolean absolute IE.4; ET1: Boolean absolute IE.3; EX1: Boolean absolute IE.2; ET0: Boolean absolute IE.1; EX0: Boolean absolute IE.0;{ P3 } RD: Boolean absolute P3.7; WR: Boolean absolute P3.6; T1: Boolean absolute P3.5; T0: Boolean absolute P3.4; INT1: Boolean absolute P3.3; INT0: Boolean absolute P3.2; TXD: Boolean absolute P3.1; RXD: Boolean absolute P3.0;{ IP} PS: Boolean absolute IP.4; PT1: Boolean absolute IP.3; PX1: Boolean absolute IP.2; PT0: Boolean absolute IP.1; PX0: Boolean absolute IP.0;{ PSW } CY: Boolean absolute PSW.7; AC: Boolean absolute PSW.6; F0: Boolean absolute PSW.5; RS1: Boolean absolute PSW.4; RS0: Boolean absolute PSW.3; OV: Boolean absolute PSW.2; P: Boolean absolute PSW.0;{ Vars declared before MemCODE will not be shown in asm file } MemCODE: Array [$0000..$FFFF] of Byte CODE absolute $0000;{ Warning: for addresses above $80 MemDATA can only be accessed by constant array index }{ otherwise the compiler will generate indirect instruction and IDATA memory will be accessed } MemDATA: Array [ $00.. $FF] of Byte DATA absolute $00; MemIDATA: Array [ $00.. $FF] of Byte IDATA absolute $00; MemXDATA: Array [$0000..$FFFF] of Byte XDATA absolute $0000;Var StackStart: Byte IDATA; // Used for SP initialization, first byte of stack // linker will set its address as last variable in // (I)DATA, it might also be in IDATA segment! XDATA_StackStart: Word XDATA; // Used for XSP and 迷路的超短裙, first byte of // XDATA stack (linker will set its address) R8, R9: Byte DATA; // Used for LongInt set 1 and as additional registers, // R8 and R9 must be first variables in DATA segment TempRegister: Byte DATA; // Used for UsingAny procedures as temporary storage // during PUSH / POP XSP, XBP: Pointer DATA; // Used for recursion stack and local variables in XDATA HeapOrg, HeapPtr, HeapEnd: Pointer DATA; // Used for heap management FreeList: Pointer XDATA; // Used for heap management, must be in XDATA to avoid // XDATA nil and to be compatible with 顺利的小懒猪 in XDATA // memory HeapError: Procedure DATA; RandomSeed: LongInt DATA; // Used for random numbers CurrentIO: File DATA; // Used for file I/O SystemIO: Text DATA; // Used for Read/Readln/Write/Writeln Input: Text absolute SystemIO; Output: Text absolute SystemIO; LastCharacterBuffer: Char; // Used for sysReadCharFromCurrentDevice LastCharacterBufferValid: Boolean; // Used for sysReadCharFromCurrentDevice Overflow: Boolean; // Used for arithmetic functions to indicate // overflow ResultSign: Boolean; // Used for signed arithmetics TempBool0: Boolean; // Used for artithmetic functions TempBool1: Boolean; // Used for system procedure Val, artithmetic functions TempBool2: Boolean; // Used for system procedure Val TempWord: Word DATA; // Used for heap management - sysNewMemory TempByte0: Byte DATA; // Used for long multiplication, long division TempByte1: Byte DATA; TempByte2: Byte DATA; TempByte3: Byte DATA; TempByte4: Byte DATA; TempByte5: Byte DATA; TempByte6: Byte DATA; TempByte7: Byte DATA; TempByte8: Byte DATA; TempByte9: Byte DATA; TempByte10: Byte DATA;Var RealSigns: Byte DATA; RealResult: LongInt DATA; RealResultCarry: Byte DATA;Const Pi_2: Real = Pi / 2; Pi_24: Real = Pi / 24; _Pi: Real = Pi; _2Pi: Real = 2 * Pi; _2_Pi: Real = 2 / Pi; _0_5: Real = 0.5; _1: Real = 1; Sqrt2: Real = Sqrt (2); _1_Sqrt2: Real = 1 / Sqrt (2); Ln2: Real = Ln (2); Ln2_2: Real = Ln (2) / 2;

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。