/*------------------------------------------------------------ HotC51汇编数组寄存器定义头文件(HotRegx52.h V1.03) 最初建立时间: 2009.2.18 最近修改时间: 2009.2.27 (正在添加之中,最终将彻底替代嵌入汇编) 增 添原 因: 为全面支持裸奔式实时操作系统HotTask51做准备 并替代年代久远的HotIns.h/c(不在HotTask51下使用) 在汇编数组的环境下替代regx52.h头文件,并更方便。 应 用: 可以用COM接口技术对HotC51汇编数组进行封装 实现比嵌入汇编更为灵活和更非典之用,“汇编数组”的 出现,将程序战场蔓延至整个代码和数据区~~~ -------------------------------------------------------------*/
#ifndef __HotASM_Regx52_H__ #define __HotASM_Regx52_H__
#ifdef __cplusplus extern "C" { #endif
#include "hottask51.h"//裸奔之OS系统链接头文件 /*-------------------------------------------- 汇编数组通用位定义 --------------------------------------------*/ #define HotASM_Bit0 (HotASM_REG)0 #define HotASM_Bit1 (HotASM_REG)1 #define HotASM_Bit2 (HotASM_REG)2 #define HotASM_Bit3 (HotASM_REG)3 #define HotASM_Bit4 (HotASM_REG)4 #define HotASM_Bit5 (HotASM_REG)5 #define HotASM_Bit6 (HotASM_REG)6 #define HotASM_Bit7 (HotASM_REG)7 /*-------------------------------------------- 汇编数组IO接口定义 --------------------------------------------*/ #define HotASM_Port0 (HotASM_REG)0 #define HotASM_Port1 (HotASM_REG)1 #define HotASM_Port2 (HotASM_REG)2 #define HotASM_Port3 (HotASM_REG)3 #define HotASM_Port4 (HotASM_REG)4 #define HotASM_Port5 (HotASM_REG)5 #define HotASM_Port6 (HotASM_REG)6 #define HotASM_Port7 (HotASM_REG)7
/*-------------------------------------------- 汇编数组通用寄存器组定义 --------------------------------------------*/ #define HotASM_Rn(Rn) (HotASM_REG)(Rn % 8)
#define HotASM_R0 (HotASM_REG)0x00 #define HotASM_R1 (HotASM_REG)0x01 #define HotASM_R2 (HotASM_REG)0x02 #define HotASM_R3 (HotASM_REG)0x03 #define HotASM_R4 (HotASM_REG)0x04 #define HotASM_R5 (HotASM_REG)0x05 #define HotASM_R6 (HotASM_REG)0x06 #define HotASM_R7 (HotASM_REG)0x07
#define HotASM_RXn(group, Rn) (HotASM_REG)(((group % 4) * 8) + (Rn % 8))
#define HotASM_R00 (HotASM_REG)0x00 #define HotASM_R01 (HotASM_REG)0x01 #define HotASM_R02 (HotASM_REG)0x02 #define HotASM_R03 (HotASM_REG)0x03 #define HotASM_R04 (HotASM_REG)0x04 #define HotASM_R05 (HotASM_REG)0x05 #define HotASM_R06 (HotASM_REG)0x06 #define HotASM_R07 (HotASM_REG)0x07
#define HotASM_R10 (HotASM_REG)0x08 #define HotASM_R11 (HotASM_REG)0x09 #define HotASM_R12 (HotASM_REG)0x0a #define HotASM_R13 (HotASM_REG)0x0b #define HotASM_R14 (HotASM_REG)0x0c #define HotASM_R15 (HotASM_REG)0x0d #define HotASM_R16 (HotASM_REG)0x0e #define HotASM_R17 (HotASM_REG)0x0f
#define HotASM_R20 (HotASM_REG)0x10 #define HotASM_R21 (HotASM_REG)0x11 #define HotASM_R22 (HotASM_REG)0x12 #define HotASM_R23 (HotASM_REG)0x13 #define HotASM_R24 (HotASM_REG)0x14 #define HotASM_R25 (HotASM_REG)0x15 #define HotASM_R26 (HotASM_REG)0x16 #define HotASM_R27 (HotASM_REG)0x17
#define HotASM_R30 (HotASM_REG)0x18 #define HotASM_R31 (HotASM_REG)0x19 #define HotASM_R32 (HotASM_REG)0x1a #define HotASM_R33 (HotASM_REG)0x1b #define HotASM_R34 (HotASM_REG)0x1c #define HotASM_R35 (HotASM_REG)0x1d #define HotASM_R36 (HotASM_REG)0x1e #define HotASM_R37 (HotASM_REG)0x1f /*-------------------------------------------- 汇编数组位寄存器位定义 --------------------------------------------*/ //#define HotASM_BIT_X(breg, bit) (HotASM_REG)((breg * 8) | (bit % 8))
#define HotASM_REG_X(direct, bit) (HotASM_REG)(((direct - 0x20) * 8) | (bit % 8))
#define HotASM_20H (HotASM_REG)0x20 #define HotASM_20H_X(bit) HotASM_REG_X(HotASM_20H, bit) #define HotASM_20H_0 HotASM_20H_X(HotASM_Bit0) #define HotASM_20H_1 HotASM_20H_X(HotASM_Bit1) #define HotASM_20H_2 HotASM_20H_X(HotASM_Bit2) #define HotASM_20H_3 HotASM_20H_X(HotASM_Bit3) #define HotASM_20H_4 HotASM_20H_X(HotASM_Bit4) #define HotASM_20H_5 HotASM_20H_X(HotASM_Bit5) #define HotASM_20H_6 HotASM_20H_X(HotASM_Bit6) #define HotASM_20H_7 HotASM_20H_X(HotASM_Bit7) #define HotASM_21H (HotASM_REG)0x21 #define HotASM_21H_X(bit) HotASM_REG_X(HotASM_21H, bit) #define HotASM_21H_0 HotASM_21H_X(HotASM_Bit0) #define HotASM_21H_1 HotASM_21H_X(HotASM_Bit1) #define HotASM_21H_2 HotASM_21H_X(HotASM_Bit2) #define HotASM_21H_3 HotASM_21H_X(HotASM_Bit3) #define HotASM_21H_4 HotASM_21H_X(HotASM_Bit4) #define HotASM_21H_5 HotASM_21H_X(HotASM_Bit5) #define HotASM_21H_6 HotASM_21H_X(HotASM_Bit6) #define HotASM_21H_7 HotASM_21H_X(HotASM_Bit7) #define HotASM_22H (HotASM_REG)0x22 #define HotASM_22H_X(bit) HotASM_REG_X(HotASM_22H, bit) #define HotASM_22H_0 HotASM_22H_X(HotASM_Bit0) #define HotASM_22H_1 HotASM_22H_X(HotASM_Bit1) #define HotASM_22H_2 HotASM_22H_X(HotASM_Bit2) #define HotASM_22H_3 HotASM_22H_X(HotASM_Bit3) #define HotASM_22H_4 HotASM_22H_X(HotASM_Bit4) #define HotASM_22H_5 HotASM_22H_X(HotASM_Bit5) #define HotASM_22H_6 HotASM_22H_X(HotASM_Bit6) #define HotASM_22H_7 HotASM_22H_X(HotASM_Bit7) #define HotASM_23H (HotASM_REG)0x23 #define HotASM_23H_X(bit) HotASM_REG_X(HotASM_23H, bit) #define HotASM_23H_0 HotASM_23H_X(HotASM_Bit0) #define HotASM_23H_1 HotASM_23H_X(HotASM_Bit1) #define HotASM_23H_2 HotASM_23H_X(HotASM_Bit2) #define HotASM_23H_3 HotASM_23H_X(HotASM_Bit3) #define HotASM_23H_4 HotASM_23H_X(HotASM_Bit4) #define HotASM_23H_5 HotASM_23H_X(HotASM_Bit5) #define HotASM_23H_6 HotASM_23H_X(HotASM_Bit6) #define HotASM_23H_7 HotASM_23H_X(HotASM_Bit7) #define HotASM_24H (HotASM_REG)0x24 #define HotASM_24H_X(bit) HotASM_REG_X(HotASM_24H, bit) #define HotASM_24H_0 HotASM_24H_X(HotASM_Bit0) #define HotASM_24H_1 HotASM_24H_X(HotASM_Bit1) #define HotASM_24H_2 HotASM_24H_X(HotASM_Bit2) #define HotASM_24H_3 HotASM_24H_X(HotASM_Bit3) #define HotASM_24H_4 HotASM_24H_X(HotASM_Bit4) #define HotASM_24H_5 HotASM_24H_X(HotASM_Bit5) #define HotASM_24H_6 HotASM_24H_X(HotASM_Bit6) #define HotASM_24H_7 HotASM_24H_X(HotASM_Bit7) #define HotASM_25H (HotASM_REG)0x25 #define HotASM_25H_X(bit) HotASM_REG_X(HotASM_25H, bit) #define HotASM_25H_0 HotASM_25H_X(HotASM_Bit0) #define HotASM_25H_1 HotASM_25H_X(HotASM_Bit1) #define HotASM_25H_2 HotASM_25H_X(HotASM_Bit2) #define HotASM_25H_3 HotASM_25H_X(HotASM_Bit3) #define HotASM_25H_4 HotASM_25H_X(HotASM_Bit4) #define HotASM_25H_5 HotASM_25H_X(HotASM_Bit5) #define HotASM_25H_6 HotASM_25H_X(HotASM_Bit6) #define HotASM_25H_7 HotASM_25H_X(HotASM_Bit7) #define HotASM_26H (HotASM_REG)0x26 #define HotASM_26H_X(bit) HotASM_REG_X(HotASM_26H, bit) #define HotASM_26H_0 HotASM_26H_X(HotASM_Bit0) #define HotASM_26H_1 HotASM_26H_X(HotASM_Bit1) #define HotASM_26H_2 HotASM_26H_X(HotASM_Bit2) #define HotASM_26H_3 HotASM_26H_X(HotASM_Bit3) #define HotASM_26H_4 HotASM_26H_X(HotASM_Bit4) #define HotASM_26H_5 HotASM_26H_X(HotASM_Bit5) #define HotASM_26H_6 HotASM_26H_X(HotASM_Bit6) #define HotASM_26H_7 HotASM_26H_X(HotASM_Bit7) #define HotASM_27H (HotASM_REG)0x27 #define HotASM_27H_X(bit) HotASM_REG_X(HotASM_27H, bit) #define HotASM_27H_0 HotASM_27H_X(HotASM_Bit0) #define HotASM_27H_1 HotASM_27H_X(HotASM_Bit1) #define HotASM_27H_2 HotASM_27H_X(HotASM_Bit2) #define HotASM_27H_3 HotASM_27H_X(HotASM_Bit3) #define HotASM_27H_4 HotASM_27H_X(HotASM_Bit4) #define HotASM_27H_5 HotASM_27H_X(HotASM_Bit5) #define HotASM_27H_6 HotASM_27H_X(HotASM_Bit6) #define HotASM_27H_7 HotASM_27H_X(HotASM_Bit7) #define HotASM_28H (HotASM_REG)0x28 #define HotASM_28H_X(bit) HotASM_REG_X(HotASM_28H, bit) #define HotASM_28H_0 HotASM_28H_X(HotASM_Bit0) #define HotASM_28H_1 HotASM_28H_X(HotASM_Bit1) #define HotASM_28H_2 HotASM_28H_X(HotASM_Bit2) #define HotASM_28H_3 HotASM_28H_X(HotASM_Bit3) #define HotASM_28H_4 HotASM_28H_X(HotASM_Bit4) #define HotASM_28H_5 HotASM_28H_X(HotASM_Bit5) #define HotASM_28H_6 HotASM_28H_X(HotASM_Bit6) #define HotASM_28H_7 HotASM_28H_X(HotASM_Bit7) #define HotASM_29H (HotASM_REG)0x29 #define HotASM_29H_X(bit) HotASM_REG_X(HotASM_29H, bit) #define HotASM_29H_0 HotASM_29H_X(HotASM_Bit0) #define HotASM_29H_1 HotASM_29H_X(HotASM_Bit1) #define HotASM_29H_2 HotASM_29H_X(HotASM_Bit2) #define HotASM_29H_3 HotASM_29H_X(HotASM_Bit3) #define HotASM_29H_4 HotASM_29H_X(HotASM_Bit4) #define HotASM_29H_5 HotASM_29H_X(HotASM_Bit5) #define HotASM_29H_6 HotASM_29H_X(HotASM_Bit6) #define HotASM_29H_7 HotASM_29H_X(HotASM_Bit7) #define HotASM_2AH (HotASM_REG)0x2A #define HotASM_2AH_X(bit) HotASM_REG_X(HotASM_2AH, bit) #define HotASM_2AH_0 HotASM_2AH_X(HotASM_Bit0) #define HotASM_2AH_1 HotASM_2AH_X(HotASM_Bit1) #define HotASM_2AH_2 HotASM_2AH_X(HotASM_Bit2) #define HotASM_2AH_3 HotASM_2AH_X(HotASM_Bit3) #define HotASM_2AH_4 HotASM_2AH_X(HotASM_Bit4) #define HotASM_2AH_5 HotASM_2AH_X(HotASM_Bit5) #define HotASM_2AH_6 HotASM_2AH_X(HotASM_Bit6) #define HotASM_2AH_7 HotASM_2AH_X(HotASM_Bit7) #define HotASM_2BH (HotASM_REG)0x2B #define HotASM_2BH_X(bit) HotASM_REG_X(HotASM_2BH, bit) #define HotASM_2BH_0 HotASM_2BH_X(HotASM_Bit0) #define HotASM_2BH_1 HotASM_2BH_X(HotASM_Bit1) #define HotASM_2BH_2 HotASM_2BH_X(HotASM_Bit2) #define HotASM_2BH_3 HotASM_2BH_X(HotASM_Bit3) #define HotASM_2BH_4 HotASM_2BH_X(HotASM_Bit4) #define HotASM_2BH_5 HotASM_2BH_X(HotASM_Bit5) #define HotASM_2BH_6 HotASM_2BH_X(HotASM_Bit6) #define HotASM_2BH_7 HotASM_2BH_X(HotASM_Bit7) #define HotASM_2CH (HotASM_REG)0x2C #define HotASM_2CH_X(bit) HotASM_REG_X(HotASM_2CH, bit) #define HotASM_2CH_0 HotASM_2CH_X(HotASM_Bit0) #define HotASM_2CH_1 HotASM_2CH_X(HotASM_Bit1) #define HotASM_2CH_2 HotASM_2CH_X(HotASM_Bit2) #define HotASM_2CH_3 HotASM_2CH_X(HotASM_Bit3) #define HotASM_2CH_4 HotASM_2CH_X(HotASM_Bit4) #define HotASM_2CH_5 HotASM_2CH_X(HotASM_Bit5) #define HotASM_2CH_6 HotASM_2CH_X(HotASM_Bit6) #define HotASM_2CH_7 HotASM_2CH_X(HotASM_Bit7) #define HotASM_2DH (HotASM_REG)0x2D #define HotASM_2DH_X(bit) HotASM_REG_X(HotASM_2DH, bit) #define HotASM_2DH_0 HotASM_2DH_X(HotASM_Bit0) #define HotASM_2DH_1 HotASM_2DH_X(HotASM_Bit1) #define HotASM_2DH_2 HotASM_2DH_X(HotASM_Bit2) #define HotASM_2DH_3 HotASM_2DH_X(HotASM_Bit3) #define HotASM_2DH_4 HotASM_2DH_X(HotASM_Bit4) #define HotASM_2DH_5 HotASM_2DH_X(HotASM_Bit5) #define HotASM_2DH_6 HotASM_2DH_X(HotASM_Bit6) #define HotASM_2DH_7 HotASM_2DH_X(HotASM_Bit7) #define HotASM_2EH (HotASM_REG)0x2E #define HotASM_2EH_X(bit) HotASM_REG_X(HotASM_2EH, bit) #define HotASM_2EH_0 HotASM_2EH_X(HotASM_Bit0) #define HotASM_2EH_1 HotASM_2EH_X(HotASM_Bit1) #define HotASM_2EH_2 HotASM_2EH_X(HotASM_Bit2) #define HotASM_2EH_3 HotASM_2EH_X(HotASM_Bit3) #define HotASM_2EH_4 HotASM_2EH_X(HotASM_Bit4) #define HotASM_2EH_5 HotASM_2EH_X(HotASM_Bit5) #define HotASM_2EH_6 HotASM_2EH_X(HotASM_Bit6) #define HotASM_2EH_7 HotASM_2EH_X(HotASM_Bit7) #define HotASM_2FH (HotASM_REG)0x2F #define HotASM_2FH_X(bit) HotASM_REG_X(HotASM_2FH, bit) #define HotASM_2FH_0 HotASM_2FH_X(HotASM_Bit0) #define HotASM_2FH_1 HotASM_2FH_X(HotASM_Bit1) #define HotASM_2FH_2 HotASM_2FH_X(HotASM_Bit2) #define HotASM_2FH_3 HotASM_2FH_X(HotASM_Bit3) #define HotASM_2FH_4 HotASM_2FH_X(HotASM_Bit4) #define HotASM_2FH_5 HotASM_2FH_X(HotASM_Bit5) #define HotASM_2FH_6 HotASM_2FH_X(HotASM_Bit6) #define HotASM_2FH_7 HotASM_2FH_X(HotASM_Bit7) /*----------------------------------------------------------- 汇编数组PX寄存器位定义(HotC51宏扩展接口) 寄存器名:Pn(Pn) Pn=0~3(可能还有更多的) ------------------------------------------------------------*/ #define HotASM_SREG_X(direct, bit) (HotASM_REG)((direct | 0x80) | (bit % 8))
#define HotASM_Pn(Pn) (HotASM_REG)(0x80 + (Pn % 4) * 0x10) #define HotASM_Pn_X(Pn, bit) (HotASM_REG)(HotASM_Pn(Pn) | (bit % 8)) /*-------------------------------------------- 汇编数组51寄存器定义 --------------------------------------------*/ #define HotASM_P0 (HotASM_REG)0x80 /*-------------------------------------------- 汇编数组P0寄存器位定义 --------------------------------------------*/ #define HotASM_P0_X(bit) HotASM_SREG_X(HotASM_P0, bit)
#define HotASM_P0_0 HotASM_P0_X(HotASM_Bit0) #define HotASM_P0_1 HotASM_P0_X(HotASM_Bit1) #define HotASM_P0_2 HotASM_P0_X(HotASM_Bit2) #define HotASM_P0_3 HotASM_P0_X(HotASM_Bit3) #define HotASM_P0_4 HotASM_P0_X(HotASM_Bit4) #define HotASM_P0_5 HotASM_P0_X(HotASM_Bit5) #define HotASM_P0_6 HotASM_P0_X(HotASM_Bit6) #define HotASM_P0_7 HotASM_P0_X(HotASM_Bit7) #define HotASM_SP (HotASM_REG)0x81 #define HotASM_DPL (HotASM_REG)0x82 #define HotASM_DPH (HotASM_REG)0x83 /*-------------------------------------------- 汇编数组PCON寄存器位定义(不能位寻址) --------------------------------------------*/ #define HotASM_PCON (HotASM_REG)0x87 #define HotASM_PCON_X(bit) (HotASM_REG)(HotASM_PCON + (1 << (bit % 8)))
#define HotASM_PCON_0 HotASM_PCON_X(HotASM_Bit0) #define HotASM_PCON_1 HotASM_PCON_X(HotASM_Bit1) #define HotASM_PCON_2 HotASM_PCON_X(HotASM_Bit2) #define HotASM_PCON_3 HotASM_PCON_X(HotASM_Bit3) #define HotASM_PCON_4 HotASM_PCON_X(HotASM_Bit4) #define HotASM_PCON_5 HotASM_PCON_X(HotASM_Bit5) #define HotASM_PCON_6 HotASM_PCON_X(HotASM_Bit6) #define HotASM_PCON_7 HotASM_PCON_X(HotASM_Bit7)
#define HotASM_PCON_IDL_ HotASM_PCON_0 #define HotASM_PCON_STOP_ HotASM_PCON_1 #define HotASM_PCON_PD_ HotASM_PCON_1 #define HotASM_PCON_GF0_ HotASM_PCON_2 #define HotASM_PCON_GF1_ HotASM_PCON_3 #define HotASM_PCON_SMOD_ HotASM_PCON_7
#define HotASM_IDL_ HotASM_PCON_0 #define HotASM_STOP_ HotASM_PCON_1 #define HotASM_PD_ HotASM_PCON_1 #define HotASM_GF0_ HotASM_PCON_2 #define HotASM_GF1_ HotASM_PCON_3 #define HotASM_SMOD_ HotASM_PCON_7 /*-------------------------------------------- 汇编数组TCON寄存器位定义 --------------------------------------------*/ #define HotASM_TCON (HotASM_REG)0x88 #define HotASM_TCON_X(bit) HotASM_SREG_X(HotASM_TCON, bit)
#define HotASM_TCON_0 HotASM_TCON_X(HotASM_Bit0) #define HotASM_TCON_1 HotASM_TCON_X(HotASM_Bit1) #define HotASM_TCON_2 HotASM_TCON_X(HotASM_Bit2) #define HotASM_TCON_3 HotASM_TCON_X(HotASM_Bit3) #define HotASM_TCON_4 HotASM_TCON_X(HotASM_Bit4) #define HotASM_TCON_5 HotASM_TCON_X(HotASM_Bit5) #define HotASM_TCON_6 HotASM_TCON_X(HotASM_Bit6) #define HotASM_TCON_7 HotASM_TCON_X(HotASM_Bit7)
#define HotASM_TCON_IT0 HotASM_TCON_0 #define HotASM_TCON_IE0 HotASM_TCON_1 #define HotASM_TCON_IT1 HotASM_TCON_2 #define HotASM_TCON_IE1 HotASM_TCON_3 #define HotASM_TCON_TR0 HotASM_TCON_4 #define HotASM_TCON_TF0 HotASM_TCON_5 #define HotASM_TCON_TR1 HotASM_TCON_6 #define HotASM_TCON_TF1 HotASM_TCON_7
#define HotASM_IT0 HotASM_TCON_0 #define HotASM_IE0 HotASM_TCON_1 #define HotASM_IT1 HotASM_TCON_2 #define HotASM_IE1 HotASM_TCON_3 #define HotASM_TR0 HotASM_TCON_4 #define HotASM_TF0 HotASM_TCON_5 #define HotASM_TR1 HotASM_TCON_6 #define HotASM_TF1 HotASM_TCON_7 /*-------------------------------------------- 汇编数组TMOD寄存器位定义(不能位寻址) --------------------------------------------*/ #define HotASM_TMOD (HotASM_REG)0x89 #define HotASM_TMOD_X(bit) (HotASM_REG)(HotASM_TMOD + (1 << (bit % 8)))
#define HotASM_TMOD_0 HotASM_TMOD_X(HotASM_Bit0) #define HotASM_TMOD_1 HotASM_TMOD_X(HotASM_Bit1) #define HotASM_TMOD_2 HotASM_TMOD_X(HotASM_Bit2) #define HotASM_TMOD_3 HotASM_TMOD_X(HotASM_Bit3) #define HotASM_TMOD_4 HotASM_TMOD_X(HotASM_Bit4) #define HotASM_TMOD_5 HotASM_TMOD_X(HotASM_Bit5) #define HotASM_TMOD_6 HotASM_TMOD_X(HotASM_Bit6) #define HotASM_TMOD_7 HotASM_TMOD_X(HotASM_Bit7)
#define HotASM_TMOD_T0_M0_ HotASM_TMOD_0 #define HotASM_TMOD_T0_M1_ HotASM_TMOD_1 #define HotASM_TMOD_T0_CT_ HotASM_TMOD_2 #define HotASM_TMOD_T0_GATE_ HotASM_TMOD_3 #define HotASM_TMOD_T1_M0_ HotASM_TMOD_4 #define HotASM_TMOD_T1_M1_ HotASM_TMOD_5 #define HotASM_TMOD_T1_CT_ HotASM_TMOD_6 #define HotASM_TMOD_T1_GATE_ HotASM_TMOD_7
#define HotASM_TMOD_T1_MASK_ (HotASM_TMOD_7 | HotASM_TMOD_6 | HotASM_TMOD_5 | HotASM_TMOD_4) #define HotASM_TMOD_T0_MASK_ (HotASM_TMOD_3 | HotASM_TMOD_2 | HotASM_TMOD_1 | HotASM_TMOD_0)
#define HotASM_T0_M0_ HotASM_TMOD_0 #define HotASM_T0_M1_ HotASM_TMOD_1 #define HotASM_T0_CT_ HotASM_TMOD_2 #define HotASM_T0_GATE_ HotASM_TMOD_3 #define HotASM_T1_M0_ HotASM_TMOD_4 #define HotASM_T1_M1_ HotASM_TMOD_5 #define HotASM_T1_CT_ HotASM_TMOD_6 #define HotASM_T1_GATE_ HotASM_TMOD_7
#define HotASM_T1_MASK_ HotASM_TMOD_T1_MASK_ #define HotASM_T0_MASK_ HotASM_TMOD_T0_MASK_
#define HotASM_TL0 (HotASM_REG)0x8a #define HotASM_TH0 (HotASM_REG)0x8c #define HotASM_TL1 (HotASM_REG)0x8b #define HotASM_TH1 (HotASM_REG)0x8d /*-------------------------------------------- 汇编数组P1寄存器位定义 --------------------------------------------*/ #define HotASM_P1 (HotASM_REG)0x90 #define HotASM_P1_X(bit) HotASM_SREG_X(HotASM_P1, bit)
#define HotASM_P1_0 HotASM_P1_X(HotASM_Bit0) #define HotASM_P1_1 HotASM_P1_X(HotASM_Bit1) #define HotASM_P1_2 HotASM_P1_X(HotASM_Bit2) #define HotASM_P1_3 HotASM_P1_X(HotASM_Bit3) #define HotASM_P1_4 HotASM_P1_X(HotASM_Bit4) #define HotASM_P1_5 HotASM_P1_X(HotASM_Bit5) #define HotASM_P1_6 HotASM_P1_X(HotASM_Bit6) #define HotASM_P1_7 HotASM_P1_X(HotASM_Bit7) /*-------------------------------------------- 汇编数组SCON寄存器位定义 --------------------------------------------*/ #define HotASM_SCON (HotASM_REG)0x98 #define HotASM_SCON_X(bit) HotASM_SREG_X(HotASM_SCON, bit)
#define HotASM_SCON_0 HotASM_SCON_X(HotASM_Bit0) #define HotASM_SCON_1 HotASM_SCON_X(HotASM_Bit1) #define HotASM_SCON_2 HotASM_SCON_X(HotASM_Bit2) #define HotASM_SCON_3 HotASM_SCON_X(HotASM_Bit3) #define HotASM_SCON_4 HotASM_SCON_X(HotASM_Bit4) #define HotASM_SCON_5 HotASM_SCON_X(HotASM_Bit5) #define HotASM_SCON_6 HotASM_SCON_X(HotASM_Bit6) #define HotASM_SCON_7 HotASM_SCON_X(HotASM_Bit7)
#define HotASM_SCON_RI HotASM_SCON_0 #define HotASM_SCON_TI HotASM_SCON_1 #define HotASM_SCON_RB8 HotASM_SCON_2 #define HotASM_SCON_TB8 HotASM_SCON_3 #define HotASM_SCON_REN HotASM_SCON_4 #define HotASM_SCON_SM2 HotASM_SCON_5 #define HotASM_SCON_SM1 HotASM_SCON_6 #define HotASM_SCON_SM0 HotASM_SCON_7
#define HotASM_RI HotASM_SCON_0 #define HotASM_TI HotASM_SCON_1 #define HotASM_RB8 HotASM_SCON_2 #define HotASM_TB8 HotASM_SCON_3 #define HotASM_REN HotASM_SCON_4 #define HotASM_SM2 HotASM_SCON_5 #define HotASM_SM1 HotASM_SCON_6 #define HotASM_SM0 HotASM_SCON_7 #define HotASM_SBUF (HotASM_REG)0x99 /*-------------------------------------------- 汇编数组P2寄存器位定义 --------------------------------------------*/ #define HotASM_P2 (HotASM_REG)0xa0 #define HotASM_P2_X(bit) HotASM_SREG_X(HotASM_P2, bit)
#define HotASM_P2_0 HotASM_P2_X(HotASM_Bit0) #define HotASM_P2_1 HotASM_P2_X(HotASM_Bit1) #define HotASM_P2_2 HotASM_P2_X(HotASM_Bit2) #define HotASM_P2_3 HotASM_P2_X(HotASM_Bit3) #define HotASM_P2_4 HotASM_P2_X(HotASM_Bit4) #define HotASM_P2_5 HotASM_P2_X(HotASM_Bit5) #define HotASM_P2_6 HotASM_P2_X(HotASM_Bit6) #define HotASM_P2_7 HotASM_P2_X(HotASM_Bit7) /*-------------------------------------------- 汇编数组IE寄存器位定义 --------------------------------------------*/ #define HotASM_IE (HotASM_REG)0xa8 #define HotASM_IE_X(bit) HotASM_SREG_X(HotASM_IE, bit)
#define HotASM_IE_0 HotASM_IE_X(HotASM_Bit0) #define HotASM_IE_1 HotASM_IE_X(HotASM_Bit1) #define HotASM_IE_2 HotASM_IE_X(HotASM_Bit2) #define HotASM_IE_3 HotASM_IE_X(HotASM_Bit3) #define HotASM_IE_4 HotASM_IE_X(HotASM_Bit4) #define HotASM_IE_5 HotASM_IE_X(HotASM_Bit5) #define HotASM_IE_6 HotASM_IE_X(HotASM_Bit6) #define HotASM_IE_7 HotASM_IE_X(HotASM_Bit7)
#define HotASM_IE_EX0 HotASM_IE_0 #define HotASM_IE_ET0 HotASM_IE_1 #define HotASM_IE_EX1 HotASM_IE_2 #define HotASM_IE_ET1 HotASM_IE_3 #define HotASM_IE_ES HotASM_IE_4 #define HotASM_IE_ET2 HotASM_IE_5 // #define HotASM_IE_6 HotASM_IE_6 #define HotASM_IE_EA HotASM_IE_6
#define HotASM_EX0 HotASM_IE_0 #define HotASM_ET0 HotASM_IE_1 #define HotASM_EX1 HotASM_IE_2 #define HotASM_ET1 HotASM_IE_3 #define HotASM_ES HotASM_IE_4 #define HotASM_ET2 HotASM_IE_5 // #define HotASM_IE_6 HotASM_IE_6 #define HotASM_EA HotASM_IE_6 /*-------------------------------------------- 汇编数组P3寄存器位定义 --------------------------------------------*/ #define HotASM_P3 (HotASM_REG)0xb0 #define HotASM_P3_X(bit) HotASM_SREG_X(HotASM_P3, bit)
#define HotASM_P3_0 HotASM_P3_X(HotASM_Bit0) #define HotASM_P3_1 HotASM_P3_X(HotASM_Bit1) #define HotASM_P3_2 HotASM_P3_X(HotASM_Bit2) #define HotASM_P3_3 HotASM_P3_X(HotASM_Bit3) #define HotASM_P3_4 HotASM_P3_X(HotASM_Bit4) #define HotASM_P3_5 HotASM_P3_X(HotASM_Bit5) #define HotASM_P3_6 HotASM_P3_X(HotASM_Bit6) #define HotASM_P3_7 HotASM_P3_X(HotASM_Bit7)
#define HotASM_P3_RXD HotASM_P3_0 #define HotASM_P3_TXD HotASM_P3_1 #define HotASM_P3_INT0 HotASM_P3_2 #define HotASM_P3_INT1 HotASM_P3_3 #define HotASM_P3_T0 HotASM_P3_4 #define HotASM_P3_T1 HotASM_P3_5 #define HotASM_P3_WR HotASM_P3_6 #define HotASM_P3_RD HotASM_P3_7
#define HotASM_RXD HotASM_P3_0 #define HotASM_TXD HotASM_P3_1 #define HotASM_INT0 HotASM_P3_2 #define HotASM_INT1 HotASM_P3_3 #define HotASM_T0 HotASM_P3_4 #define HotASM_T1 HotASM_P3_5 #define HotASM_WR HotASM_P3_6 #define HotASM_RD HotASM_P3_7 /*-------------------------------------------- 汇编数组IP寄存器位定义 --------------------------------------------*/ #define HotASM_IP (HotASM_REG)0xb8 #define HotASM_IP_X(bit) HotASM_SREG_X(HotASM_IP, bit)
#define HotASM_IP_0 HotASM_IP_X(HotASM_Bit0) #define HotASM_IP_1 HotASM_IP_X(HotASM_Bit1) #define HotASM_IP_2 HotASM_IP_X(HotASM_Bit2) #define HotASM_IP_3 HotASM_IP_X(HotASM_Bit3) #define HotASM_IP_4 HotASM_IP_X(HotASM_Bit4) #define HotASM_IP_5 HotASM_IP_X(HotASM_Bit5) #define HotASM_IP_6 HotASM_IP_X(HotASM_Bit6) #define HotASM_IP_7 HotASM_IP_X(HotASM_Bit7)
#define HotASM_IP_PX0 HotASM_IP_0 #define HotASM_IP_PT0 HotASM_IP_1 #define HotASM_IP_PX1 HotASM_IP_2 #define HotASM_IP_PT1 HotASM_IP_3 #define HotASM_IP_PS HotASM_IP_4 #define HotASM_IP_PT2 HotASM_IP_5
#define HotASM_PX0 HotASM_IP_0 #define HotASM_PT0 HotASM_IP_1 #define HotASM_PX1 HotASM_IP_2 #define HotASM_PT1 HotASM_IP_3 #define HotASM_PS HotASM_IP_4 #define HotASM_PT2 HotASM_IP_5 /*-------------------------------------------- 汇编数组PSW寄存器位定义 --------------------------------------------*/ #define HotASM_PSW (HotASM_REG)0xd0 #define HotASM_PSW_X(bit) HotASM_SREG_X(HotASM_PSW, bit)
#define HotASM_PSW_0 HotASM_PSW_X(HotASM_Bit0) #define HotASM_PSW_1 HotASM_PSW_X(HotASM_Bit1) #define HotASM_PSW_2 HotASM_PSW_X(HotASM_Bit2) #define HotASM_PSW_3 HotASM_PSW_X(HotASM_Bit3) #define HotASM_PSW_4 HotASM_PSW_X(HotASM_Bit4) #define HotASM_PSW_5 HotASM_PSW_X(HotASM_Bit5) #define HotASM_PSW_6 HotASM_PSW_X(HotASM_Bit6) #define HotASM_PSW_7 HotASM_PSW_X(HotASM_Bit7)
#define HotASM_PSW_P HotASM_PSW_0 #define HotASM_PSW_F1 HotASM_PSW_1 #define HotASM_PSW_OV HotASM_PSW_2 #define HotASM_PSW_RS0 HotASM_PSW_3 #define HotASM_PSW_RS1 HotASM_PSW_4 #define HotASM_PSW_F0 HotASM_PSW_5 #define HotASM_PSW_AC HotASM_PSW_6 #define HotASM_PSW_C HotASM_PSW_7 #define HotASM_PSW_CY HotASM_PSW_7
#define HotASM_P HotASM_PSW_0 #define HotASM_F1 HotASM_PSW_1 #define HotASM_OV HotASM_PSW_2 #define HotASM_RS0 HotASM_PSW_3 #define HotASM_RS1 HotASM_PSW_4 #define HotASM_F0 HotASM_PSW_5 #define HotASM_AC HotASM_PSW_6 #define HotASM_C HotASM_PSW_7 #define HotASM_CY HotASM_PSW_7 /*-------------------------------------------- 汇编数组T2CON寄存器位定义 --------------------------------------------*/ #define HotASM_T2CON (HotASM_REG)0xc8 #define HotASM_T2CON_X(bit) HotASM_SREG_X(HotASM_T2CON, bit)
#define HotASM_T2CON_0 HotASM_T2CON_X(HotASM_Bit0) #define HotASM_T2CON_1 HotASM_T2CON_X(HotASM_Bit1) #define HotASM_T2CON_2 HotASM_T2CON_X(HotASM_Bit2) #define HotASM_T2CON_3 HotASM_T2CON_X(HotASM_Bit3) #define HotASM_T2CON_4 HotASM_T2CON_X(HotASM_Bit4) #define HotASM_T2CON_5 HotASM_T2CON_X(HotASM_Bit5) #define HotASM_T2CON_6 HotASM_T2CON_X(HotASM_Bit6) #define HotASM_T2CON_7 HotASM_T2CON_X(HotASM_Bit7)
#define HotASM_T2CON_CP_RL2 HotASM_T2CON_0 #define HotASM_T2CON_C_T2 HotASM_T2CON_1 #define HotASM_T2CON_TR2 HotASM_T2CON_2 #define HotASM_T2CON_EXEN2 HotASM_T2CON_3 #define HotASM_T2CON_TCLK HotASM_T2CON_4 #define HotASM_T2CON_RCLK HotASM_T2CON_5 #define HotASM_T2CON_EXF2 HotASM_T2CON_6 #define HotASM_T2CON_TF2 HotASM_T2CON_7
#define HotASM_CP_RL2 HotASM_T2CON_0 #define HotASM_C_T2 HotASM_T2CON_1 #define HotASM_TR2 HotASM_T2CON_2 #define HotASM_EXEN2 HotASM_T2CON_3 #define HotASM_TCLK HotASM_T2CON_4 #define HotASM_RCLK HotASM_T2CON_5 #define HotASM_EXF2 HotASM_T2CON_6 #define HotASM_TF2 HotASM_T2CON_7
#define HotASM_TH2 (HotASM_REG)0xcd #define HotASM_TL2 (HotASM_REG)0xcc #define HotASM_RCAP2H (HotASM_REG)0xcb #define HotASM_RCAP2L (HotASM_REG)0xca /*-------------------------------------------- 汇编数组ACC寄存器位定义 --------------------------------------------*/ #define HotASM_ACC (HotASM_REG)0xe0 #define HotASM_ACC_X(bit) HotASM_SREG_X(HotASM_ACC, bit)
#define HotASM_ACC_0 HotASM_ACC_X(HotASM_Bit0) #define HotASM_ACC_1 HotASM_ACC_X(HotASM_Bit1) #define HotASM_ACC_2 HotASM_ACC_X(HotASM_Bit2) #define HotASM_ACC_3 HotASM_ACC_X(HotASM_Bit3) #define HotASM_ACC_4 HotASM_ACC_X(HotASM_Bit4) #define HotASM_ACC_5 HotASM_ACC_X(HotASM_Bit5) #define HotASM_ACC_6 HotASM_ACC_X(HotASM_Bit6) #define HotASM_ACC_7 HotASM_ACC_X(HotASM_Bit7) /*-------------------------------------------- 汇编数组B寄存器位定义 --------------------------------------------*/ #define HotASM_B (HotASM_REG)0xf0 #define HotASM_B_X(bit) HotASM_SREG_X(HotASM_B, bit)
#define HotASM_B_0 HotASM_B_X(HotASM_Bit0) #define HotASM_B_1 HotASM_B_X(HotASM_Bit1) #define HotASM_B_2 HotASM_B_X(HotASM_Bit2) #define HotASM_B_3 HotASM_B_X(HotASM_Bit3) #define HotASM_B_4 HotASM_B_X(HotASM_Bit4) #define HotASM_B_5 HotASM_B_X(HotASM_Bit5) #define HotASM_B_6 HotASM_B_X(HotASM_Bit6) #define HotASM_B_7 HotASM_B_X(HotASM_Bit7)
#ifdef __cplusplus } #endif #endif//__HotASM_Regx52_H__
|
|
sunke9_998892717 2009-2-28 08:16