<root>
<document schema='101' license='50,Dev User,XDKHX7' title='' description='' target='PIC.16F.16F1937' >
	<config data='!0,fe2!10,1633%0,2%3,0%5,1%6,1%7,1%8,1%9,3%b,1%c,0%d,0%10,3%14,3%18,0%19,1%1a,1%1c,1%1d,0' clkspd='19660800' simspd='1' usewdt='0' constif='0' />
	<plugins >
		<dll_dbg_icd enabled='0' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='0' />
			<data name='usev9' value='0' />
			<data name='breaks' value='8' />
			<data name='stacks' value='8' />
			<data name='clkport' value='1' />
			<data name='clkbit' value='6' />
			<data name='dataport' value='1' />
			<data name='databit' value='7' />
			<data name='monitor' value='1' />
			<data name='ictloop' value='0' />
			<data name='ictrate' value='20000' />
			<data name='ictmask' value='0' />
		</dll_dbg_icd>
		<dll_models enabled='1' />
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug />
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='6de30b58-828d-4d97-a6f4-ea7b4ee2d466' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='0' iconpath='' />
		<component class_type='root' codename='panel' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='Test' type='b1' description='' isconst='0' isinit='1' usrinit='0' setinit='false' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='UsedValues' type='u8' description='Each byte stores the &apos;used&apos; flag for eight values - one per bit.' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='32' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='ValueFree' description='Checks the flags to see whether the given value has been used or not.  Returns
true if the value is free to use.' >
						<return name='Return' type='b1' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<param name='Value' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Bit' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Index' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='.Index = .Value &gt;&gt; 3' />
							<exp exp='.Bit = 1 &lt;&lt; (.Value &amp; 7)' />
						</command>
						<command class_type='decision' title='Decision' exp='(UsedValues[.Index] &amp; .Bit) == 0' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='.Return = True' />
								</command>
							</flowline>
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='.Return = False' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ClaimValue' description='Sets the &apos;used&apos; flag for the given value.' >
						<param name='Value' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Bit' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<local name='Index' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='.Index = .Value &gt;&gt; 3' />
							<exp exp='.Bit = 1 &lt;&lt; (.Value &amp; 7)' />
							<exp exp='UsedValues[.Index] = UsedValues[.Index] | .Bit' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='' >
						<command class_type='call' title='Call Macro' macro='ClearValues' />
						<command class_type='call' title='Call Macro' macro='ClaimValue' >
							<argument exp='10' />
						</command>
						<command class_type='call' title='Call Macro' macro='ClaimValue' >
							<argument exp='20' />
						</command>
						<command class_type='call' title='Call Macro' macro='ClaimValue' >
							<argument exp='30' />
						</command>
						<command class_type='call' title='Call Macro' macro='ClaimValue' >
							<argument exp='40' />
						</command>
						<command class_type='call' title='Call Macro' macro='ValueFree' >
							<return exp='Test' />
							<argument exp='10' />
						</command>
						<command class_type='sim' title='Simulation' macro='Debug.PrintLn' >
							<argument exp='Test' />
						</command>
						<command class_type='call' title='Call Macro' macro='ValueFree' >
							<return exp='Test' />
							<argument exp='11' />
						</command>
						<command class_type='sim' title='Simulation' macro='Debug.PrintLn' >
							<argument exp='Test' />
						</command>
						<command class_type='call' title='Call Macro' macro='ValueFree' >
							<return exp='Test' />
							<argument exp='20' />
						</command>
						<command class_type='sim' title='Simulation' macro='Debug.PrintLn' >
							<argument exp='Test' />
						</command>
						<command class_type='call' title='Call Macro' macro='ValueFree' >
							<return exp='Test' />
							<argument exp='19' />
						</command>
						<command class_type='sim' title='Simulation' macro='Debug.PrintLn' >
							<argument exp='Test' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='ClearValues' description='Clears all &apos;used&apos; flags.' >
						<local name='Index' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='calculation' title='Calculation' >
							<exp exp='.Index = 0' />
						</command>
						<command class_type='loop' title='Loop' type='0' exp='.Index &lt; 32' >
							<flowline >
								<command class_type='calculation' title='Calculation' >
									<exp exp='UsedValues[.Index] = 0' />
									<exp exp='.Index = .Index + 1' />
								</command>
							</flowline>
						</command>
					</flowline>
				</macro>
			</macros>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='9737364' img='' style='4294967295' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='0' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='4' />
		<table rgb='3158137' img='' style='4294967295' size='67' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAADAUAALwDAAA' zoom='75' scrollx='0' scrolly='54' flags='0' />
		<view type='0' name='ValueFree' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAADAUAALwDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ClaimValue' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAADAUAALwDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='ClearValues' mode='0' placement='LAAAAAAAAAABAAAA---------------------wAAAAAUAAAADAUAALwDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
