#ifndef RTUSERCODE_H_
#define RTUSERCODE_H_

typedef struct{
	unsigned int uCode;
	union{
		unsigned int Full;
		struct{
			unsigned char Addr;
			unsigned char P0;
			unsigned char Dump0;
			unsigned char Dump1;
		}Spl;
	}Path;
}TBackIndex;

typedef struct{
	struct{
		TBackIndex Body[10240];
		unsigned int BackEndPst;
		unsigned int BackIndex[100];
	}Local;
	struct{
		unsigned int BackEndPst;
		unsigned int BackIndex[1600];
	}Nw;
}TUserCodeDs;

class TRtUserCode{
	private:
		unsigned int ScL0_inx;
		unsigned int ScL1_Inx;
	public:
		TUserCodeDs	Context;
	
		unsigned int ScopeByValStart;
		unsigned int ScopeByValEnd;
	
		unsigned int InxByValStart;
		unsigned int InxByValEnd;
	public:
		TRtUserCode(){}
		void Init();
		void BackIndexClear();
			
		unsigned int NwGetUserCode(unsigned int aNum, unsigned int aP0, unsigned int aP1);
	
};



#endif

