#inclide "../../arch.h"

int main()
{
	int i;
	u8_t *base;
	arch_file_t f;
	struct arch_filemap_s map;
	logStartConsoleLog();
	logUpperLevel(LOG_TRACE);
	f = archFileOpen("test",file_mode_write,NULL);
	if(f == ARCH_INVALID_FILE)
		return -1;
	base = (u8_t*)archMapReadWrite(f,0,10,&map);
	if(!base)
	{
		archFileClose(f);
		return -1;
	}
	for(i=0;i<10;i++)
		base[i] = (char)('a'+i);
	archUnmap(&map);
	archFileClose(f);
	return 0;
}

