<!--
	Assembler Encoding for the And Mnemonic
	Version: 1.0.0
	Date Created:  2007-05-26
	Last Modified: 2007-05-26

	Designed for Pentium and higher x86 Processors in 32bit mode protected mode
	This DOES NOT set carry properly for future carry tests
	Optimized for Size

	Done list:
	o U/S8-256,Boolean Anded to U/S8-32,Boolean
	o Boolean Anded to Boolean

	To Do:
	o Everything Else
-->
<encoding procfamily="x86" bitdepth="32" proc="Pentium">
	<!-- ############################################################################################################ -->
	<!-- ############################################################################################################ -->
	<!-- ############################################################################################################ -->
	<!-- And Mnemonic -->
	<mnemonic name="And" type="Assign" option="Size">
		<!-- ********************************************************************************************************** -->
		<!-- ANDing TO 8bit values -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 8-256bit -->
		<codetypeset param0="U/S8" param1="U/S8-256">
			<codeset param0="M" param1="M" total="4" totalv="3"
				lostregs="al" endregs="al=@1.U8" endpipe="U">
				<line code="mov al, @1.U8" time="U 1" timev=" V1" comment="Get the value to AND" />
				<line code="and @0.U8, al" time="U*3" timev="U 3" comment="AND to the value" />
			</codeset>
			<codeset param0="M" param1="R" total="3" totalv="2" endpipe="S">
				<line code="and @0.U8, @1.U8" time="U 3" timev=" V3" comment="AND to the value" />
			</codeset>
			<codeset param0="M" param1="I" total="3" endpipe="V">
				<line code="and @0.U8, @1.U8" time="&#45;&#45;3" comment="AND to the value (Assume it's not pairable)" />
			</codeset>

			<codeset param0="R" param1="M" total="2" totalv="1" endpipe="S">
				<line code="and @0.U8, @1.U8" time="U 2" timev=" V2" comment="AND to the value" />
			</codeset>
			<codeset param0="R" param1="R,I" total="1" totalv="0" endpipe="S">
				<line code="and @0.U8, @1.U8" time="U 1" timev=" V1" comment="AND to the value" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S8" param1="Boolean">
			<codeset param0="M" param1="M" total="4" totalv="3"
				lostregs="al" endregs="al=@1.U8" endpipe="U">
				<line code="mov al, @1.U8" time="U 1" timev=" V1" comment="Get the value to AND" />
				<line code="and @0.U8, al" time="U*3" timev="U 3" comment="AND to the value" />
			</codeset>
			<codeset param0="M" param1="R" total="3" totalv="2" endpipe="S">
				<line code="and @0.U8, @1.U8" time="U 3" timev=" V3" comment="AND to the value" />
			</codeset>

			<codeset param0="R" param1="M" total="2" totalv="1" endpipe="S">
				<line code="and @0.U8, @1.U8" time="U 2" timev=" V2" comment="AND to the value" />
			</codeset>
			<codeset param0="R" param1="R" total="1" totalv="0" endpipe="S">
				<line code="and @0.U8, @1.U8" time="U 1" timev=" V1" comment="AND to the value" />
			</codeset>
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- ANDing TO 16bit values -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 8bit -->
		<codetypeset param0="U/S16" param1="U/S8">
			<codeset param0="M" param1="M,R" total="7"
				lostregs="eax" endregs="eax=@1.U8" endpipe="U">
				<line code="movzx eax, @1.U8" time="&#45;&#45;3" comment="Get the value to AND" />
				<line code="and @0.U16, ax"   time="U 3+1"       comment="AND to the value" />
			</codeset>

			<codeset param0="R" param1="M" total="3" totalv="2" endpipe="U">
				<line code="and @0.U8, @1.U8"       time="U 2" timev=" V2" comment="AND to the low byte of the value" />
				<line code="xor @0.U8[1], @0.U8[1]" time="U*1" timev="U 1" comment="Clear the high byte" />
			</codeset>
			<codeset param0="R" param1="R" total="2" totalv="1" endpipe="U">
				<line code="and @0.U8, @1.U8"       time="U 1" timev=" V1" comment="AND to the low byte of the value" />
				<line code="xor @0.U8[1], @0.U8[1]" time="U*1" timev="U 1" comment="Clear the high byte" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 16-24bit -->
		<codetypeset param0="U/S16" param1="U/S16-24">
			<codeset param0="M" param1="M" total="6" totalv="5"
				lostregs="ax" endregs="@1.U16" endpipe="U">
				<line code="mov ax, @1.U16" time="U 1+1" timev=" V1+1" comment="Get the value to AND" />
				<line code="and @0.U16, ax" time="U*3+1" timev="U 3+1" comment="AND to the value" />
			</codeset>
			<codeset param0="M" param1="R" total="4" totalv="3" endpipe="S">
				<line code="and @0.U16, @1.U16" time="U 3+1" timev=" V3+1" comment="AND to the value" />
			</codeset>
			<codeset param0="M" param1="I" total="4" endpipe="V">
				<line code="and @0.U16, @1.U16" time="&#45;&#45;3+1" comment="AND to the value (Assume it's not pairable)" />
			</codeset>

			<codeset param0="R" param1="M" total="3" totalv="2" endpipe="S">
				<line code="and @0.U16, @1.U16" time="U 2+1" timev=" V2+1" comment="AND to the value" />
			</codeset>
			<codeset param0="R" param1="R" total="1" totalv="0" endpipe="S">
				<line code="and @0.U32, @1.U32" time="U 1" timev=" V1" comment="AND to the full register value" />
			</codeset>
			<codeset param0="R" param1="I" total="2" totalv="1" endpipe="S">
				<line code="and @0.U16, @1.U16" time="U 1+1" timev=" V1+1" comment="AND to the register value" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 32-256bit -->
		<codetypeset param0="U/S16" param1="U/S32-256">
			<codeset param0="M" param1="M" total="5" totalv="4"
				lostregs="eax" endregs="eax=@1.U32" endpipe="U">
				<line code="mov eax, @1.U32" time="U 1"   timev=" V1"   comment="Get the value to AND" />
				<line code="and @0.U16, ax"  time="U*3+1" timev="U 3+1" comment="AND to the value" />
			</codeset>
			<codeset param0="M" param1="R" total="4" totalv="3" endpipe="S">
				<line code="and @0.U16, @1.U16" time="U 3+1" timev=" V3+1" comment="AND to the value" />
			</codeset>

			<codeset param0="R" param1="M" total="2" totalv="1" endpipe="S">
				<line code="and @0.U32, @1.U32" time="U 2" timev=" V2" comment="AND to the full register value" />
			</codeset>
			<codeset param0="R" param1="R" total="1" totalv="0" endpipe="S">
				<line code="and @0.U32, @1.U32" time="U 1" timev=" V1" comment="AND to the full register value" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S16" param1="Boolean">
			<codeset param0="M" param1="M,R" total="7"
				lostregs="eax" endregs="eax=@1.U8" endpipe="U">
				<line code="movzx eax, @1.U8" time="&#45;&#45;3" comment="Get the value to AND" />
				<line code="and @0.U16, ax"   time="U 3+1"       comment="AND to the value" />
			</codeset>

			<codeset param0="R" param1="M" total="3" totalv="2" endpipe="U">
				<line code="and @0.U8, @1.U8"       time="U 2" timev=" V2" comment="AND to the low byte of the value" />
				<line code="xor @0.U8[1], @0.U8[1]" time="U*1" timev="U 1" comment="Clear the high byte" />
			</codeset>
			<codeset param0="R" param1="R" total="2" totalv="1" endpipe="U">
				<line code="and @0.U8, @1.U8"       time="U 1" timev=" V1" comment="AND to the low byte of the value" />
				<line code="xor @0.U8[1], @0.U8[1]" time="U*1" timev="U 1" comment="Clear the high byte" />
			</codeset>
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- ANDing TO 24bit values -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 8bit -->
		<codetypeset param0="U/S24" param1="U/S8">
			<codeset param0="M" param1="M" total="10"
				lostregs="eax" endregs="eax=@1.U8" endpipe="U">
				<line code="movzx eax, @1.U8" time="&#45;&#45;3" comment="Get the value to AND" />
				<line code="and @0.U16, ax"   time="U 3+1"       comment="AND to the low 16 bits of the value" />
				<line code="mov @0.U8[2], 0"  time="U*3"         comment="Clear the high byte" />
			</codeset>
			<codeset param0="M" param1="R" total="9" totalv="8" endpipe="U">
				<line code="and @0.U8, @1.U8" time="U 3" timev=" V3" comment="AND to the low byte of the value" />
				<line code="mov @0.U8[1], 0"  time="U!3"             comment="Clear the middle byte" />
				<line code="mov @0.U8[2], 0"  time="U!3"             comment="Clear the high byte" />
			</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="Get the value to AND" />
				<line code="and @0.U32, eax"  time="U 1"         comment="AND to the value" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 16bit -->
		<codetypeset param0="U/S24" param1="U/S16">
			<codeset param0="M" param1="M" total="9" totalv="8"
				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 AND" />
				<line code="and @0.U16, ax"  time="U*3+1" timev="U 3+1" comment="AND to the low 16 bits" />
				<line code="mov @0.U8[2], 0" time="U!3"                 comment="Clear the high byte" />
			</codeset>
			<codeset param0="M" param1="R" total="7" totalv="6" endpipe="U">
				<line code="and @0.U16, @1.U16" time="U 3+1" timev=" V3+1" comment="AND to the low 16 bits" />
				<line code="mov @0.U8[2], 0"    time="U!3"                 comment="Clear the high byte" />
			</codeset>

			<codeset param0="R" param1="M" total="4"
				lostregs="eax" endregs="eax=@1.U16" endpipe="U">
				<line code="movzx eax, @1.U16"    time="&#45;&#45;3" comment="Get the value to AND" />
				<line code="and @0.U32, eax"      time="U 1"         comment="AND to the full register value" />
			</codeset>
			<codeset param0="R" param1="R" total="2" totalv="1" endpipe="U">
				<line code="and @1.U32, 0FFFFh"   time="U 1" timev=" V1" comment="Clear the high word on the value to AND" />
				<line code="and @0.U32, @1.U32"   time="U*1" timev="U 1" comment="AND to the full register value" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 24bit -->
		<codetypeset param0="U/S24" param1="U/S24">
			<codeset param0="M" param1="M" total="9" totalv="8"
				lostregs="ax" endregs="ah=@1.U8[2],al=@1.U8" endpipe="U">
				<line code="mov ax, @1.U16"   time="U 1+1" timev=" V1+1" comment="Get the low 16 bits to AND" />
				<line code="and @0.U16, ax"   time="U*3+1" timev="U 3+1" comment="AND them together" />
				<line code="mov ah, @1.U8[2]" time=" V1"                 comment="Get the high byte to AND" />
				<line code="and @0.U8[2], ah" time="U 3"                 comment="AND them together" />
			</codeset>
			<codeset param0="M" param1="R" total="2+?" totalv="2+?"
				lostregs="eax,edx" endregs="edx->@0.U8" endpipe="V">
				<line code="mov eax, @1.U32"                   time="U 1"   timev=" V1" comment="Get the full register value" />
				<line code="lea edx, @0.U8"                    time=" V1"   timev="U 1" comment="Point to our value" />
				<line code="call Mnemonic_And_US24AndUS24Plus" time="!V1+?"             comment="AND them together" />
			</codeset>
			<codeset param0="M" param1="I" total="7" totalv="6" endpipe="U">
				<line code="and @0.U16, @1.U16"  time="U 3+1" timev=" V3+1" comment="AND the low 16 bits" />
				<line code="and @0.U8[2], @1.U8" time="U*3"   timev="U 3"   comment="AND the high 8 bits" />
			</codeset>

			<codeset param0="R" param1="M" param0type="U24" total="6" totalv="5"
				lostregs="eax" endregs="eax=@1.U24" endpipe="U">
				<line codr="xor eax, eax"     time="U 1" timev=" V1" comment="Clear to zero" />
				<line code="mov ah, @1.U8[2]" time="U*1" timev="U 1" comment="Get the high byte" />
				<line code="shl eax, 8"       time="U!1"             comment="Shift it into position" />
				<line code="mov ax, @1.U16"   time="U*1+1"           comment="Get the low 16 bits" />
				<line code="and @0.U32, eax"  time="U*1"             comment="AND to the full register value" />
			</codeset>
			<codeset param0="R" param1="M" param0type="S24" total="3+?" totalv="2+?"
				lostregs="eax,edx" endregs="eax=@0.U32,edx->@1.U8" endpipe="U">
				<line code="mov eax, @0.U32"                time="U 1"   timev=" V1" comment="Get the full register value" />
				<line code="lea edx, @1.U8"                 time=" V1"   timev="U 1" comment="Point to our value" />
				<line code="call Mnemonic_And_S24AndUS24_R" time="!V1+?"             comment="AND them together" />
				<line code="mov @0.U32, eax"                time="U 1"               comment="Store the result" />
			</codeset>
			<codeset param0="R" param1="R,I" param0type="U24" total="1" totalv="0" endpipe="S">
				<line code="and @0.U32, @1.U32"   time="U 1" timev=" V1" comment="AND to the full register value" />
			</codeset>
			<codeset param0="R" param1="R,I" param0type="S24" total="3" totalv="2" endpipe="U">
				<line code="and @0.U32, @1.U32" time="U 1" timev=" V1" comment="AND to the full register value" />
				<line code="shl @0.U32, 8"      time="U!1"             comment="Shift to the high byte" />
				<line code="sar @0.U32, 8"      time="U!1"             comment="SAR to sign extend" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 32-256bit -->
		<codetypeset param0="U/S24" param1="U/S32-256">
			<codeset param0="M" param1="M,R" 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 full register value" />
				<line code="lea edx, @0.U8"                    time=" V1"   timev="U 1" comment="Point to our value" />
				<line code="call Mnemonic_And_US24AndUS24Plus" time="!V1+?"             comment="AND them together" />
			</codeset>

			<codeset param0="R" param1="M" param0type="U24" total="3" totalv="2" endpipe="U">
				<line code="and @0.U32, @1.U32"   time="U 2" timev=" V2" comment="AND to the full register value" />
				<line code="and @0.U32, 0FFFFFFh" time="U*1" timev="U 1" comment="Clear the high byte" />
			</codeset>
			<codeset param0="R" param1="M" param0type="S24" total="4" totalv="3" endpipe="U">
				<line code="and @0.U32, @1.U32" time="U 2" timev=" V2" comment="AND to the full register value" />
				<line code="shl @0.U32, 8"      time="U!1"             comment="Shift to the high byte" />
				<line code="sar @0.U32, 8"      time="U!1"             comment="SAR to sign extend" />
			</codeset>
			<codeset param0="R" param1="R" param0type="U24" total="2" totalv="1" endpipe="U">
				<line code="and @0.U32, @1.U32"   time="U 1" timev=" V1" comment="AND to the full register value" />
				<line code="and @0.U32, 0FFFFFFh" time="U*1" timev="U 1" comment="Clear the high byte" />
			</codeset>
			<codeset param0="R" param1="R" param0type="S24" total="3" totalv="2" endpipe="U">
				<line code="and @0.U32, @1.U32" time="U 1" timev=" V1" comment="AND to the full register value" />
				<line code="shl @0.U32, 8"      time="U!1"             comment="Shift to the high byte" />
				<line code="sar @0.U32, 8"      time="U!1"             comment="SAR to sign extend" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S24" param1="Boolean">
			<codeset param0="M" param1="M" total="10"
				lostregs="eax" endregs="eax=@1.U8" endpipe="U">
				<line code="movzx eax, @1.U8" time="&#45;&#45;3" comment="Get the value to AND" />
				<line code="and @0.U16, ax"   time="U 3+1"       comment="AND to the low 16 bits of the value" />
				<line code="mov @0.U8[2], 0"  time="U*3"         comment="Clear the high byte" />
			</codeset>
			<codeset param0="M" param1="R" total="9" totalv="8" endpipe="U">
				<line code="and @0.U8, @1.U8" time="U 3" timev=" V3" comment="AND to the low byte of the value" />
				<line code="mov @0.U8[1], 0"  time="U!3"             comment="Clear the middle byte" />
				<line code="mov @0.U8[2], 0"  time="U!3"             comment="Clear the high byte" />
			</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="Get the value to AND" />
				<line code="and @0.U32, eax"  time="U 1"         comment="AND to the value" />
			</codeset>
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- ANDing TO 32bit values -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 8bit -->
		<codetypeset param0="U/S32" param1="U/S8">
			<codeset param0="M" param1="M,R" total="6"
				lostregs="eax" endregs="eax=@1.U8" endpipe="U">
				<line code="movzx eax, @1.U8" time="&#45;&#45;3" comment="Get the value to AND" />
				<line code="and @0.U32, eax"  time="U 3"         comment="AND to the value" />
			</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="Get the value to AND" />
				<line code="and @0.U32, eax"  time="U 1"         comment="AND to the value" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 16bit -->
		<codetypeset param0="U/S32" param1="U/S16">
			<codeset param0="M" param1="M" total="6"
				lostregs="eax" endregs="eax=@1.U16" endpipe="U">
				<line code="movzx eax, @1.U16" time="&#45;&#45;3" comment="Get the value to AND" />
				<line code="and @0.U32, eax"   time="U 3"         comment="AND to the value" />
			</codeset>
			<codeset param0="M" param1="R" total="4" totalv="3" endpipe="U">
				<line code="and @1.U32, 0FFFFh" time="U 1" timev=" V1" comment="Clear the high 16 bits" />
				<line code="and @0.U32, @1.U32" time="U*3" timev="U 3" comment="AND to the value" />
			</codeset>

			<codeset param0="R" param1="M" total="4"
				lostregs="eax" endregs="eax=@1.U16" endpipe="U">
				<line code="movzx eax, @1.U16" time="&#45;&#45;3" comment="Get the value to AND" />
				<line code="and @0.U32, eax"   time="U 1"         comment="AND to the value" />
			</codeset>
			<codeset param0="R" param1="R" total="2" totalv="1" endpipe="U">
				<line code="and @1.U32, 0FFFFh" time="U 1" timev=" V1" comment="Clear the high 16 bits" />
				<line code="and @0.U32, @1.U32" time="U*1" timev="U 1" comment="AND to the value" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 24bit -->
		<codetypeset param0="U/S32" param1="U/S24">
			<codeset param0="M" param1="M" total="4+?" totalv="4+?"
				lostregs="eax,edx" endregs="eax=@1.U24,edx->@0.U8" endpipe="U">
				<line code="lea edx, @1.U8"       time="U 1"   timev=" V1" comment="Get a pointer to the value to AND" />
				<line code="call General_ReadU24" time="!V1+?"             comment="Get the 24 bit value" />
				<line code="and @0.U32, eax"      time="U 3"               comment="AND to the value" />
			</codeset>
			<codeset param0="M" param1="R" param1type="U24" total="3" totalv="2" endpipe="S">
				<line code="and @0.U32, @1.U32" time="U 3" timev=" V3" comment="AND the full register directly to the value" />
			</codeset>
			<codeset param0="M" param1="R" param1type="S24" total="5" totalv="4"
				lostregs="eax" endregs="eax=@1.U24" endpipe="U">
				<line code="mov eax, @1.U32"   time="U 1" timev=" V1" comment="Get the value to AND" />
				<line code="and eax, 0FFFFFFh" time="U*1" timev="U 1" comment="Clear the high byte" />
				<line code="and @0.U32, eax"   time="U*3"             comment="AND the full register directly to the value" />
			</codeset>

			<codeset param0="R" param1="M" total="2+?" totalv="2+?"
				lostregs="eax,edx" endregs="eax=@1.U24,edx->@0.U8" endpipe="U">
				<line code="lea edx, @1.U8"       time="U 1"   timev=" V1" comment="Get a pointer to the value to AND" />
				<line code="call General_ReadU24" time="!V1+?"             comment="Get the 24 bit value" />
				<line code="and @0.U32, eax"      time="U 1"               comment="AND to the value" />
			</codeset>
			<codeset param0="R" param1="R" param1type="U24" total="1" totalv="0" endpipe="S">
				<line code="and @0.U32, @1.U32"   time="U 1" timev=" V1" comment="AND the full register directly to the value" />
			</codeset>
			<codeset param0="R" param1="R" param1type="S24" total="3" totalv="2"
				lostregs="eax" endregs="eax=@1.U24" endpipe="U">
				<line code="mov eax, @1.U32"   time="U 1" timev=" V1" comment="Get the value to AND" />
				<line code="and eax, 0FFFFFFh" time="U*1" timev="U 1" comment="Clear the high byte" />
				<line code="and @0.U32, eax"   time="U*1"             comment="AND the full register directly to the value" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 32-256bit -->
		<codetypeset param0="U/S32" param1="U/S32-256">
			<codeset param0="M" param1="M" total="4" totalv="3"
				lostregs="eax" endregs="eax=@1.U32" endpipe="U">
				<line code="mov eax, @1.U32" time="U 1" timev=" V1" comment="Get the value to AND" />
				<line code="and @0.U32, eax" time="U*3" timev="U 3" comment="AND to the value" />
			</codeset>
			<codeset param0="M" param1="R,I" total="3" totalv="2" endpipe="S">
				<line code="and @0.U32, @1.U32" time="U 3" timev=" V3" comment="AND to the value" />
			</codeset>

			<codeset param0="R" param1="M" total="2" totalv="1" endpipe="S">
				<line code="and @0.U32, @1.U32" time="U 2" timev=" V2" comment="AND to the value" />
			</codeset>
			<codeset param0="R" param1="R,I" total="1" totalv="0" endpipe="S">
				<line code="and @0.U32, @1.U32" time="U 1" timev=" V1" comment="AND to the value" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S32" param1="Boolean">
			<codeset param0="M" param1="M,R" total="6"
				lostregs="eax" endregs="eax=@1.U8" endpipe="U">
				<line code="movzx eax, @1.U8" time="&#45;&#45;3" comment="Get the value" />
				<line code="and @0.U32, eax"  time="U 3"         comment="AND to the value" />
			</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="Get the value" />
				<line code="and @0.U32, eax"  time="U 1"         comment="AND to the value" />
			</codeset>
		</codetypeset>



		<!-- ********************************************************************************************************** -->
		<!-- ANDing TO Boolean -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 8bit -->
		<codetypeset param0="Boolean" param1="U/S8">
			<codeset param0="M" param1="M,R" total="6" totalv="5"
				lostregs="al,dl" endpipe="U">
				<line code="mov al, @1.U8" time="U 1" timev=" V1" comment="Get the value to AND" />
				<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 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="and @0.U8, dl" time="U*3"             comment="AND them together" />
			</codeset>

			<codeset param0="R" param1="M,R" 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 AND" />
				<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 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="and @0.U8, dl" time="U*1"             comment="AND them together" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 16bit -->
		<codetypeset param0="Boolean" param1="U/S16">
			<codeset param0="M" param1="M" total="8" totalv="7"
				lostregs="ax,dl" endpipe="U">
				<line code="mov ax, @1.U16" time="U 1+1" timev=" V1+1" comment="Get the value to AND" />
				<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 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="and @0.U8, dl"  time="U*3"                 comment="AND them together" />
			</codeset>
			<codeset param0="M" param1="R" total="7" totalv="6"
				lostregs="eax,dl" endpipe="U">
				<line code="mov eax, @1.U32" time="U 1"   timev=" V1"   comment="Get the value to AND" />
				<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 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="and @0.U8, dl"   time="U*3"                 comment="AND them together" />
			</codeset>

			<codeset param0="R" param1="M" 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 AND" />
				<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 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="and @0.U8, dl"  time="U*1"                 comment="AND them together" />
			</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 AND" />
				<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 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="and @0.U8, dl"   time="U*1"                 comment="AND them together" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 24bit -->
		<codetypeset param0="Boolean" param1="U/S24">
			<codeset param0="M" param1="M" total="4+?" totalv="4+?"
				lostregs="eax,edx" endregs="edx->@1.U8" endpipe="U">
				<line code="lea edx, @1.U8"              time="U 1" timev=" V1" comment="Load the address of the value" />
				<line code="call TypeCast_US24ToBoolean" time="!V1+?"           comment="Convert it to boolean" />
				<line code="and @0.U8, al"               time="U 3"             comment="AND them together" />
			</codeset>
			<codeset param0="M" param1="R" total="4+?" totalv="4+?"
				lostregs="eax" endpipe="U">
				<line code="mov eax, @1.U32"               time="U 1" timev=" V1" comment="Get the value to AND" />
				<line code="call TypeCast_US24ToBoolean_R" time="!V1+?"           comment="Convert it to boolean" />
				<line code="and @0.U8, al"                 time="U 3"             comment="AND them together" />
			</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="Load the address of the value" />
				<line code="call TypeCast_US24ToBoolean" time="!V1+?"           comment="Convert it to boolean" />
				<line code="and @0.U8, al"               time="U 1"             comment="AND them together" />
			</codeset>
			<codeset param0="R" param1="R" total="2+?" totalv="2+?"
				lostregs="eax" endpipe="U">
				<line code="mov eax, @1.U32"               time="U 1" timev=" V1" comment="Get the value to AND" />
				<line code="call TypeCast_US24ToBoolean_R" time="!V1+?"           comment="Convert it to boolean" />
				<line code="and @0.U8, al"                 time="U 1"             comment="AND them together" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From 32bit -->
		<codetypeset param0="Boolean" param1="U/S32">
			<codeset param0="M" param1="M,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 AND" />
				<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="and @0.U8, dl"   time="U*3"             comment="AND them together" />
			</codeset>

			<codeset param0="R" param1="M,R" total="4" totalv="3"
				lostregs="eax,dl" endpipe="U">
				<line code="mov eax, @1.U8" time="U 1" timev=" V1" comment="Get the value to AND" />
				<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="and @0.U8, dl"  time="U*1"             comment="AND them together" />
			</codeset>
		</codetypeset>


		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="Boolean" param1="Boolean">
			<codeset param0="M" param1="M" total="4" totalv="3"
				lostregs="al" endregs="al=@1.U8" endpipe="U">
				<line code="mov al, @1.U8" time="U 1" timev=" V1" comment="Get the value to AND" />
				<line code="and @0.U8, al" time="U*3" timev="U 3" comment="AND with the value" />
			</codeset>
			<codeset param0="M" param1="R,I" total="3" totalv="2" endpipe="S">
				<line code="and @0.U8, @1.U8" time="U 3" timev=" V3" comment="AND with the value" />
			</codeset>

			<codeset param0="R" param1="M" total="2" totalv="1" endpipe="U">
				<line code="and @0.U8, @1.U8" time="U 2" timev=" V2" comment="AND with the value" />
			</codeset>
			<codeset param0="R" param1="R,I" total="1" totalv="0" endpipe="S">
				<line code="and @0.U8, @1.U8" time="U 1" timev=" V1" comment="AND with the value" />
			</codeset>
		</codetypeset>
	</mnemonic>
</encoding>
