<aname="l9"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_BSF</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>Bsf</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>bit_field_val);</span><spanclass=cF2>//Scan forward from lowest for 1st set. -1 if not found.</span><span class=cF0>
<aname="l10"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_BSR</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>Bsr</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>bit_field_val);</span><spanclass=cF2>//Scan rev from highest for 1st set. -1 if not found.</span><span class=cF0>
<aname="l12"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_BTC</span><spanclass=cF0></span><spanclass=cF1>Bool</span><spanclass=cF0></span><spanclass=cF5>Btc</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*bit_field,</span><spanclass=cF9>I64</span><spanclass=cF0>bit);</span><spanclass=cF2>//Bit test and complement (same as xor with 1).</span><span class=cF0>
<aname="l13"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_BTR</span><spanclass=cF0></span><spanclass=cF1>Bool</span><spanclass=cF0></span><spanclass=cF5>Btr</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*bit_field,</span><spanclass=cF9>I64</span><spanclass=cF0>bit);</span><spanclass=cF2>//Bit test and reset to zero.</span><span class=cF0>
<aname="l14"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_BTS</span><spanclass=cF0></span><spanclass=cF1>Bool</span><spanclass=cF0></span><spanclass=cF5>Bts</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*bit_field,</span><spanclass=cF9>I64</span><spanclass=cF0>bit);</span><spanclass=cF2>//Bit test and set to one.</span><span class=cF0>
<aname="l15"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_LBTC</span><spanclass=cF0></span><spanclass=cF1>Bool</span><spanclass=cF0></span><spanclass=cF5>LBtc</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*bit_field,</span><spanclass=cF9>I64</span><spanclass=cF0>bit);</span><spanclass=cF2>//Locked bit test and complement (xor with 1).</span><span class=cF0>
<aname="l16"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_LBTR</span><spanclass=cF0></span><spanclass=cF1>Bool</span><spanclass=cF0></span><spanclass=cF5>LBtr</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*bit_field,</span><spanclass=cF9>I64</span><spanclass=cF0>bit);</span><spanclass=cF2>//Locked bit test and reset to zero.</span><span class=cF0>
<aname="l17"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_LBTS</span><spanclass=cF0></span><spanclass=cF1>Bool</span><spanclass=cF0></span><spanclass=cF5>LBts</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*bit_field,</span><spanclass=cF9>I64</span><spanclass=cF0>bit);</span><spanclass=cF2>//Locked bit test and set to one.</span><span class=cF0>
<aname="l18"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_POPCNT</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>PopCount</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>bit_field_val);</span><spanclass=cF2>//Count number of set bits in number.</span><span class=cF0>
<aname="l19"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_BEQUAL</span><spanclass=cF0></span><spanclass=cF1>Bool</span><spanclass=cF0></span><spanclass=cF5>BEqual</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*bit_field,</span><spanclass=cF9>I64</span><spanclass=cF0>bit,</span><spanclass=cF1>Bool</span><spanclass=cF0>val);</span><spanclass=cF2>//Set bit equ to val.</span><span class=cF0>
<aname="l20"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_LBEQUAL</span><spanclass=cF0></span><spanclass=cF1>Bool</span><spanclass=cF0></span><spanclass=cF5>LBEqual</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*bit_field,</span><spanclass=cF9>I64</span><spanclass=cF0>bit,</span><spanclass=cF1>Bool</span><spanclass=cF0>val);</span><spanclass=cF2>//Locked Set bit equ to val.</span><span class=cF0>
<aname="l21"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_BIT_FIELD_EXT_U32</span><spanclass=cF0></span><spanclass=cF9>U32</span><spanclass=cF0></span><spanclass=cF5>BFieldExtU32</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*bit_field,</span><spanclass=cF9>I64</span><spanclass=cF0>bit,</span><spanclass=cF9>I64</span><spanclass=cF0>size);</span><spanclass=cF2>//Extract U32 from bit field.</span><span class=cF0>
<aname="l22"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_BIT_FIELD_OR_U32</span><spanclass=cF0></span><spanclass=cF1>U0</span><spanclass=cF0></span><spanclass=cF5>BFieldOrU32</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*bit_field,</span><spanclass=cF9>I64</span><spanclass=cF0>bit,</span><spanclass=cF9>U32</span><spanclass=cF0>pattern);</span><spanclass=cF2>//Or U32 into bit field.</span><span class=cF0>
<aname="l32"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_CALL</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>Call</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*machine_code);</span><spanclass=cF2>//Call addr with no args.</span><span class=cF0>
<aname="l33"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_CALLEXTSTR</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>CallExtStr</span><spanclass=cF0>(</span><spanclass=cF2>/*argpop*/</span><spanclass=cF1>U8</span><spanclass=cF0>*name,...);</span><spanclass=cF2>//Search sym table for fun and pass it args.</span><span class=cF0>
<aname="l35"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_CALL_IND</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>CallInd</span><spanclass=cF0>(</span><spanclass=cF2>/*argpop*/</span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF7>(</span><spanclass=cF0>*fp_addr</span><spanclass=cF7>)(</span><spanclass=cF0>...</span><spanclass=cF7>)</span><spanclass=cF0>,...);</span><spanclass=cF2>//Call with fixed number of args.</span><span class=cF0>
<aname="l38"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_EXTERN_TABLE</span><spanclass=cF0></span><spanclass=cF2>/*argpop*/</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0>(**</span><spanclass=cFB>ext</span><spanclass=cF0>)(...);</span><spanclass=cF2>//Array of fun ptrs.</span><span class=cF0> </span><span class=cF2>See </span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.html#l735"><span class=cF4>Extern Num Definitions</span></a><span class=cF0>
<aname="l39"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_CALLEXTNUM</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>CallExtNum</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>num,...);</span><spanclass=cF2>//Call ext num with fixed number of args.</span><span class=cF0>
<aname="l49"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_QUEUE_INIT</span><spanclass=cF0></span><spanclass=cF1>U0</span><spanclass=cF0></span><spanclass=cF5>QueueInit</span><spanclass=cF0>(</span><spanclass=cF9>CQueue</span><spanclass=cF0>*head);</span><spanclass=cF2>//Init queue head links.</span><span class=cF0>
<aname="l50"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_QUEUE_INSERT</span><spanclass=cF0></span><spanclass=cF1>U0</span><spanclass=cF0></span><spanclass=cF5>QueueInsert</span><spanclass=cF0>(</span><spanclass=cF9>CQueue</span><spanclass=cF0>*entry,</span><spanclass=cF9>CQueue</span><spanclass=cF0>*pred);</span><spanclass=cF2>//Insert item into que after predecessor.</span><span class=cF0>
<aname="l51"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_QUEUE_INSERT_REV</span><spanclass=cF0></span><spanclass=cF1>U0</span><spanclass=cF0></span><spanclass=cF5>QueueInsertRev</span><spanclass=cF0>(</span><spanclass=cF9>CQueue</span><spanclass=cF0>*entry,</span><spanclass=cF9>CQueue</span><spanclass=cF0>*succ);</span><spanclass=cF2>//Revd insert into que.</span><span class=cF0>
<aname="l52"></a></span><spanclass=cF2>//Ins item into que before successor.</span><span class=cF0>
<aname="l53"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_QUEUE_REMOVE</span><spanclass=cF0></span><spanclass=cF1>U0</span><spanclass=cF0></span><spanclass=cF5>QueueRemove</span><spanclass=cF0>(</span><spanclass=cF9>CQueue</span><spanclass=cF0>*entry);</span><spanclass=cF2>//Remove item from queue.</span><span class=cF0>
<aname="l70"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_ATAN</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cF5>ATan</span><spanclass=cF0>(</span><spanclass=cF1>F64</span><spanclass=cF0>d);</span><spanclass=cF2>//Arc Tan (Inverse Tan).</span><span class=cF0>
<aname="l74"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_MAX_I64</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>MaxI64</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>n1,</span><spanclass=cF9>I64</span><spanclass=cF0>n2);</span><spanclass=cF2>//Max of two I64s.</span><span class=cF0>
<aname="l75"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_MAX_U64</span><spanclass=cF0></span><spanclass=cF9>U64</span><spanclass=cF0></span><spanclass=cF5>MaxU64</span><spanclass=cF0>(</span><spanclass=cF9>U64</span><spanclass=cF0>n1,</span><spanclass=cF9>U64</span><spanclass=cF0>n2);</span><spanclass=cF2>//Max of two U64s.</span><span class=cF0>
<aname="l76"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_MIN_I64</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>MinI64</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>n1,</span><spanclass=cF9>I64</span><spanclass=cF0>n2);</span><spanclass=cF2>//Min of two I64s.</span><span class=cF0>
<aname="l77"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_MIN_U64</span><spanclass=cF0></span><spanclass=cF9>U64</span><spanclass=cF0></span><spanclass=cF5>MinU64</span><spanclass=cF0>(</span><spanclass=cF9>U64</span><spanclass=cF0>n1,</span><spanclass=cF9>U64</span><spanclass=cF0>n2);</span><spanclass=cF2>//Min of two U64s.</span><span class=cF0>
<aname="l78"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_MOD_U64</span><spanclass=cF0></span><spanclass=cF9>U64</span><spanclass=cF0></span><spanclass=cF5>ModU64</span><spanclass=cF0>(</span><spanclass=cF9>U64</span><spanclass=cF0>*q,</span><spanclass=cF9>U64</span><spanclass=cF0>d);</span><spanclass=cF2>//Div and return U64 Modulo.</span><span class=cF0>
<aname="l79"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_SIGN_I64</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>SignI64</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>i);</span><spanclass=cF2>//Sign of I64: -1,0,1.</span><span class=cF0>
<aname="l81"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_SQR</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cF5>Sqr</span><spanclass=cF0>(</span><spanclass=cF1>F64</span><spanclass=cF0>d);</span><spanclass=cF2>//Square of F64.</span><span class=cF0>
<aname="l82"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_SQR_I64</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>SqrI64</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>i);</span><spanclass=cF2>//Square of I64.</span><span class=cF0>
<aname="l83"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_SQR_U64</span><spanclass=cF0></span><spanclass=cF9>U64</span><spanclass=cF0></span><spanclass=cF5>SqrU64</span><spanclass=cF0>(</span><spanclass=cF9>U64</span><spanclass=cF0>i);</span><spanclass=cF2>//Square of U64.</span><span class=cF0>
<aname="l84"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_SQRT</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cF5>Sqrt</span><spanclass=cF0>(</span><spanclass=cF1>F64</span><spanclass=cF0>d);</span><spanclass=cF2>//Square head of F64.</span><span class=cF0>
<aname="l85"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_SWAP_I64</span><spanclass=cF0></span><spanclass=cF1>U0</span><spanclass=cF0></span><spanclass=cF5>SwapI64</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>*n1,</span><spanclass=cF9>I64</span><spanclass=cF0>*n2);</span><spanclass=cF2>//Swap two I64s. Not atomic.</span><span class=cF0>
<aname="l86"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_SWAP_U16</span><spanclass=cF0></span><spanclass=cF1>U0</span><spanclass=cF0></span><spanclass=cF5>SwapU16</span><spanclass=cF0>(</span><spanclass=cF9>U16</span><spanclass=cF0>*n1,</span><spanclass=cF9>U16</span><spanclass=cF0>*n2);</span><spanclass=cF2>//Swap two U16s. Not atomic.</span><span class=cF0>
<aname="l87"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_SWAP_U32</span><spanclass=cF0></span><spanclass=cF1>U0</span><spanclass=cF0></span><spanclass=cF5>SwapU32</span><spanclass=cF0>(</span><spanclass=cF9>U32</span><spanclass=cF0>*n1,</span><spanclass=cF9>U32</span><spanclass=cF0>*n2);</span><spanclass=cF2>//Swap two U32s. Not atomic.</span><span class=cF0>
<aname="l88"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_SWAP_U8</span><spanclass=cF0></span><spanclass=cF1>U0</span><spanclass=cF0></span><spanclass=cF5>SwapU8</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*n1,</span><spanclass=cF1>U8</span><spanclass=cF0>*n2);</span><spanclass=cF2>//Swap two U8s. Not atomic.</span><span class=cF0>
<aname="l90"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_TO_BOOL</span><spanclass=cF0></span><spanclass=cF1>Bool</span><spanclass=cF0></span><spanclass=cF5>ToBool</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>i);</span><spanclass=cF2>//Convert to Boolean.</span><span class=cF0>
<aname="l91"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_TO_F64</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cF5>ToF64</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>i);</span><spanclass=cF2>//Convert to F64.</span><span class=cF0>
<aname="l92"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_TO_I64</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>ToI64</span><spanclass=cF0>(</span><spanclass=cF1>F64</span><spanclass=cF0>d);</span><spanclass=cF2>//Convert to I64. Truncates.</span><span class=cF0>
<aname="l94"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_CEIL</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cF5>Ceil</span><spanclass=cF0>(</span><spanclass=cF1>F64</span><spanclass=cF0>d);</span><spanclass=cF2>//Ceiling of F64.</span><span class=cF0>
<aname="l95"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_CLAMP_I64</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>ClampI64</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>num,</span><spanclass=cF9>I64</span><spanclass=cF0>lo,</span><spanclass=cF9>I64</span><spanclass=cF0>hi);</span><spanclass=cF2>//Clamp to I64 [] range.</span><span class=cF0>
<aname="l96"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_CLAMP_U64</span><spanclass=cF0></span><spanclass=cF9>U64</span><spanclass=cF0></span><spanclass=cF5>ClampU64</span><spanclass=cF0>(</span><spanclass=cF9>U64</span><spanclass=cF0>num,</span><spanclass=cF9>U64</span><spanclass=cF0>lo,</span><spanclass=cF9>U64</span><spanclass=cF0>hi);</span><spanclass=cF2>//Clamp to U64 [] range.</span><span class=cF0>
<aname="l100"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_FLOOR</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cF5>Floor</span><spanclass=cF0>(</span><spanclass=cF1>F64</span><spanclass=cF0>d);</span><spanclass=cF2>//Floor of F64.</span><span class=cF0>
<aname="l104"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_LOG10</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cF5>Log10</span><spanclass=cF0>(</span><spanclass=cF1>F64</span><spanclass=cF0>d);</span><spanclass=cF2>//Log base 10.</span><span class=cF0>
<aname="l105"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_LOG2</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cF5>Log2</span><spanclass=cF0>(</span><spanclass=cF1>F64</span><spanclass=cF0>d);</span><spanclass=cF2>//Log base 2.</span><span class=cF0>
<aname="l106"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_POW</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cF5>Pow</span><spanclass=cF0>(</span><spanclass=cF1>F64</span><spanclass=cF0>base,</span><spanclass=cF1>F64</span><spanclass=cF0>power);</span><spanclass=cF2>//F64 base to a power.</span><span class=cF0>
<aname="l107"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_POW10</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cF5>Pow10</span><spanclass=cF0>(</span><spanclass=cF1>F64</span><spanclass=cF0>d);</span><spanclass=cF2>//Ten to the dth power.</span><span class=cF0>
<aname="l108"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_ROUND</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cF5>Round</span><spanclass=cF0>(</span><spanclass=cF1>F64</span><spanclass=cF0>d);</span><spanclass=cF2>//Round F64 to whole number.</span><span class=cF0>
<aname="l109"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_SIGN</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cF5>Sign</span><spanclass=cF0>(</span><spanclass=cF1>F64</span><spanclass=cF0>d);</span><spanclass=cF2>//Sign of F64: -1,0,1</span><span class=cF0>
<aname="l130"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_D3_UNIT</span><spanclass=cF0></span><spanclass=cF9>CD3</span><spanclass=cF0>*</span><spanclass=cF5>D3Unit</span><spanclass=cF0>(</span><spanclass=cF9>CD3</span><spanclass=cF0>*d);</span><spanclass=cF2>//To unit vect</span><span class=cF0>
<aname="l134"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_MEMCOMPARE</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>MemCompare</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*ptr1,</span><spanclass=cF1>U8</span><spanclass=cF0>*ptr2,</span><spanclass=cF9>I64</span><spanclass=cF0>count);</span><spanclass=cF2>//Compare chunk of memory.</span><span class=cF0>
<aname="l135"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_MEMCOPY</span><spanclass=cF0></span><spanclass=cF1>U8</span><spanclass=cF0>*</span><spanclass=cF5>MemCopy</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*dst,</span><spanclass=cF1>U8</span><spanclass=cF0>*src,</span><spanclass=cF9>I64</span><spanclass=cF0>count);</span><spanclass=cF2>//Copy chunk of memory. Only goes forward.</span><span class=cF0>
<aname="l136"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_MEMSET</span><spanclass=cF0></span><spanclass=cF1>U8</span><spanclass=cF0>*</span><spanclass=cF5>MemSet</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*dst,</span><spanclass=cF9>I64</span><spanclass=cF0>val,</span><spanclass=cF9>I64</span><spanclass=cF0>count);</span><spanclass=cF2>//Set chunk of U8s to value.</span><span class=cF0>
<aname="l137"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_MEMSET_I64</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0>*</span><spanclass=cF5>MemSetI64</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>*dst,</span><spanclass=cF9>I64</span><spanclass=cF0>val,</span><spanclass=cF9>I64</span><spanclass=cF0>I64count);</span><spanclass=cF2>//Set chunk of I64s to value.</span><span class=cF0>
<aname="l138"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_MEMSET_U16</span><spanclass=cF0></span><spanclass=cF9>U16</span><spanclass=cF0>*</span><spanclass=cF5>MemSetU16</span><spanclass=cF0>(</span><spanclass=cF9>U16</span><spanclass=cF0>*dst,</span><spanclass=cF9>I64</span><spanclass=cF0>val,</span><spanclass=cF9>I64</span><spanclass=cF0>U16count);</span><spanclass=cF2>//Set chunk of U16s to value.</span><span class=cF0>
<aname="l139"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_MEMSET_U32</span><spanclass=cF0></span><spanclass=cF9>U32</span><spanclass=cF0>*</span><spanclass=cF5>MemSetU32</span><spanclass=cF0>(</span><spanclass=cF9>U32</span><spanclass=cF0>*dst,</span><spanclass=cF9>I64</span><spanclass=cF0>val,</span><spanclass=cF9>I64</span><spanclass=cF0>U32count);</span><spanclass=cF2>//Set chunk of U32s to value.</span><span class=cF0>
<aname="l149"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_CODE_BP</span><spanclass=cF0></span><spanclass=cF9>CBlkPool</span><spanclass=cF0>*</span><spanclass=cFB>sys_code_bp</span><spanclass=cF0>;</span><spanclass=cF2>//System's BlkPool for code.</span><span class=cF0>
<aname="l150"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_DATA_BP</span><spanclass=cF0></span><spanclass=cF9>CBlkPool</span><spanclass=cF0>*</span><spanclass=cFB>sys_data_bp</span><spanclass=cF0>;</span><spanclass=cF2>//System's BlkPool for data.</span><span class=cF0>
<aname="l162"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_COMPILE_TIME</span><spanclass=cF0></span><spanclass=cF9>CDate</span><spanclass=cF0></span><spanclass=cFB>sys_compile_time</span><spanclass=cF0>;</span><spanclass=cF2>//Date and time kernel was compiled.</span><span class=cF0>
<aname="l163"></a></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_CTRL_ALT_FLAGS</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cFB>sys_ctrl_alt_flags</span><spanclass=cF0>[</span><spanclass=cFE>1</span><spanclass=cF0>];</span><spanclass=cF2>//Should be semiphores?</span><span class=cF0>
<aname="l170"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_PROGRESS1_TF</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cFB>progress1_tf</span><spanclass=cF0>;</span><spanclass=cF2>//Progress 1 end time.</span><span class=cF0>
<aname="l175"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_PROGRESS2_TF</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cFB>progress2_tf</span><spanclass=cF0>;</span><spanclass=cF2>//Progress 2 end time.</span><span class=cF0>
<aname="l180"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_PROGRESS3_TF</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cFB>progress3_tf</span><spanclass=cF0>;</span><spanclass=cF2>//Progress 3 end time.</span><span class=cF0>
<aname="l185"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_PROGRESS4_TF</span><spanclass=cF0></span><spanclass=cF1>F64</span><spanclass=cF0></span><spanclass=cFB>progress4_tf</span><spanclass=cF0>;</span><spanclass=cF2>//Progress 4 end time.</span><span class=cF0>
<aname="l191"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_MP_COUNT</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cFB>mp_count</span><spanclass=cF0>;</span><spanclass=cF2>//Count of cores</span><span class=cF0>
<aname="l192"></a></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_MP_COUNT_INITIAL</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cFB>mp_count_initial</span><spanclass=cF0>;</span><spanclass=cF2>//only used during </span><a href="https://tomawezome.github.io/ZealOS/Kernel/MultiProc.html#l298"><span class=cF4>Core0StartMP</span></a><span class=cF0>
<aname="l197"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_GS</span><spanclass=cF0></span><spanclass=cF9>CCPU</span><spanclass=cF0>*</span><spanclass=cF5>Gs</span><spanclass=cF0>();</span><spanclass=cF2>//GS points to current </span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.html#l4058"><span class=cF4>CCPU</span></a><span class=cF2>.</span><span class=cF0>
<aname="l200"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_PCI_BUSES</span><spanclass=cF0></span><spanclass=cF9>U16</span><spanclass=cF0></span><spanclass=cFB>sys_pci_buses</span><spanclass=cF0>;</span><spanclass=cF2>//Number of PCI buses.</span><span class=cF0>
<aname="l208"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_POP</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>Pop</span><spanclass=cF0>();</span><spanclass=cF2>//Pop value from stack.</span><span class=cF0>
<aname="l209"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_PUSH</span><spanclass=cF0></span><spanclass=cF1>U0</span><spanclass=cF0></span><spanclass=cF5>Push</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>d);</span><spanclass=cF2>//Push value on stack.</span><span class=cF0>
<aname="l222"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_MSR_READ</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>MSRRead</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>model_specific_reg);</span><spanclass=cF2>//Model Specific Reg See </span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.html#l624"><span class=cF4>MSRs</span></a><span class=cF2>.</span><span class=cF0>
<aname="l223"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>_MSR_WRITE</span><spanclass=cF0></span><spanclass=cF1>U0</span><spanclass=cF0></span><spanclass=cF5>MSRWrite</span><spanclass=cF0>(</span><spanclass=cF9>I64</span><spanclass=cF0>model_specific_reg,</span><spanclass=cF9>I64</span><spanclass=cF0>val);</span><spanclass=cF2>//Model Specific Reg See </span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.html#l624"><span class=cF4>MSRs</span></a><span class=cF2>.</span><span class=cF0>
<aname="l232"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_CLFLUSH</span><spanclass=cF0></span><spanclass=cF1>U0</span><spanclass=cF0></span><spanclass=cF5>CLFlush</span><spanclass=cF0>(</span><spanclass=cF1>U8</span><spanclass=cF0>*a);</span><spanclass=cF2>//Flush cache line inst.</span><span class=cF0>
<aname="l233"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_CACHE_LINE_WIDTH</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cFB>sys_cache_line_width</span><spanclass=cF0>;</span><spanclass=cF2>//CPU's Cache line width.</span><span class=cF0>
<aname="l240"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_FS</span><spanclass=cF0></span><spanclass=cF9>CTask</span><spanclass=cF0>*</span><spanclass=cF5>Fs</span><spanclass=cF0>();</span><spanclass=cF2>//FS seg reg points to the current </span><a href="https://tomawezome.github.io/ZealOS/Kernel/KernelA.html#l3939"><span class=cF4>CTask</span></a><span class=cF2>.</span><span class=cF0>
<aname="l244"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_intern</span><spanclass=cF0></span><spanclass=cF3>IC_RDTSC</span><spanclass=cF0></span><spanclass=cF9>I64</span><spanclass=cF0></span><spanclass=cF5>TSCGet</span><spanclass=cF0>();</span><spanclass=cF2>//Get time stamp counter.</span><span class=cF0>