<!--
	Assembler Encoding for the Return instruction
	Version: 1.0.0
	Date Created:  2007-05-05
	Last Modified: 2007-05-19

	Designed for Pentium and higher x86 Processors in 32bit mode protected mode

	This only controls what happens to the return value.
	The assembler then manually either jumps to the end of the function which ends the operation OR, if the Return is
	used as the last instruction of the function, it doesn't jump anywhere and just proceeds into the end of the function.
	Though Return actually only has one parameter, the opcode is using two. The first is the expected return data type and
	is not an actual value. The second parameter is the data type given to the Return.
	param0 is always Volatile and does not need to be declared

	Done list:
	o Returning U/S8-64,Boolean from U/S8-64,Boolean

	To Do list:
	o U/S128-256
	o Add Volatile Support ???
-->
<encoding procfamily="x86" bitdepth="32" proc="P1">
	<!-- ############################################################################################################ -->
	<!-- ############################################################################################################ -->
	<!-- ############################################################################################################ -->
	<!-- ReturnSubroutine Mnemonic -->
	<mnemonic name="Return" type="Return" option="Size">
		<!-- ********************************************************************************************************** -->
		<!-- Returning Nothing -->
		<codetypeset param0="Nothing" param1="Any">
			<codeset total="0" endpipe="-">
				<!-- Do nothing -->
			</codeset>
		</codetypeset>


		<!-- ********************************************************************************************************** -->
		<!-- Returning U/S8 -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S8-256 -->
		<codetypeset param0="U/S8" param1="U/S8-256">
			<codeset param1="M,R,I" total="1" totalv="0"
				lostregs="al" endregs="al=@0.U8" endpipe="S">
				<line code="mov al, @0.U8" time="U 1" timev=" V1" comment="Store the value in AL" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S8" param1="Boolean">
			<codeset param1="M,R" total="1" totalv="0"
				lostregs="al" endregs="al=@0.U8" endpipe="S">
				<line code="mov al, @0.U8" time="U 1" timev=" V1" comment="Store the value in AL" />
			</codeset>
		</codetypeset>


		<!-- ********************************************************************************************************** -->
		<!-- Returning U/S16 -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S8 -->
		<codetypeset param0="U/S16" param1="U8">
			<codeset param1="M,R" total="3"
				lostregs="eax" endregs="eax=@0.U8" endpipe="V">
				<line code="movzx eax, @0.U8" time="&#45;&#45;3" comment="Zero extend the value to EAX" />
			</codeset>
		</codetypeset>

		<codetypeset param0="U/S16" param1="S8">
			<codeset param1="M,R" total="3"
				lostregs="eax" endregs="eax=@0.S8" endpipe="V">
				<line code="movsx eax, @0.U8" time="&#45;&#45;3" comment="Sign extend the value to EAX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S16 -->
		<codetypeset param0="U/S16" param1="U/S16">
			<codeset param1="M" total="2" totalv="1"
				lostregs="ax" endregs="ax=@0.U16" endpipe="S">
				<line code="mov ax, @0.U16" time="U 1+1" timev=" V1+1" comment="Store the value in AX" />
			</codeset>

			<codeset param1="R" total="1" totalv="0"
				lostregs="eax" endregs="eax=@0.U32" endpipe="S">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Store the full register value in EAX" />
			</codeset>

			<codeset param1="I" total="2" totalv="1"
				lostregs="ax" endregs="ax=@0.U16" endpipe="S">
				<line code="mov ax, @0.U16" time="U 1+1" timev=" V1+1" comment="Store the value in AX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S24 -->
		<codetypeset param0="U/S16" param1="U/S24">
			<codeset param1="M" total="2" totalv="1"
				lostregs="ax" endregs="ax=@0.U16" endpipe="S">
				<line code="mov ax, @0.U16" time="U 1+1" timev=" V1+1" comment="Store the low 16 bits value in AX" />
			</codeset>

			<codeset param1="R" total="1" totalv="0"
				lostregs="eax" endregs="eax=@0.U32" endpipe="S">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Store the full register value in EAX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S32-256 -->
		<codetypeset param0="U/S16" param1="U/S32-256">
			<codeset param1="M,R" total="1" totalv="0"
				lostregs="eax" endregs="eax=@0.U32" endpipe="S">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Store the value in EAX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S16" param1="Boolean">
			<codeset param1="M,R" total="3"
				lostregs="eax" endregs="eax=@0.U8" endpipe="V">
				<line code="movzx eax, @0.U8" time="&#45;&#45;3" comment="Zero extend the value to EAX" />
			</codeset>
		</codetypeset>


		<!-- ********************************************************************************************************** -->
		<!-- Returning U/S24 -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S8 -->
		<codetypeset param0="U/S24" param1="U8">
			<codeset param1="M,R" total="3"
				lostregs="eax" endregs="eax=@0.U8" endpipe="V">
				<line code="movzx eax, @0.U8" time="&#45;&#45;3" comment="Zero extend the value to EAX" />
			</codeset>
		</codetypeset>

		<codetypeset param0="U24" param1="S8">
			<codeset param1="M,R" total="4"
				lostregs="eax" endpipe="U">
				<line code="movsx eax, @0.U8"  time="&#45;&#45;3" comment="Sign extend the value to EAX" />
				<line code="and eax, 0FFFFFFh" time="U 1"         comment="Clear the high byte" />
			</codeset>
		</codetypeset>

		<codetypeset param0="S24" param1="S8">
			<codeset param1="M,R" total="3"
				lostregs="eax" endregs="eax=@0.S8" endpipe="V">
				<line code="movsx eax, @0.U8" time="&#45;&#45;3" comment="Sign extend the value to EAX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S16 -->
		<codetypeset param0="U/S24" param1="U16">
			<codeset param1="M,R" total="3"
				lostregs="eax" endregs="eax=@0.U16" endpipe="V">
				<line code="movzx eax, @0.U16" time="&#45;&#45;3" comment="Zero extend the value to EAX" />
			</codeset>
		</codetypeset>

		<codetypeset param0="U24" param1="S16">
			<codeset param1="M,R" total="4"
				lostregs="eax" endpipe="U">
				<line code="movsx eax, @0.U16" time="&#45;&#45;3" comment="Sign extend the value to EAX" />
				<line code="and eax, 0FFFFFFh" time="U 1"         comment="Clear the high byte" />
			</codeset>
		</codetypeset>

		<codetypeset param0="S24" param1="S16">
			<codeset param1="M,R" total="3"
				lostregs="eax" endregs="eax=@0.S16" endpipe="V">
				<line code="movsx eax, @0.U16" time="&#45;&#45;3" comment="Sign extend the value to EAX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S24 -->
		<codetypeset param0="U24" param1="U/S24">
			<codeset param1="M" total="1+?" totalv="1+?"
				lostregs="eax,edx" endregs="eax=@0.U24,edx->@0.U8" endpipe="V">
				<line code="lea edx, @0.U8"       time="U 1"   timev=" V1" comment="Point to our value" />
				<line code="call General_ReadU24" time="!V1+?"             comment="Get the value in EAX" />
			</codeset>

			<codeset param1="R,I" param1type="U24" total="1" totalv="0"
				lostregs="eax" endregs="eax=@0.U24" endpipe="S">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Store the value in EAX" />
			</codeset>
			<codeset param1="R" param1type="S24" total="2" totalv="1"
				lostregs="eax" endregs="eax=@0.U24" endpipe="U">
				<line code="mov eax, @0.S32"   time="U 1" timev=" V1" comment="Store the value in EAX" />
				<line code="and eax, 0FFFFFFh" time="U*1" timev="U 1" comment="Clear the high byte" />
			</codeset>
		</codetypeset>

		<codetypeset param0="S24" param1="U/S24">
			<codeset param1="M" total="1+?" totalv="1+?"
				lostregs="eax,edx" endregs="eax=@0.S24,edx->@0.U8" endpipe="V">
				<line code="lea edx, @0.U8"       time="U 1"   timev=" V1" comment="Point to our value" />
				<line code="call General_ReadS24" time="!V1+?"             comment="Get the value in EAX" />
			</codeset>

			<codeset param1="R" param1type="U24" total="3" totalv="2"
				lostregs="eax" endregs="eax=@0.S24" endpipe="U">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Store the value in EAX" />
				<line code="shl eax, 8"      time="U!1"             comment="Shift to the high byte" />
				<line code="sar eax, 8"      time="U!1"             comment="SAR to sign extend" />
			</codeset>
			<codeset param1="R,I" param1type="S24" total="1" totalv="0"
				lostregs="eax" endregs="eax=@0.S24" endpipe="S">
				<line code="mov eax, @0.S32" time="U 1" timev=" V1" comment="Store the value in EAX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S32-256 -->
		<codetypeset param0="U24" param1="U/S32-256">
			<codeset param1="M,R" total="2" totalv="1"
				lostregs="eax" endregs="eax=@0.U24" endpipe="U">
				<line code="mov eax, @0.U32"   time="U 1" timev=" V1" comment="Store the value in EAX" />
				<line code="and eax, 0FFFFFFh" time="U*1" timev="U 1" comment="Clear the high byte" />
			</codeset>
		</codetypeset>

		<codetypeset param0="S24" param1="U/S32-256">
			<codeset param1="M,R" total="3" totalv="2"
				lostregs="eax" endregs="eax=@0.S24" endpipe="U">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Store the value in EAX" />
				<line code="shl eax, 8"      time="U!1"             comment="Shift to the high byte" />
				<line code="sar eax, 8"      time="U!1"             comment="SAR to sign extend" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S24" param1="Boolean">
			<codeset param1="M,R" total="3"
				lostregs="eax" endregs="eax=@0.U8" endpipe="V">
				<line code="movzx eax, @0.U8" time="&#45;&#45;3" comment="Zero extend the value to EAX" />
			</codeset>
		</codetypeset>


		<!-- ********************************************************************************************************** -->
		<!-- Returning U/S32 (also pointers) -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S8 -->
		<codetypeset param0="U/S32" param1="U8">
			<codeset param1="M,R" total="3"
				lostregs="eax" endregs="eax=@0.U8" endpipe="V">
				<line code="movzx eax, @0.U8" time="&#45;&#45;3" comment="Zero extend the value to EAX" />
			</codeset>
		</codetypeset>

		<codetypeset param0="U/S32" param1="S8">
			<codeset param1="M,R" total="3"
				lostregs="eax" endregs="eax=@0.S8" endpipe="V">
				<line code="movsx eax, @0.U8" time="&#45;&#45;3" comment="Sign extend the value to EAX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S16 -->
		<codetypeset param0="U/S32" param1="U16">
			<codeset param1="M,R" total="3"
				lostregs="eax" endregs="eax=@0.U16" endpipe="V">
				<line code="movzx eax, @0.U16" time="&#45;&#45;3" comment="Zero extend the value to EAX" />
			</codeset>
		</codetypeset>

		<codetypeset param0="U/S32" param1="S16">
			<codeset param1="M,R" total="3"
				lostregs="eax" endregs="eax=@0.S16" endpipe="V">
				<line code="movsx eax, @0.U16" time="&#45;&#45;3" comment="Sign extend the value to EAX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S24 -->
		<codetypeset param0="U/S32" param1="U24">
			<codeset param1="M" total="1+?" totalv="1+?"
				lostregs="eax,edx" endregs="eax=@0.U24,edx->@0.U8" endpipe="V">
				<line code="lea edx, @0.U8"       time="U 1"   timev=" V1" comment="Point to our value" />
				<line code="call General_ReadU24" time="!V1+?"             comment="Get the value in EAX" />
			</codeset>

			<codeset param1="R" total="1" totalv="0"
				lostregs="eax" endregs="eax=@0.U24" endpipe="S">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Store the value in EAX" />
			</codeset>
		</codetypeset>

		<codetypeset param0="U/S32" param1="S24">
			<codeset param1="M" total="1+?" totalv="1+?"
				lostregs="eax,edx" endregs="eax=@0.S24,edx->@0.U8" endpipe="V">
				<line code="lea edx, @0.U8"       time="U 1"   timev=" V1" comment="Point to our value" />
				<line code="call General_ReadS24" time="!V1+?"             comment="Get the value in EAX" />
			</codeset>

			<codeset param1="R" total="1" totalv="0"
				lostregs="eax" endregs="eax=@0.S24" endpipe="S">
				<line code="mov eax, @0.S32" time="U 1" timev=" V1" comment="Store the value in EAX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S32-256 -->
		<codetypeset param0="U/S32" param1="U/S32-256">
			<codeset param1="M,R,I" total="1" totalv="0"
				lostregs="eax" endregs="eax=@0.U32" endpipe="S">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Store the value in EAX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S32" param1="Boolean">
			<codeset param1="M,R" total="3"
				lostregs="eax" endregs="eax=@0.U8" endpipe="V">
				<line code="movzx eax, @0.U8" time="&#45;&#45;3" comment="Zero extend the value to EAX" />
			</codeset>
		</codetypeset>


		<!-- ********************************************************************************************************** -->
		<!-- Returning U/S48 -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S8 -->
		<codetypeset param0="U/S48" param1="U8">
			<codeset param1="M,R" total="4"
				lostregs="eax,edx" endregs="eax=@0.U8,edx=0" endpipe="U">
				<line code="movzx eax, @0.U8" time="&#45;&#45;3" comment="Zero extend the value to EAX" />
				<line code="xor edx, edx"     time="U 1"         comment="Clear EDX" />
			</codeset>
		</codetypeset>

		<codetypeset param0="U/S48" param1="S8">
			<codeset param1="M,R" total="5"
				lostregs="eax,edx" endregs="eax=@0.S8" endpipe="U">
				<line code="movsx eax, @0.U8" time="&#45;&#45;3" comment="Sign extend the value to EAX" />
				<line code="mov edx, eax"     time="U 1"         comment="Copy EAX to EDX" />
				<line code="shr edx, 31"      time="U!1"         comment="Sign extend" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S16 -->
		<codetypeset param0="U/S48" param1="U16">
			<codeset param1="M,R" total="4"
				lostregs="eax,edx" endregs="eax=@0.U16,edx=0" endpipe="U">
				<line code="movzx eax, @0.U16" time="&#45;&#45;3" comment="Zero extend the value to EAX" />
				<line code="xor edx, edx"      time="U 1"         comment="Clear EDX" />
			</codeset>
		</codetypeset>

		<codetypeset param0="U/S48" param1="S16">
			<codeset param1="M,R" total="5"
				lostregs="eax,edx" endregs="eax=@0.S16" endpipe="U">
				<line code="movsx eax, @0.U16" time="&#45;&#45;3" comment="Sign extend the value to EAX" />
				<line code="mov edx, eax"      time="U 1"         comment="Copy EAX to EDX" />
				<line code="shr edx, 31"       time="U!1"         comment="Sign extend" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S24 -->
		<codetypeset param0="U/S48" param1="U24">
			<codeset param1="M" total="2+?" totalv="2+?"
				lostregs="eax,edx" endregs="eax=@0.U24,edx=0" endpipe="U">
				<line code="lea edx, @0.U8"       time="U 1"   timev=" V1" comment="Point to our value" />
				<line code="call General_ReadU24" time="!V1+?"             comment="Get the value in EAX" />
				<line code="xor edx, edx"         time="U 1"               comment="Clear to zero" />
			</codeset>

			<codeset param1="R" total="1" totalv="1"
				lostregs="eax,edx" endregs="eax=@0.U24,edx=0" endpipe="-">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Store the value in EAX" />
				<line code="xor edx, edx"    time=" V1" timev="U 1" comment="Clear to zero" />
			</codeset>
		</codetypeset>

		<codetypeset param0="U/S48" param1="S24">
			<codeset param1="M" total="3+?" totalv="3+?"
				lostregs="eax,edx" endregs="eax=@0.S24" endpipe="U">
				<line code="lea edx, @0.U8"       time="U 1"   timev=" V1" comment="Point to our value" />
				<line code="call General_ReadS24" time="!V1+?"             comment="Get the value in EAX" />
				<line code="mov edx, eax"         time="U 1"               comment="Copy EAX to EDX" />
				<line code="shr edx, 31"          time="U!1"               comment="Sign extend" />
			</codeset>

			<codeset param1="R" total="3" totalv="2"
				lostregs="eax,edx" endregs="eax=@0.S24" endpipe="U">
				<line code="mov eax, @0.S32" time="U 1" timev=" V1" comment="Store the value in EAX" />
				<line code="mov edx, eax"    time="U*1" timev="U 1" comment="Copy EAX to EDX" />
				<line code="shr edx, 31"     time="U!1"             comment="Sign extend" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S48-256 -->
		<codetypeset param0="U/S48" param1="U/S48-256">
			<codeset param1="M" param1type="U48" total="4" totalv="3"
				lostregs="eax,edx" endregs="eax=@0.U32,edx=@0.U16[2]" endpipe="V">
				<line code="mov eax, @0.U32"      time="U 1"   timev=" V1" comment="Store the low 32 bits in EAX" />
				<line code="movzx edx, @0.U16[2]" time="&#45;&#45;3"       comment="Zero extend the high 16 bits to EDX" />
			</codeset>
			<codeset param1="M" param1type="S48" total="4" totalv="3"
				lostregs="eax,edx" endregs="eax=@0.U32,edx=@0.S16[2]" endpipe="V">
				<line code="mov eax, @0.U32"      time="U 1"   timev=" V1" comment="Store the low 32 bits in EAX" />
				<line code="movsx edx, @0.U16[2]" time="&#45;&#45;3"       comment="Sign Extend the high 16 bits to EDX" />
			</codeset>

			<codeset param1="R,I" total="1" totalv="1"
				lostregs="eax,edx" endregs="eax=@0.U32,edx=@0.U32[1]" endpipe="-">
				<line code="mov eax, @0.U32"    time="U 1"   timev=" V1" comment="Store the low 32 bits in EAX" />
				<line code="mov edx, @0.U32[1]" time=" V1"   timev="U 1" comment="Store the high 32 bits in EDX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S48" param1="Boolean">
			<codeset param1="M,R" total="4" totalv="3"
				lostregs="eax,edx" endregs="eax=@0.U8,edx=0" endpipe="V">
				<line code="xor edx, edx"     time="U 1" timev=" V1" comment="Clear the high DWord" />
				<line code="movzx eax, @0.U8" time="&#45;&#45;3"     comment="Zero extend the value to EAX" />
			</codeset>
		</codetypeset>


		<!-- ********************************************************************************************************** -->
		<!-- Returning U/S64 -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S8 -->
		<codetypeset param0="U/S64" param1="U8">
			<codeset param1="M,R" total="4"
				lostregs="eax,edx" endregs="eax=@0.U8,edx=0" endpipe="U">
				<line code="movzx eax, @0.U8" time="&#45;&#45;3" comment="Zero extend the value to EAX" />
				<line code="xor edx, edx"     time="U 1"         comment="Clear EDX" />
			</codeset>
		</codetypeset>

		<codetypeset param0="U/S64" param1="S8">
			<codeset param1="M,R" total="5"
				lostregs="eax,edx" endregs="eax=@0.S8" endpipe="U">
				<line code="movsx eax, @0.U8" time="&#45;&#45;3" comment="Sign extend the value to EAX" />
				<line code="mov edx, eax"     time="U 1"         comment="Copy EAX to EDX" />
				<line code="shr edx, 31"      time="U!1"         comment="Sign extend" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S16 -->
		<codetypeset param0="U/S64" param1="U16">
			<codeset param1="M,R" total="4"
				lostregs="eax,edx" endregs="eax=@0.U16,edx=0" endpipe="U">
				<line code="movzx eax, @0.U16" time="&#45;&#45;3" comment="Zero extend the value to EAX" />
				<line code="xor edx, edx"      time="U 1"         comment="Clear EDX" />
			</codeset>
		</codetypeset>

		<codetypeset param0="U/S64" param1="S16">
			<codeset param1="M,R" total="5"
				lostregs="eax,edx" endregs="eax=@0.S16" endpipe="U">
				<line code="movsx eax, @0.U16" time="&#45;&#45;3" comment="Sign extend the value to EAX" />
				<line code="mov edx, eax"      time="U 1"         comment="Copy EAX to EDX" />
				<line code="shr edx, 31"       time="U!1"         comment="Sign extend" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S24 -->
		<codetypeset param0="U/S64" param1="U24">
			<codeset param1="M" total="2+?" totalv="2+?"
				lostregs="eax,edx" endregs="eax=@0.U24,edx=0" endpipe="U">
				<line code="lea edx, @0.U8"       time="U 1"   timev=" V1" comment="Point to our value" />
				<line code="call General_ReadU24" time="!V1+?"             comment="Get the value in EAX" />
				<line code="xor edx, edx"         time="U 1"               comment="Clear to zero" />
			</codeset>

			<codeset param1="R" total="1" totalv="1"
				lostregs="eax,edx" endregs="eax=@0.U24,edx=0" endpipe="-">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Store the value in EAX" />
				<line code="xor edx, edx"    time=" V1" timev="U 1" comment="Clear to zero" />
			</codeset>
		</codetypeset>

		<codetypeset param0="U/S64" param1="S24">
			<codeset param1="M" total="3+?" totalv="3+?"
				lostregs="eax,edx" endregs="eax=@0.S24" endpipe="U">
				<line code="lea edx, @0.U8"       time="U 1"   timev=" V1" comment="Point to our value" />
				<line code="call General_ReadS24" time="!V1+?"             comment="Get the value in EAX" />
				<line code="mov edx, eax"         time="U 1"               comment="Copy EAX to EDX" />
				<line code="shr edx, 31"          time="U!1"               comment="Sign extend" />
			</codeset>

			<codeset param1="R" total="3" totalv="2"
				lostregs="eax,edx" endregs="eax=@0.S24" endpipe="U">
				<line code="mov eax, @0.S32" time="U 1" timev=" V1" comment="Store the value in EAX" />
				<line code="mov edx, eax"    time="U*1" timev="U 1" comment="Copy EAX to EDX" />
				<line code="shr edx, 31"     time="U!1"             comment="Sign extend" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S32 -->
		<codetypeset param0="U/S64" param1="U32">
			<codeset param1="M,R" total="1" totalv="1"
				lostregs="eax,edx" endregs="eax=@0.U32,edx=0" endpipe="-">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Store the value in EAX" />
				<line code="xor edx, edx"    time=" V1" timev="U 1" comment="Clear EDX" />
			</codeset>
		</codetypeset>

		<codetypeset param0="U/S64" param1="S32">
			<codeset param1="M,R" total="3" totalv="2"
				lostregs="eax,edx" endregs="eax=@0.U32" endpipe="U">
				<line code="mov eax, @0.U32" time="U 1" timev=" V1" comment="Store the value in EAX" />
				<line code="mov edx, eax"    time="U*1" timev="U 1" comment="Move it to EDX" />
				<line code="sar edx, 31"     time="U!1"             comment="SAR to sign extend" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S48 -->
		<codetypeset param0="U/S64" param1="U/S48">
			<codeset param1="M" param1type="U48" total="4" totalv="3"
				lostregs="eax,edx" endregs="eax=@0.U32,edx=@0.U16[2]" endpipe="V">
				<line code="mov eax, @0.U32"      time="U 1"   timev=" V1" comment="Store the low 32 bits in EAX" />
				<line code="movzx edx, @0.U16[2]" time="&#45;&#45;3"       comment="Zero extend the high 16 bits to EDX" />
			</codeset>
			<codeset param1="M" param1type="S48" total="4" totalv="3"
				lostregs="eax,edx" endregs="eax=@0.U32,edx=@0.S16[2]" endpipe="V">
				<line code="mov eax, @0.U32"      time="U 1"   timev=" V1" comment="Store the low 32 bits in EAX" />
				<line code="movsx edx, @0.U16[2]" time="&#45;&#45;3"       comment="Sign Extend the high 16 bits to EDX" />
			</codeset>

			<codeset param1="R" total="1" totalv="1"
				lostregs="eax,edx" endregs="eax=@0.U32,edx=@0.U32[1]" endpipe="-">
				<line code="mov eax, @0.U32"    time="U 1"   timev=" V1" comment="Store the low 32 bits in EAX" />
				<line code="mov edx, @0.U32[1]" time=" V1"   timev="U 1" comment="Store the high 32 bits in EDX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S64-256 -->
		<codetypeset param0="U/S64" param1="U/S64-256">
			<codeset param1="M,R,I" total="1" totalv="1"
				lostregs="eax,edx" endregs="eax=@0.U32,edx=@0.U32[1]" endpipe="-">
				<line code="mov eax, @0.U32"    time="U 1" timev=" V1" comment="Store the low 32 bits in EAX" />
				<line code="mov edx, @0.U32[1]" time=" V1" timev="U 1" comment="Store the high 32 bits in EDX" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="U/S64" param1="Boolean">
			<codeset param1="M,R" total="4" totalv="3"
				lostregs="eax,edx" endregs="eax=@0.U8,edx=0" endpipe="V">
				<line code="xor edx, edx"     time="U 1" timev=" V1" comment="Clear the high DWord" />
				<line code="movzx eax, @0.U8" time="&#45;&#45;3"     comment="Zero extend the value to EAX" />
			</codeset>
		</codetypeset>


		<!-- ********************************************************************************************************** -->
		<!-- Returning Boolean -->

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S8 -->
		<codetypeset param0="Boolean" param1="U/S8">
			<codeset param1="M,R" total="3" totalv="3"
				lostregs="al,dl" endpipe="U">
				<line code="mov dl, @0.U8" time="U 1" timev=" V1" comment="Get the value" />
				<line code="xor al, al"    time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add dl, -1"    time="U 1" timev=" V1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc al, al"    time="U!1"             comment="1 if carry, 0 if no carry" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S16 -->
		<codetypeset param0="Boolean" param1="U/S16">
			<codeset param1="M" total="5" totalv="4"
				lostregs="al,dx" endpipe="U">
				<line code="mov dx, @0.U16" time="U 1+1" timev=" V1+1" comment="Get the value" />
				<line code="xor al, al"     time=" V1"   timev="U 1"   comment="Clear to zero" />
				<line code="add dx, -1"     time="U 1+1" timev=" V1+1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc al, al"     time="U!1"                 comment="1 if carry, 0 if no carry" />
			</codeset>

			<codeset param1="R" total="4" totalv="3"
				lostregs="al,edx" endpipe="U">
				<line code="mov edx, @0.U32" time="U 1"   timev=" V1"   comment="Get the full register value" />
				<line code="xor al, al"      time=" V1"   timev="U 1"   comment="Clear to zero" />
				<line code="add dx, -1"      time="U 1+1" timev=" V1+1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc al, al"      time="U!1"                 comment="1 if carry, 0 if no carry" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S24 -->
		<codetypeset param0="Boolean" param1="U/S24">
			<codeset param1="M" total="6" totalv="5"
				lostregs="al,dx" endpipe="U">
				<line code="mov dx, @0.U16"  time="U 1+1" timev=" V1+1" comment="Get the value" />
				<line code="xor al, al"      time=" V1"   timev="U 1"   comment="Clear to zero" />
				<line code="or dl, @0.U8[2]" time="U 1"   timev=" V1"   comment="OR the bits together" />
				<line code="add dx, -1"      time="U*1+1" timev="U 1+1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc al, al"      time="U!1"                 comment="1 if carry, 0 if no carry" />
			</codeset>

			<codeset param1="R" total="3" totalv="2"
				lostregs="al,edx" endpipe="U">
				<line code="mov edx, @0.U32" time="U 1" timev=" V1" comment="Get the full register value" />
				<line code="xor al, al"      time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add edx, -1"     time="U 1" timev=" V1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc al, al"      time="U!1"             comment="1 if carry, 0 if no carry" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S32 -->
		<codetypeset param0="Boolean" param1="U/S32">
			<codeset param1="M,R" total="3" totalv="2"
				lostregs="al,edx" endpipe="U">
				<line code="mov edx, @0.U32" time="U 1" timev=" V1" comment="Get the full register value" />
				<line code="xor al, al"      time=" V1" timev="U 1" comment="Clear to zero" />
				<line code="add edx, -1"     time="U 1" timev=" V1" comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc al, al"      time="U!1"             comment="1 if carry, 0 if no carry" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S48 -->
		<codetypeset param0="Boolean" param1="U/S48">
			<codeset param1="M" total="5" totalv="4"
				lostregs="al,edx" endpipe="U">
				<line code="mov edx, @0.U32"  time="U 1" timev=" V1" comment="Get the full register value" />
				<line code="or dx, @0.U16[2]" time="U*2" timev="U 2" comment="OR in the high word" />
				<line code="xor al, al"       time=" V1"             comment="Clear to zero" />
				<line code="add edx, -1"      time="U 1"             comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc al, al"       time="U!1"             comment="1 if carry, 0 if no carry" />
			</codeset>

			<codeset param1="R" total="4" totalv="3"
				lostregs="al,edx" endpipe="U">
				<line code="mov edx, @0.U32"   time="U 1" timev=" V1" comment="Get the full register value" />
				<line code="or edx, @0.U32[1]" time="U*1" timev="U 1" comment="OR in the high DWord" />
				<line code="xor al, al"        time=" V1"             comment="Clear to zero" />
				<line code="add edx, -1"       time="U 1"             comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc al, al"        time="U!1"             comment="1 if carry, 0 if no carry" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From U/S64 -->
		<codetypeset param0="Boolean" param1="U/S64">
			<codeset param1="M,R" total="4" totalv="3"
				lostregs="al,edx" endpipe="U">
				<line code="mov edx, @0.U32"   time="U 1" timev=" V1" comment="Get the full register value" />
				<line code="or edx, @0.U32[1]" time="U*1" timev="U 1" comment="OR in the high word" />
				<line code="xor al, al"        time=" V1"             comment="Clear to zero" />
				<line code="add edx, -1"       time="U 1"             comment="Add -1. This will set carry if it is non-zero" />
				<line code="adc al, al"        time="U!1"             comment="1 if carry, 0 if no carry" />
			</codeset>
		</codetypeset>

		<!-- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -->
		<!-- From Boolean -->
		<codetypeset param0="Boolean" param1="Boolean">
			<codeset param1="M,R,I" total="1" totalv="0"
				lostregs="al" endregs="al=@0.U8" endpipe="S">
				<line code="mov al, @0.U8" time="U 1" timev=" V1" comment="Store the value in AL" />
			</codeset>
		</codetypeset>
	</mnemonic>
</encoding>
