<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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=cF0></span><spanclass=cF2>See </span><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l736"><spanclass=cF4>Extern Num Definitions</span></a><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=cF0>
<aname="l52"></a></span><spanclass=cF2>//Ins item into que before successor.</span><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=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><spanclass=cF0>
<aname="l190"></a></span><spanclass=cF1>public</span><spanclass=cF0></span><spanclass=cF1>_extern</span><spanclass=cF0></span><spanclass=cFD>SYS_CPU_STRUCTS</span><spanclass=cF0></span><spanclass=cF9>CCPU</span><spanclass=cF0> *</span><spanclass=cFB>cpu_structs</span><spanclass=cF0>; </span><spanclass=cF2>//</span><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelB.HH.html#l197"><spanclass=cF4>Gs</span></a><spanclass=cF2> points to cur </span><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l4089"><spanclass=cF4>CCPU</span></a><spanclass=cF2>.</span><spanclass=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><spanclass=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><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/MultiProc.CC.html#l298"><spanclass=cF4>Core0StartMP</span></a><spanclass=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><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l4089"><spanclass=cF4>CCPU</span></a><spanclass=cF2>.</span><spanclass=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><spanclass=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><spanclass=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><spanclass=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><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l625"><spanclass=cF4>MSRs</span></a><spanclass=cF2>.</span><spanclass=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><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l625"><spanclass=cF4>MSRs</span></a><spanclass=cF2>.</span><spanclass=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><spanclass=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><ahref="https://zeal-operating-system.github.io/ZealOS/Kernel/KernelA.HH.html#l3970"><spanclass=cF4>CTask</span></a><spanclass=cF2>.</span><spanclass=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><spanclass=cF0>