<!--
	Assembler Encoding for the Compare Mnemonic
	Version: 1.0.0
	Date Created:  2007-05-14
	Last Modified: 2007-06-17

	Designed for Pentium and higher x86 Processors in 32bit mode protected mode
	Optimized for Size
	
	Done list:
	o U/S8-32,Bool to U/S8-32,Bool

	To Do:
	o Everything Else!
-->
<encoding procfamily="x86" bitdepth="32" proc="Pentium">
	<!-- ############################################################################################################ -->
	<!-- ############################################################################################################ -->
	<!-- ############################################################################################################ -->
	<!-- Compare Mnemonic -->
	<mnemonic name="Compare" type="Compare2" option="Size">
		<!-- ********************************************************************************************************** -->
		<!-- Comparing TO 8bit values -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 8bit -->
		<codetypeset param0="U/S8" param1="U/S8">
			<codeset param0="M" param1="M" total="3" totalv="2"
				lostregs="al" endregs="al=@1.U8" endpipe="U">
				<line code="mov al, @1.U8" time="U 1" timev=" V1" comment="Get the value to compare to" />
				<line code="cmp @0.U8, al" time="U*2" timev="U 2" comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R" total="2" totalv="1" endpipe="S">
				<line code="cmp @0.U8, @1.U8" time="U 2" timev=" V2" comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="I" total="2" endpipe="V">
				<line code="cmp @0.U8, @1.U8" time="&#45;&#45;2" comment="Do the compare (Assume not pairable)" />
			</codeset>

			<codeset param0="R" param1="M" total="2" totalv="1" endpipe="S">
				<line code="cmp @0.U8, @1.U8" time="U 2" timev=" V2" comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="R,I" total="1" totalv="0" endpipe="S">
				<line code="cmp @0.U8, @1.U8" time="U 1" timev=" V1" comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 24bit -->

		<!-- ====================================================================================== -->
		<!-- From U/S16 to U8 -->
		<codetypeset param0="U8" param1="U/S16">
			<codeset param0="M,R" param1="M" total="6"
				lostregs="eax" endregs="eax=@0.U8" endpipe="U">
				<line code="movzx eax, @0.U8" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp ax, @1.U16"  time="U 2+1"        comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="R,I" total="5"
				lostregs="eax" endregs="eax=@0.U8" endpipe="U">
				<line code="movzx eax, @0.U8" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp ax, @1.U16"  time="U 1+1"        comment="Do the compare" />
			</codeset>
		</codetypeset>

		<!-- ====================================================================================== -->
		<!-- From U/S16 to S8 -->
		<codetypeset param0="S8" param1="U/S16">
			<codeset param0="M,R" param1="M" total="6"
				lostregs="eax" endregs="eax=@0.S8" endpipe="U">
				<line code="movsx eax, @0.U8" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp ax, @1.U16"  time="U 2+1"        comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="R,I" total="5"
				lostregs="eax" endregs="eax=@0.S8" endpipe="U">
				<line code="movsx eax, @0.U8" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp ax, @1.U16"  time="U 1+1"        comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 24bit -->

		<!-- ====================================================================================== -->
		<!-- From U/24 to U8 -->
		<codetypeset param0="U8" param1="U/S24">
			<codeset param0="M,R" param1="M" param1type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="mov al, @0.U8"                 time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @1.U8"                time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_U24ToU8" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="M" param1type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="mov al, @0.U8"                 time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @1.U8"                time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_S24ToU8" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="R,I" total="4"
				lostregs="eax" endregs="eax=@0.U8" endpipe="U">
				<line code="movzx eax, @0.U8" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp eax, @1.U32"  time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>

		<!-- ====================================================================================== -->
		<!-- From U/S24 to S8 -->
		<codetypeset param0="S8" param1="U/S24">
			<codeset param0="M,R" param1="M" param1type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="mov al, @0.U8"                 time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @1.U8"                time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_U24ToS8" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="M" param1type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="mov al, @0.U8"                 time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @1.U8"                time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_S24ToS8" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="R,I" total="4"
				lostregs="eax" endregs="eax=@0.S8" endpipe="U">
				<line code="movsx eax, @0.U8" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp eax, @1.S32"  time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 32bit -->

		<!-- ====================================================================================== -->
		<!-- From U/S32 to U8 -->
		<codetypeset param0="U8" param1="U/S32">
			<codeset param0="M,R" param1="M" total="5"
				lostregs="eax" endregs="eax=@0.U8" endpipe="U">
				<line code="movzx eax, @0.U8" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp eax, @1.U32"  time="U 2"         comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="R,I" total="4"
				lostregs="eax" endregs="eax=@0.U8" endpipe="U">
				<line code="movzx eax, @0.U8" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp eax, @1.U32"  time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>

		<!-- ====================================================================================== -->
		<!-- From U/S32 to S8 -->
		<codetypeset param0="S8" param1="U/S32">
			<codeset param0="M,R" param1="M" total="5"
				lostregs="eax" endregs="eax=@0.S8" endpipe="U">
				<line code="movsx eax, @0.U8" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp eax, @1.U32"  time="U 2"         comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="R,I" total="4"
				lostregs="eax" endregs="eax=@0.S8" endpipe="U">
				<line code="movsx eax, @0.U8" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp eax, @1.U32"  time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S8" param1="Boolean">
			<!-- Switch to Boolean Version -->
			<codeset param0="M,R" param1="M" total="5" totalv="4"
				lostregs="al,dl" endpipe="U">
				<line code="mov al, @0.U8" time="U 1" timev=" V1" comment="Get the value to compare to" />
				<line code="xor dl, dl"    time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add al, -1"    time="U 1" timev=" V1" comment="Add -1. This sets carry if it was non-zero" />
				<line code="adc dl, dl"    time="U!1"             comment="1 if non-zero, 0 if zero" />
				<line code="cmp dl, @1.U8" time="U*2" timev="U 2" comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="R,I" total="4" totalv="3"
				lostregs="al,dl" endpipe="U">
				<line code="mov al, @0.U8" time="U 1" timev=" V1" comment="Get the value to compare to" />
				<line code="xor dl, dl"    time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add al, -1"    time="U 1" timev=" V1" comment="Add -1. This sets carry if it was non-zero" />
				<line code="adc dl, dl"    time="U!1"             comment="1 if non-zero, 0 if zero" />
				<line code="cmp dl, @1.U8" time="U*1" timev="U 1" comment="Do the compare" />
			</codeset>

			<!-- Compare to 1/0 Version -->
			<!--
			<codeset param0="M" param1="M" total="3" totalv="2"
				lostregs="al" endregs="al=@1.U8" endpipe="U">
				<line code="mov al, @1.U8" time="U 1" timev=" V1" comment="Get the value to compare to" />
				<line code="cmp @0.U8, al" time="U*2" timev="U 2" comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R" total="2" totalv="1" endpipe="S">
				<line code="cmp @0.U8, @1.U8" time="U 2" timev=" V2" comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="I" total="2" endpipe="V">
				<line code="cmp @0.U8, @1.U8" time="&#45;&#45;2" comment="Do the compare (Assume not pairable)" />
			</codeset>

			<codeset param0="R" param1="M" total="2" totalv="1" endpipe="S">
				<line code="cmp @0.U8, @1.U8" time="U 2" timev=" V2" comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="R,I" total="1" totalv="0" endpipe="S">
				<line code="cmp @0.U8, @1.U8" time="U 1" timev=" V1" comment="Do the compare" />
			</codeset>
			-->
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- Comparing TO 16bit values -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 8bit -->

		<!-- ====================================================================================== -->
		<!-- From U8 to U/S16 -->
		<codetypeset param0="U/S16" param1="U8">
			<codeset param0="M" param1="M,R" total="6" totalv="6"
				lostregs="eax" endregs="eax=@1.U8" endpipe="U">
				<line code="movzx eax, @1.U8" time="&#45;&#45;3" comment="Zero extend the value" />
				<line code="cmp @0.U16, ax"   time="U 2+1"       comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="M,R" total="5" totalv="5"
				lostregs="eax" endregs="eax=@1.U8" endpipe="U">
				<line code="movzx eax, @1.U8" time="&#45;&#45;3" comment="Zero extend the value" />
				<line code="cmp @0.U16, ax"   time="U 1+1"       comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- ====================================================================================== -->
		<!-- From S8 to U/S16 -->
		<codetypeset param0="U/S16" param1="S8">
			<codeset param0="M" param1="M,R" total="6" totalv="6"
				lostregs="eax" endregs="eax=@1.S8" endpipe="U">
				<line code="movsx eax, @1.U8" time="&#45;&#45;3" comment="Sign extend the value" />
				<line code="cmp @0.U16, ax"   time="U 2+1"       comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="M,R" total="5" totalv="5"
				lostregs="eax" endregs="eax=@1.S8" endpipe="U">
				<line code="movsx eax, @1.U8" time="&#45;&#45;3" comment="Sign extend the value" />
				<line code="cmp @0.U16, ax"   time="U 1+1"       comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 16bit -->
		<codetypeset param0="U/S16" param1="U/S16">
			<codeset param0="M" param1="M" total="5" totalv="4"
				lostregs="ax" endregs="ax=@1.U16" endpipe="U">
				<line code="mov ax, @1.U16" time="U 1+1" timev=" V1+1" comment="Get the value to compare to" />
				<line code="cmp @0.U16, ax" time="U*2+1" timev="U 2+1" comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R" total="3" totalv="2" endpipe="S">
				<line code="cmp @0.U16, @1.U16" time="U 2+1" timev=" V2+1" comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="I" total="3" totalv="3" endpipe="V">
				<line code="cmp @0.U16, @1.U16" time="&#45;&#45;2+1" comment="Do the compare (assume not pipable)" />
			</codeset>

			<codeset param0="R" param1="M" total="3" totalv="2" endpipe="S">
				<line code="cmp @0.U16, @1.U16" time="U 2+1" timev=" V2+1" comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="R,I" total="2" totalv="1" endpipe="S">
				<line code="cmp @0.U16, @1.U16" time="U 1+1" timev=" V1+1" comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 24bit -->

		<!-- ====================================================================================== -->
		<!-- From U/24 to U16 -->
		<codetypeset param0="U16" param1="U/S24">
			<codeset param0="M" param1="M" param1type="U24" total="3+?" totalv="2+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="mov ax, @0.U16"                 time="U 1+1" timev=" V1+1" comment="Get our value" />
				<line code="lea edx, @1.U8"                 time=" V1"   timev="U 1"   comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_U24ToU16" time="!V1+?"               comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="M" param1type="S24" total="3+?" totalv="2+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="mov ax, @0.U16"                 time="U 1+1" timev=" V1+1" comment="Get our value" />
				<line code="lea edx, @1.U8"                 time=" V1"   timev="U 1"   comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_S24ToU16" time="!V1+?"               comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="R,I" total="4"
				lostregs="eax" endregs="eax=@0.U16" endpipe="U">
				<line code="movzx eax, @0.U16" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp eax, @1.U32"   time="U 1"         comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M" param1type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="mov eax, @0.U32"                time="U 1"   timev=" V1" comment="Get our value" />
				<line code="lea edx, @1.U8"                 time=" V1"   timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_U24ToU16" time="!V1+?"             comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="M" param1type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="mov eax, @0.U32"                time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @1.U8"                 time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_S24ToU16" time="!V1+?"           comment="Do the compare" />
			</codeset>
		</codetypeset>

		<!-- ====================================================================================== -->
		<!-- From U/S24 to S16 -->
		<codetypeset param0="S16" param1="U/S24">
			<codeset param0="M" param1="M" param1type="U24" total="3+?" totalv="2+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="mov ax, @0.U16"                 time="U 1+1" timev=" V1+1" comment="Get our value" />
				<line code="lea edx, @1.U8"                 time=" V1"   timev="U 1"   comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_U24ToS16" time="!V1+?"               comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="M" param1type="S24" total="3+?" totalv="2+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="mov ax, @0.U16"                 time="U 1+1" timev=" V1+1" comment="Get our value" />
				<line code="lea edx, @1.U8"                 time=" V1"   timev="U 1"   comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_S24ToS16" time="!V1+?"               comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="R,I" total="4"
				lostregs="eax" endregs="eax=@0.S16" endpipe="U">
				<line code="movsx eax, @0.U16" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp eax, @1.S32"   time="U 1"         comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M" param1type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="mov eax, @0.U32"                time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @1.U8"                 time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_U24ToS16" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="M" param1type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="mov eax, @0.U32"                time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @1.U8"                 time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_S24ToS16" time="!V1+?"           comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 32bit -->

		<!-- ====================================================================================== -->
		<!-- From U/S32 to U16 -->
		<codetypeset param0="U16" param1="U/S32">
			<codeset param0="M,R" param1="M" total="5"
				lostregs="eax" endregs="eax=@0.U16" endpipe="U">
				<line code="movzx eax, @0.U16" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp eax, @1.U32"   time="U 2"         comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="R,I" total="4"
				lostregs="eax" endregs="eax=@0.U16" endpipe="U">
				<line code="movzx eax, @0.U16" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp eax, @1.U32"  time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>

		<!-- ====================================================================================== -->
		<!-- From U/S32 to S16 -->
		<codetypeset param0="S16" param1="U/S32">
			<codeset param0="M,R" param1="M" total="5"
				lostregs="eax" endregs="eax=@0.S16" endpipe="U">
				<line code="movsx eax, @0.U16" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp eax, @1.U32"   time="U 2"         comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="R,I" total="4"
				lostregs="eax" endregs="eax=@0.S16" endpipe="U">
				<line code="movsx eax, @0.U16" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp eax, @1.S32"   time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S16" param1="Boolean">
			<!-- Switch to Boolean Version -->
			<codeset param0="M,R" param1="M" total="7" totalv="6"
				lostregs="ax,dl" endpipe="U">
				<line code="mov ax, @0.U16" time="U 1+1" timev=" V1+1" comment="Get the value to compare to" />
				<line code="xor dl, dl"     time=" V1"   timev="U 1"   comment="Clear to zero" />
				<line code="add ax, -1"     time="U 1+1" timev=" V1+1" comment="Add -1. This sets carry if it was non-zero" />
				<line code="adc dl, dl"     time="U!1"                 comment="1 if non-zero, 0 if zero" />
				<line code="cmp dl, @1.U8"  time="U*2"   timev="U 2"   comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="R,I" total="6" totalv="5"
				lostregs="ax,dl" endpipe="U">
				<line code="mov ax, @0.U8" time="U 1+1" timev=" V1+1" comment="Get the value to compare to" />
				<line code="xor dl, dl"    time=" V1"   timev="U 1"   comment="Clear to zero" />
				<line code="add ax, -1"    time="U 1+1" timev=" V1+1" comment="Add -1. This sets carry if it was non-zero" />
				<line code="adc dl, dl"    time="U!1"                 comment="1 if non-zero, 0 if zero" />
				<line code="cmp dl, @1.U8" time="U*1"   timev="U 1"   comment="Do the compare" />
			</codeset>

			<!-- Compare to 1/0 Version -->
			<!--
			<codeset param0="M" param1="M" total="3" totalv="2"
				lostregs="al" endregs="al=@1.U8" endpipe="U">
				<line code="mov al, @1.U8" time="U 1" timev=" V1" comment="Get the value to compare to" />
				<line code="cmp @0.U8, al" time="U*2" timev="U 2" comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R" total="2" totalv="1" endpipe="S">
				<line code="cmp @0.U8, @1.U8" time="U 2" timev=" V2" comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="I" total="2" endpipe="V">
				<line code="cmp @0.U8, @1.U8" time="&#45;&#45;2" comment="Do the compare (Assume not pairable)" />
			</codeset>

			<codeset param0="R" param1="M" total="2" totalv="1" endpipe="S">
				<line code="cmp @0.U8, @1.U8" time="U 2" timev=" V2" comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="R,I" total="1" totalv="0" endpipe="S">
				<line code="cmp @0.U8, @1.U8" time="U 1" timev=" V1" comment="Do the compare" />
			</codeset>
			-->
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- Comparing TO 24bit values -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 8bit -->

		<!-- ====================================================================================== -->
		<!-- From U8 to U/S24 -->
		<codetypeset param0="U/S24" param1="U8">
			<codeset param0="M" param1="M,R" param0type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="mov al, @1.U8"                 time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @0.U8"                time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_U8ToU24" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="M,R" param0type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="mov al, @1.U8"                 time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @0.U8"                time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_U8ToS24" time="!V1+?"           comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M,R" total="4"
				lostregs="eax" endregs="eax=@1.U8" endpipe="U">
				<line code="movzx eax, @1.U8" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp @0.U32, eax"  time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>

		<!-- ====================================================================================== -->
		<!-- From S8 to U/S24 -->
		<codetypeset param0="U/S24" param1="S8">
			<codeset param0="M" param1="M,R" param0type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="mov al, @1.U8"                 time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @0.U8"                time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_S8ToU24" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="M,R" param0type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="mov al, @1.U8"                 time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @0.U8"                time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_S8ToS24" time="!V1+?"           comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M,R" total="4"
				lostregs="eax" endregs="eax=@1.S8" endpipe="U">
				<line code="movsx eax, @1.U8" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp @0.S32, eax"  time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 16bit -->

		<!-- ====================================================================================== -->
		<!-- From U16 to U/S24 -->
		<codetypeset param0="U/S24" param1="U16">
			<codeset param0="M" param1="M" param0type="U24" total="3+?" totalv="2+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="mov ax, @1.U16"                 time="U 1+1" timev=" V1+1" comment="Get our value" />
				<line code="lea edx, @0.U8"                 time=" V1"   timev="U 1"   comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_U16ToU24" time="!V1+?"               comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="M" param0type="S24" total="3+?" totalv="2+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="mov ax, @1.U16"                 time="U 1+1" timev=" V1+1" comment="Get our value" />
				<line code="lea edx, @0.U8"                 time=" V1"   timev="U 1"   comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_U16ToS24" time="!V1+?"               comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R" param0type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="mov eax, @1.U32"                time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @0.U8"                 time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_U16ToU24" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R" param0type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="mov eax, @1.U32"                time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @0.U8"                 time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_U16ToS24" time="!V1+?"           comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M,R" total="4"
				lostregs="eax" endregs="eax=@1.U16" endpipe="U">
				<line code="movzx eax, @1.U16" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp @0.U32, eax"   time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>

		<!-- ====================================================================================== -->
		<!-- From S16 to U/S24 -->
		<codetypeset param0="U/S24" param1="S16">
			<codeset param0="M" param1="M" param0type="U24" total="3+?" totalv="2+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="mov ax, @1.U16"                 time="U 1+1" timev=" V1+1" comment="Get our value" />
				<line code="lea edx, @0.U8"                 time=" V1"   timev="U 1"   comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_S16ToU24" time="!V1+?"               comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="M" param0type="S24" total="3+?" totalv="2+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="mov ax, @1.U16"                 time="U 1+1" timev=" V1+1" comment="Get our value" />
				<line code="lea edx, @0.U8"                 time=" V1"   timev="U 1"   comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_S16ToS24" time="!V1+?"               comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R" param0type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="mov eax, @1.U32"                time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @0.U8"                 time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_S16ToU24" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R" param0type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="mov eax, @1.U32"                time="U 1" timev=" V1" comment="Get our value" />
				<line code="lea edx, @0.U8"                 time=" V1" timev="U 1" comment="Get a pointer to the value to compare" />
				<line code="call Mnemonic_Compare_S16ToS24" time="!V1+?"           comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M,R" total="4"
				lostregs="eax" endregs="eax=@0.S16" endpipe="U">
				<line code="movsx eax, @0.U16" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp eax, @1.S32"   time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 24bit -->
		<codetypeset param0="U/S24" param1="U/S24">
			<codeset param0="M" param1="M" param0type="U24" paaram1type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="V">
				<line code="lea eax, @1.U8"                 time="U 1" timev=" V1" comment="Get the address of the first value" />
				<line code="lea edx, @0.U8"                 time=" V1" timev="U 1" comment="Get the address of the second value" />
				<line code="call Mnemonic_Compare_U24ToU24" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="M" param0type="U24" paaram1type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="V">
				<line code="lea eax, @1.U8"                 time="U 1" timev=" V1" comment="Get the address of the first value" />
				<line code="lea edx, @0.U8"                 time=" V1" timev="U 1" comment="Get the address of the second value" />
				<line code="call Mnemonic_Compare_S24ToU24" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="M" param0type="S24" paaram1type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="V">
				<line code="lea eax, @1.U8"                 time="U 1" timev=" V1" comment="Get the address of the first value" />
				<line code="lea edx, @0.U8"                 time=" V1" timev="U 1" comment="Get the address of the second value" />
				<line code="call Mnemonic_Compare_U24ToS24" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="M" param0type="S24" paaram1type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="V">
				<line code="lea eax, @1.U8"                 time="U 1" timev=" V1" comment="Get the address of the first value" />
				<line code="lea edx, @0.U8"                 time=" V1" timev="U 1" comment="Get the address of the second value" />
				<line code="call Mnemonic_Compare_S24ToS24" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R,I" param0type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="V">
				<line code="mov eax, @1.U32"                    time="U 1" timev=" V1" comment="Get the second value" />
				<line code="lea edx, @0.U8"                     time=" V1" timev="U 1" comment="Get the address of the first value" />
				<line code="call Mnemonic_Compare_US24RegToU24" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R,I" param0type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="V">
				<line code="mov eax, @1.S32"                    time="U 1" timev=" V1" comment="Get the second value" />
				<line code="lea edx, @0.U8"                     time=" V1" timev="U 1" comment="Get the address of the first value" />
				<line code="call Mnemonic_Compare_US24RegToS24" time="!V1+?"           comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M" param1type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="V">
				<line code="mov eax, @0.U32"                   time="U 1" timev=" V1" comment="Get the first value" />
				<line code="lea edx, @1.U8"                    time=" V1" timev="U 1" comment="Get the address of the second value" />
				<line code="call Mnemonic_Compare_U24ToUS24_R" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="M" param1type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="V">
				<line code="mov eax, @0.U32"                   time="U 1" timev=" V1" comment="Get the first value" />
				<line code="lea edx, @1.U8"                    time=" V1" timev="U 1" comment="Get the address of the second value" />
				<line code="call Mnemonic_Compare_S24ToUS24_R" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="R" total="1" totalv="0" endpipe="S">
				<line code="cmp @0.U32, @1.U32" time="U 1" timev=" V1" comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="I" param0type="U24" total="1" totalv="0" endpipe="S">
				<line code="cmp @0.U32, @1.U32" time="U 1" timev=" V1" comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="I" param0type="S24" total="1" totalv="0" endpipe="S">
				<line code="cmp @0.U32, @1.S32" time="U 1" timev=" V1" comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 32bit -->
		<codetypeset param0="U/S24" param1="U/S32">
			<codeset param0="M" param1="M,R,I" param0type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="V">
				<line code="mov eax, @1.U32"            time="U 1" timev=" V1" comment="Get the 32bit value" />
				<line code="lea edx, @0.U8"             time=" V1" timev="U 1" comment="Get the address of the 24bit value" />
				<line code="Mnemonic_Compare_US32ToU24" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="M,R,I" param0type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="V">
				<line code="mov eax, @1.U32"            time="U 1" timev=" V1" comment="Get the 32bit value" />
				<line code="lea edx, @0.U8"             time=" V1" timev="U 1" comment="Get the address of the 24bit value" />
				<line code="Mnemonic_Compare_US32ToS24" time="!V1+?"           comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M" total="2" totalv="1" endpipe="S">
				<line code="cmp @0.U32, @1.U32" time="U 2" timev=" V2" comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="R,I" total="1" totalv="0" endpipe="S">
				<line code="cmp @0.U32, @1.U32" time="U 1" timev=" V1" comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S24" param1="Boolean">
			<!-- Switch to Boolean Version -->
			<codeset param0="M" param1="M" total="3+?" totalv="3+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="lea edx, @0.U8"              time="U 1" timev=" V1" comment="Get the address of the 24bit value" />
				<line code="call TypeCast_US24ToBoolean" time="!V1+?"           comment="Convert it to boolean" />
				<line code="cmp al, @1.U8"               time="U 2"             comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R,I" total="2+?" totalv="2+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="U">
				<line code="lea edx, @0.U8"              time="U 1" timev=" V1" comment="Get the address of the 24bit value" />
				<line code="call TypeCast_US24ToBoolean" time="!V1+?"           comment="Convert it to boolean" />
				<line code="cmp al, @1.U8"               time="U 1"             comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M" total="5" totalv="4"
				lostregs="eax,dl" endpipe="U">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Get the full register value" />
				<line code="xor dl, dl"      time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add eax, -1"     time="U 1" timev=" V1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc dl, dl"      time="U!1"             comment="1 if carry, 0 if no carry" />
				<line code="cmp dl, @1.U8"   time="U*2"             comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="R,I" total="4" totalv="3"
				lostregs="eax,dl" endpipe="U">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Get the full register value" />
				<line code="xor dl, dl"      time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add eax, -1"     time="U 1" timev=" V1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc dl, dl"      time="U!1"             comment="1 if carry, 0 if no carry" />
				<line code="cmp dl, @1.U8"   time="U*1"             comment="Do the compare" />
			</codeset>
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- Comparing TO 32bit values -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 8bit -->

		<!-- ====================================================================================== -->
		<!-- From U8 to U/S32 -->
		<codetypeset param0="U/S32" param1="U8">
			<codeset param0="M" param1="M,R" total="5"
				lostregs="eax" endregs="eax=@1.U8" endpipe="U">
				<line code="movzx eax, @1.U8" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp @0.U32, eax"  time="U 2"         comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M,R" total="4"
				lostregs="eax" endregs="eax=@1.U8" endpipe="U">
				<line code="movzx eax, @1.U8" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp @0.U32, eax"  time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>

		<!-- ====================================================================================== -->
		<!-- From S8 to U/S32 -->
		<codetypeset param0="U/S32" param1="S8">
			<codeset param0="M" param1="M,R" total="5"
				lostregs="eax" endregs="eax=@1.S8" endpipe="U">
				<line code="movsx eax, @1.U8" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp @0.U32, eax"  time="U 2"         comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M,R" total="4"
				lostregs="eax" endregs="eax=@1.S8" endpipe="U">
				<line code="movsx eax, @1.U8" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp @0.U32, eax"  time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 16bit -->

		<!-- ====================================================================================== -->
		<!-- From U16 to U/S32 -->
		<codetypeset param0="U/S32" param1="U16">
			<codeset param0="M" param1="M,R" total="5"
				lostregs="eax" endregs="eax=@1.U16" endpipe="U">
				<line code="movzx eax, @1.U16" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp @0.U32, eax"   time="U 2"         comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M,R" total="4"
				lostregs="eax" endregs="eax=@1.U16" endpipe="U">
				<line code="movzx eax, @1.U16" time="&#45;&#45;3" comment="Zero extend our value" />
				<line code="cmp @0.U32, eax"  time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>

		<!-- ====================================================================================== -->
		<!-- From S16 to U/S32 -->
		<codetypeset param0="U/S32" param1="S16">
			<codeset param0="M" param1="M,R" total="5"
				lostregs="eax" endregs="eax=@1.S16" endpipe="U">
				<line code="movsx eax, @1.U16" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp @0.U32, eax"   time="U 2"         comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M,R" total="4"
				lostregs="eax" endregs="eax=@1.S16" endpipe="U">
				<line code="movsx eax, @1.U16" time="&#45;&#45;3" comment="Sign extend our value" />
				<line code="cmp @0.S32, eax"   time="U 1"         comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 24bit -->
		<codetypeset param0="U/S32" param1="U/S24">
			<codeset param0="M,R" param1="M" param1type="U24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="V">
				<line code="mov eax, @0.U32"            time="U 1" timev=" V1" comment="Get the 32bit value" />
				<line code="lea edx, @1.U8"             time=" V1" timev="U 1" comment="Get the address of the 24bit value" />
				<line code="Mnemonic_Compare_U24ToUS32" time="!V1+?"           comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="M" param1type="S24" total="2+?" totalv="1+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="V">
				<line code="mov eax, @0.U32"            time="U 1" timev=" V1" comment="Get the 32bit value" />
				<line code="lea edx, @1.U8"             time=" V1" timev="U 1" comment="Get the address of the 24bit value" />
				<line code="Mnemonic_Compare_S24ToUS32" time="!V1+?"           comment="Do the compare" />
			</codeset>

			<codeset param0="M" param1="R" total="2" totalv="1" endpipe="S">
				<line code="cmp @0.U32, @1.U32" time="U 2" timev=" V2" comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="R" total="1" totalv="0" endpipe="S">
				<line code="cmp @0.U32, @1.U32" time="U 1" timev=" V1" comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 32bit -->
		<codetypeset param0="U/S32" param1="U/S32">
			<codeset param0="M" param1="M" total="3" totalv="2"
				lostregs="eax" endregs="eax=@1.U32" endpipe="U">
				<line code="mov eax, @1.U32" time="U 1" timev=" V1" comment="Get the value to compare from" />
				<line code="cmp @0.U32, eax" time="U*2" timev="U 2" comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R" total="2" totalv="1" endpipe="S">
				<line code="cmp @0.U32, @1.U32" time="U 2" timev=" V2" comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="I" total="2" totalv="2" endpipe="V">
				<line code="cmp @0.U32, @1.U32" time="&#45;&#45;2" comment="Do the compare (assume not pipable)" />
			</codeset>

			<codeset param0="R" param1="M" total="2" totalv="1" endpipe="S">
				<line code="cmp @0.U32, @1.U32" time="U 2" timev=" V2" comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="R,I" total="1" totalv="0" endpipe="S">
				<line code="cmp @0.U32, @1.U32" time="U 1" timev=" V1" comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S32" param1="Boolean">
			<codeset param0="M,R" param1="M" total="5" totalv="4"
				lostregs="eax,dl" endpipe="U">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Get the value" />
				<line code="xor dl, dl"      time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add eax, -1"     time="U 1" timev=" V1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc dl, dl"      time="U!1"             comment="1 if carry, 0 if no carry" />
				<line code="cmp dl, @1.U8"   time="U*2"             comment="Do the compare" />
			</codeset>
			<codeset param0="M,R" param1="R,I" total="4" totalv="3"
				lostregs="eax,dl" endpipe="U">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Get the value" />
				<line code="xor dl, dl"      time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add eax, -1"     time="U 1" timev=" V1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc dl, dl"      time="U!1"             comment="1 if carry, 0 if no carry" />
				<line code="cmp dl, @1.U8"   time="U*1"             comment="Do the compare" />
			</codeset>
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- Comparing TO Boolean -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 8bit -->
		<codetypeset param0="Boolean" param1="U/S8">
			<!-- Switch to Boolean Version -->
			<codeset param0="M" param1="M,R,I" total="5" totalv="4"
				lostregs="al,dl" endpipe="U">
				<line code="mov al, @1.U8" time="U 1" timev=" V1" comment="Get the value to compare to" />
				<line code="xor dl, dl"    time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add al, -1"    time="U 1" timev=" V1" comment="Add -1. This sets carry if it was non-zero" />
				<line code="adc dl, dl"    time="U!1"             comment="1 if non-zero, 0 if zero" />
				<line code="cmp @0.U8, dl" time="U*2" timev="U 2" comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="M,R,I" total="4" totalv="3"
				lostregs="al,dl" endpipe="U">
				<line code="mov al, @1.U8" time="U 1" timev=" V1" comment="Get the value to compare to" />
				<line code="xor dl, dl"    time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add al, -1"    time="U 1" timev=" V1" comment="Add -1. This sets carry if it was non-zero" />
				<line code="adc dl, dl"    time="U!1"             comment="1 if non-zero, 0 if zero" />
				<line code="cmp @0.U8, dl" time="U*1" timev="U 1" comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 16bit -->
		<codetypeset param0="Boolean" param1="U/S16">
			<!-- Switch to Boolean Version -->
			<codeset param0="M" param1="M,I" total="7" totalv="6"
				lostregs="ax,dl" endpipe="U">
				<line code="mov ax, @1.U16" time="U 1+1" timev=" V1+1" comment="Get the value to compare to" />
				<line code="xor dl, dl"     time=" V1"   timev="U 1"   comment="Clear to zero" />
				<line code="add ax, -1"     time="U 1+1" timev=" V1+1" comment="Add -1. This sets carry if it was non-zero" />
				<line code="adc dl, dl"     time="U!1"                 comment="1 if non-zero, 0 if zero" />
				<line code="cmp @0.U8, dl"  time="U*2"                 comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R" total="6" totalv="5"
				lostregs="eax,dl" endpipe="U">
				<line code="mov eax, @1.U32" time="U 1"   timev=" V1"   comment="Get the value to compare to" />
				<line code="xor dl, dl"      time=" V1"   timev="U 1"   comment="Clear to zero" />
				<line code="add ax, -1"      time="U 1+1" timev=" V1+1" comment="Add -1. This sets carry if it was non-zero" />
				<line code="adc dl, dl"      time="U!1"                 comment="1 if non-zero, 0 if zero" />
				<line code="cmp @0.U8, dl"   time="U*2"                 comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M,I" total="6" totalv="5"
				lostregs="ax,dl" endpipe="U">
				<line code="mov ax, @1.U16" time="U 1+1" timev=" V1+1" comment="Get the value to compare to" />
				<line code="xor dl, dl"     time=" V1"   timev="U 1"   comment="Clear to zero" />
				<line code="add ax, -1"     time="U 1+1" timev=" V1+1" comment="Add -1. This sets carry if it was non-zero" />
				<line code="adc dl, dl"     time="U!1"                 comment="1 if non-zero, 0 if zero" />
				<line code="cmp @0.U8, dl"  time="U*1"                 comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="R" total="5" totalv="4"
				lostregs="eax,dl" endpipe="U">
				<line code="mov eax, @1.U32" time="U 1"   timev=" V1"   comment="Get the value to compare to" />
				<line code="xor dl, dl"      time=" V1"   timev="U 1"   comment="Clear to zero" />
				<line code="add ax, -1"      time="U 1+1" timev=" V1+1" comment="Add -1. This sets carry if it was non-zero" />
				<line code="adc dl, dl"      time="U!1"                 comment="1 if non-zero, 0 if zero" />
				<line code="cmp @0.U8, dl"   time="U*1"                 comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 24bit -->
		<codetypeset param0="Boolean" param1="U/S24">
			<!-- Switch to Boolean Version -->
			<codeset param0="M" param1="M" total="3+?" totalv="3+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="lea edx, @1.U8"              time="U 1" timev=" V1" comment="Get the address of the 24bit value" />
				<line code="call TypeCast_US24ToBoolean" time="!V1+?"           comment="Convert it to boolean" />
				<line code="cmp @0.U8, al"               time="U 2"             comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="M" total="2+?" totalv="2+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="lea edx, @1.U8"              time="U 1" timev=" V1" comment="Get the address of the 24bit value" />
				<line code="call TypeCast_US24ToBoolean" time="!V1+?"           comment="Convert it to boolean" />
				<line code="cmp @0.U8, al"               time="U 1"             comment="Do the compare" />
			</codeset>

			<codeset param0="M" param1="R,I" total="5" totalv="4"
				lostregs="eax,dl" endpipe="U">
				<line code="mov eax, @1.U32" time="U 1" timev=" V1" comment="Get the full register value" />
				<line code="xor dl, dl"      time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add eax, -1"     time="U 1" timev=" V1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc dl, dl"      time="U!1"             comment="1 if carry, 0 if no carry" />
				<line code="cmp @0.U8, dl"   time="U*2"             comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="R,I" total="4" totalv="3"
				lostregs="eax,dl" endpipe="U">
				<line code="mov eax, @1.U32" time="U 1" timev=" V1" comment="Get the full register value" />
				<line code="xor dl, dl"      time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add eax, -1"     time="U 1" timev=" V1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc dl, dl"      time="U!1"             comment="1 if carry, 0 if no carry" />
				<line code="cmp @0.U8, dl"   time="U*1"             comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 32bit -->
		<codetypeset param0="Boolean" param1="U/S32">
			<codeset param0="M" param1="M,R,I" total="5" totalv="4"
				lostregs="eax,dl" endpipe="U">
				<line code="mov eax, @1.U32" time="U 1" timev=" V1" comment="Get the value" />
				<line code="xor dl, dl"      time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add eax, -1"     time="U 1" timev=" V1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc dl, dl"      time="U!1"             comment="1 if carry, 0 if no carry" />
				<line code="cmp @0.U8, dl"   time="U*2"             comment="Do the compare" />
			</codeset>

			<codeset param0="R" param1="M,R,I" total="4" totalv="3"
				lostregs="eax,dl" endpipe="U">
				<line code="mov eax, @1.U32" time="U 1" timev=" V1" comment="Get the value" />
				<line code="xor dl, dl"      time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add eax, -1"     time="U 1" timev=" V1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc dl, dl"      time="U!1"             comment="1 if carry, 0 if no carry" />
				<line code="cmp @0.U8, dl"   time="U*1"             comment="Do the compare" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="Boolean" param1="Boolean">
			<codeset param0="M" param1="M" total="3" totalv="2"
				lostregs="al" endregs="al=@1.U8" endpipe="U">
				<line code="mov al, @1.U8" time="U 1" timev=" V1" comment="Get the value to compare to" />
				<line code="cmp @0.U8, al" time="U*2" timev="U 2" comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="R" total="2" totalv="1" endpipe="S">
				<line code="cmp @0.U8, @1.U8" time="U 2" timev=" V2" comment="Do the compare" />
			</codeset>
			<codeset param0="M" param1="I" total="2" endpipe="V">
				<line code="cmp @0.U8, @1.U8" time="&#45;&#45;2" comment="Do the compare (Assume not pairable)" />
			</codeset>

			<codeset param0="R" param1="M" total="2" totalv="1" endpipe="S">
				<line code="cmp @0.U8, @1.U8" time="U 2" timev=" V2" comment="Do the compare" />
			</codeset>
			<codeset param0="R" param1="R,I" total="1" totalv="0" endpipe="S">
				<line code="cmp @0.U8, @1.U8" time="U 1" timev=" V1" comment="Do the compare" />
			</codeset>
		</codetypeset>
	</mnemonic>
</encoding>
