
public unit sys
{
	public memory base
	{
		target = iointerface;
		type = [ uint32 0x0000, 0xffff ] uint8;
	}
	public memory code
	{
		target = iointerface;
		type = [ uint32 128, 0xffff ] uint8;  //[0x0080, 0x1fff],
	}
	unit iointerface
	{
		//uint8 写入和读出
		public uint8 get_uint8( uint32 addr )
		{
			if( addr.16(uint8) == 0 ) {
				#asm "加载_1_local_uint16 0"
				#asm "加载BASE_uint8"
			}
			else {
				#asm "加载_1_local_uint16 0"
				#asm "加载CODE_uint8"
			}
		}
		public void set_uint8( uint32 addr, uint8 data )
		{
			#asm "加载_1_local_uint32 0"
			#asm "加载_0_local_uint32 4"
			#asm "保存BASE_uint8"
		}
		//uint16 写入和读出
		public uint16 get_uint16( uint32 addr )
		{
			if( addr.16(uint8) == 0 ) {
				#asm "加载_1_local_uint16 0"
				#asm "加载BASE_uint16"
			}
			else {
				#asm "加载_1_local_uint16 0"
				#asm "加载CODE_uint16"
			}
		}
		public void set_uint16( uint32 addr, uint16 data )
		{
			#asm "加载_1_local_uint32 0"
			#asm "加载_0_local_uint32 4"
			#asm "保存BASE_uint16"
		}
		//uint32 写入和读出
		public uint32 get_uint32( uint32 addr )
		{
			if( addr.16(uint8) == 0 ) {
				#asm "加载_1_local_uint16 0"
				#asm "加载BASE_uint32"
			}
			else {
				#asm "加载_1_local_uint16 0"
				#asm "加载CODE_uint32"
			}
		}
		public void set_uint32( uint32 addr, uint32 data )
		{
			#asm "加载_1_local_uint32 0"
			#asm "加载_0_local_uint32 4"
			#asm "保存BASE_uint32"
		}
	}
}

