
//[i] color english_UL,
LOAD ModuleLib system\language\english_UL.txt,

//**********************************************
//定义内部字节地址存储器
public vbasetype
[
	//类型接口
	public VT base
	{
		target = base_instance,
		type = [ N32 0x00000000, 0x000fffff ] N8,
	}
	base_instance
	[
		//uint8 写入和读出
		public N8 get_N8 (N32 addr):
			#asm "mov ecx,[ebx+&addr]"
			#asm "mov al,[ecx]"
		end.
		
		public V set_N8 (N32 addr) (N8 data):
			#asm "mov ecx,[ebx+&addr]"
			#asm "mov dl,[ebx+&data]"
			#asm "mov [ecx],dl"
		end.
		
		//uint16 写入和读出
		public N16 get_N16 (N32 addr):
			#asm "mov ecx,[ebx+&addr]"
			#asm "mov ax,[ecx]"
		end.
		
		public V set_N16 (N32 addr) (N16 data):
			#asm "mov ecx,[ebx+&addr]"
			#asm "mov dx,[ebx+&data]"
			#asm "mov [ecx],dx"
		end.
		
		//uint32 写入和读出
		public N32 get_N32 (N32 addr):
			#asm "mov ecx,[ebx+&addr]"
			#asm "mov eax,[ecx]"
		end.
		
		public V set_N32 (N32 addr) (N32 data):
			#asm "mov ecx,[ebx+&addr]"
			#asm "mov edx,[ebx+&data]"
			#asm "mov [ecx],edx"
		end.
	]
]
//**********************************************
//代码区存储器
public vcodetype
[
	//类型接口
	public VT code
	{
		target = code_instance,
		type = [ N32 0x00000000, 0x00000fff ] N8,
	}
	code_instance
	[
		public N8 get_N8 (N32 addr):
			#asm "mov ecx,[ebx+&addr]"
			#asm "mov al,[ecx]"
		end.
		
		public N16 get_N16 (N32 addr):
			#asm "mov ecx,[ebx+&addr]"
			#asm "mov ax,[ecx]"
		end.
		
		public N32 get_N32 (N32 addr):
			#asm "mov ecx,[ebx+&addr]"
			#asm "mov eax,[ecx]"
		end.
	]
]

















