
//**********************************************
//定义内部字节地址存储器
unit base addrtype:uint16 datatype:uint8 area:[0x0000, 0x07ff]
{
	//uint8 写入和读出
	interface uint8 get( uint16 addr )
	{
		#asm "r2 = [&addr]"
		#asm "r1 = [r2]"
	}
	interface void set( uint16 addr, uint8 data )
	{
		#asm "r1 = [&data]"
		#asm "r2 = [&addr]"
		#asm "[r2] = r1"
	}
	//uint16 写入和读出
	interface uint16 get( uint16 addr )
	{
		#asm "r2 = [&addr]"
		#asm "r1 = [r2]"
	}
	interface void set( uint16 addr, uint16 data )
	{
		#asm "r1 = [&data]"
		#asm "r2 = [&addr]"
		#asm "[r2] = r1"
	}
}
//**********************************************
//代码区存储器
unit code addrtype:uint16 datatype:uint8 area:[0x8026, 0xffff]
{
	interface uint8 get( uint16 addr )
	{
		#asm "r2 = [&addr]"
		#asm "r1 = [r2]"
	}
	interface uint16 get( uint16 addr )
	{
		#asm "r2 = [&addr]"
		#asm "r1 = [r2]"
	}	
}





















