<!DOCTYPE html> <html lang="en"> <head> <title>Asuro: util</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="generator" content="PasDoc 0.15.0"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <link rel="stylesheet" type="text/css" href="tipuesearch/tipuesearch.css"> <link rel="StyleSheet" type="text/css" href="pasdoc.css"> </head> <body> <table class="container"><tr><td class="navigation"> <h2>Asuro</h2><p><a href="AllUnits.html" class="navigation">Units</a></p><p><a href="ClassHierarchy.html" class="navigation">Class Hierarchy</a></p><p><a href="AllClasses.html" class="navigation">Classes, Interfaces, Objects and Records</a></p><p><a href="AllTypes.html" class="navigation">Types</a></p><p><a href="AllVariables.html" class="navigation">Variables</a></p><p><a href="AllConstants.html" class="navigation">Constants</a></p><p><a href="AllFunctions.html" class="navigation">Functions and Procedures</a></p><p><a href="AllIdentifiers.html" class="navigation">Identifiers</a></p><p><a href="GVUses.png" class="navigation">Unit dependency graph</a></p><form class="search-form" action="_tipue_results.html"><div class="search-input"><input type="text" name="q" id="tipue_search_input"></div><div class="search-button"><input type="button" id="tipue_search_button" onclick="this.form.submit();"></div></form> <div style="clear: both"></div> <script type="text/javascript"> $(document).ready(function() { $('#tipue_search_input').tipuesearch({ /* 10 items to display seems standard */ 'show': 10, /* For PasDoc docs, showing urls is not very useful, since the page title already shows the unit and identifier. */ 'showURL': false }); }); </script> </td><td class="content"> <h1 class="unit">Unit util</h1> <div class="sections"> <div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Uses">Uses</a></div><div class="one_section">Classes, Interfaces, Objects and Records</div><div class="one_section"><a class="section" href="#PasDoc-FuncsProcs">Functions and Procedures</a></div><div class="one_section">Types</div><div class="one_section">Constants</div><div class="one_section"><a class="section" href="#PasDoc-Variables">Variables</a></div></div> <span id="PasDoc-Description"></span><h2 class="description">Description</h2> <p> Include-><code>Util</code> - Data Manipulation Utlities. <p></p> <span id="PasDoc-Uses"></span><h2 class="uses">Uses</h2> <ul class="useslist"><li><a href="bios_data_area.html">bios_data_area</a></li><li><a href="tracer.html">tracer</a></li></ul><h2 class="overview">Overview</h2> <span id="PasDoc-FuncsProcs"></span><h3 class="summary">Functions and Procedures</h3> <table class="summary wide_list"> <tr class="list"> <td class="itemcode"><code>function <b><a href="util.html#INTE">INTE</a></b> : boolean;</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>procedure <b><a href="util.html#CLI">CLI</a></b>();</code></td> </tr> <tr class="list"> <td class="itemcode"><code>procedure <b><a href="util.html#STI">STI</a></b>();</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>procedure <b><a href="util.html#GPF">GPF</a></b>();</code></td> </tr> <tr class="list"> <td class="itemcode"><code>function <b><a href="util.html#hi">hi</a></b>(b : <a href="system.html#uInt8">uint8</a>) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>function <b><a href="util.html#lo">lo</a></b>(b : <a href="system.html#uInt8">uint8</a>) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr class="list"> <td class="itemcode"><code>function <b><a href="util.html#switchendian">switchendian</a></b>(b : <a href="system.html#uInt8">uint8</a>) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>function <b><a href="util.html#switchendian32">switchendian32</a></b>(b : <a href="system.html#uInt32">uint32</a>) : <a href="system.html#uInt32">uint32</a>;</code></td> </tr> <tr class="list"> <td class="itemcode"><code>function <b><a href="util.html#getWord">getWord</a></b>(i : <a href="system.html#uInt32">uint32</a>; hi : boolean) : <a href="system.html#uInt16">uint16</a>;</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>function <b><a href="util.html#getByte">getByte</a></b>(i : <a href="system.html#uInt32">uint32</a>; index : <a href="system.html#uInt8">uint8</a>) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr class="list"> <td class="itemcode"><code>procedure <b><a href="util.html#outb">outb</a></b>(port : <a href="system.html#uInt16">uint16</a>; val : <a href="system.html#uInt8">uint8</a>);</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>procedure <b><a href="util.html#outw">outw</a></b>(port : <a href="system.html#uInt16">uint16</a>; val : <a href="system.html#uInt16">uint16</a>);</code></td> </tr> <tr class="list"> <td class="itemcode"><code>procedure <b><a href="util.html#outl">outl</a></b>(port : <a href="system.html#uInt16">uint16</a>; val : <a href="system.html#uInt32">uint32</a>);</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>function <b><a href="util.html#inb">inb</a></b>(port : <a href="system.html#uInt16">uint16</a>) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr class="list"> <td class="itemcode"><code>function <b><a href="util.html#inw">inw</a></b>(port : <a href="system.html#uInt16">uint16</a>) : <a href="system.html#uInt16">uint16</a>;</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>function <b><a href="util.html#inl">inl</a></b>(port : <a href="system.html#uInt16">uint16</a>) : <a href="system.html#uInt32">uint32</a>;</code></td> </tr> <tr class="list"> <td class="itemcode"><code>procedure <b><a href="util.html#io_wait">io_wait</a></b>;</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>procedure <b><a href="util.html#memset">memset</a></b>(location : <a href="system.html#uInt32">uint32</a>; value : <a href="system.html#uInt8">uint8</a>; size : <a href="system.html#uInt32">uint32</a>);</code></td> </tr> <tr class="list"> <td class="itemcode"><code>procedure <b><a href="util.html#memcpy">memcpy</a></b>(source : <a href="system.html#uInt32">uint32</a>; dest : <a href="system.html#uInt32">uint32</a>; size : <a href="system.html#uInt32">uint32</a>);</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>procedure <b><a href="util.html#printmemory">printmemory</a></b>(source : <a href="system.html#uInt32">uint32</a>; length : <a href="system.html#uInt32">uint32</a>; col : <a href="system.html#uInt32">uint32</a>; delim : <a href="system.html#pchar">PChar</a>; offset_row : boolean);</code></td> </tr> <tr class="list"> <td class="itemcode"><code>procedure <b><a href="util.html#printmemoryWND">printmemoryWND</a></b>(source : <a href="system.html#uInt32">uint32</a>; length : <a href="system.html#uInt32">uint32</a>; col : <a href="system.html#uInt32">uint32</a>; delim : <a href="system.html#pchar">PChar</a>; offset_row : boolean; WND : <a href="system.html#HWND">HWND</a>);</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>procedure <b><a href="util.html#halt_and_catch_fire">halt_and_catch_fire</a></b>();</code></td> </tr> <tr class="list"> <td class="itemcode"><code>procedure <b><a href="util.html#halt_and_dont_catch_fire">halt_and_dont_catch_fire</a></b>();</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>procedure <b><a href="util.html#BSOD">BSOD</a></b>(fault : <a href="system.html#pchar">pchar</a>; info : <a href="system.html#pchar">pchar</a>);</code></td> </tr> <tr class="list"> <td class="itemcode"><code>procedure <b><a href="util.html#psleep">psleep</a></b>(t : <a href="system.html#uInt16">uint16</a>);</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>procedure <b><a href="util.html#sleep">sleep</a></b>(seconds : <a href="system.html#uInt32">uint32</a>);</code></td> </tr> <tr class="list"> <td class="itemcode"><code>function <b><a href="util.html#get16bitcounter">get16bitcounter</a></b> : <a href="system.html#uInt16">uint16</a>;</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>function <b><a href="util.html#get32bitcounter">get32bitcounter</a></b> : <a href="system.html#uInt32">uint32</a>;</code></td> </tr> <tr class="list"> <td class="itemcode"><code>function <b><a href="util.html#get64bitcounter">get64bitcounter</a></b> : <a href="system.html#uInt64">uint64</a>;</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>function <b><a href="util.html#getTSC">getTSC</a></b> : <a href="system.html#uInt64">uint64</a>;</code></td> </tr> <tr class="list"> <td class="itemcode"><code>function <b><a href="util.html#div6432">div6432</a></b>(dividend : <a href="system.html#uInt64">uint64</a>; divisor : <a href="system.html#uInt32">uint32</a>) : <a href="system.html#uInt64">uint64</a>;</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>function <b><a href="util.html#BCDToUint8">BCDToUint8</a></b>(bcd : <a href="system.html#uInt8">uint8</a>) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr class="list"> <td class="itemcode"><code>function <b><a href="util.html#HexCharToDecimal">HexCharToDecimal</a></b>(hex : char) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>procedure <b><a href="util.html#resetSystem">resetSystem</a></b>();</code></td> </tr> <tr class="list"> <td class="itemcode"><code>function <b><a href="util.html#getESP">getESP</a></b> : <a href="system.html#uInt32">uint32</a>;</code></td> </tr> <tr class="list2"> <td class="itemcode"><code>function <b><a href="util.html#MsSinceSystemBoot">MsSinceSystemBoot</a></b> : <a href="system.html#uInt64">uint64</a>;</code></td> </tr> </table> <span id="PasDoc-Variables"></span><h3 class="summary">Variables</h3> <table class="summary wide_list"> <tr class="list"> <td class="itemcode"><code><b><a href="util.html#endptr">endptr</a></b>: <a href="system.html#uInt32">uint32</a>; external name '__end';</code></td> </tr> <tr class="list2"> <td class="itemcode"><code><b><a href="util.html#stack">stack</a></b>: <a href="system.html#uInt32">uint32</a>; external name 'KERNEL_STACK';</code></td> </tr> </table> <h2 class="description">Description</h2> <h3 class="detail">Functions and Procedures</h3> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="INTE"></span><code>function <b>INTE</b> : boolean;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="CLI"></span><code>procedure <b>CLI</b>();</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="STI"></span><code>procedure <b>STI</b>();</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="GPF"></span><code>procedure <b>GPF</b>();</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="hi"></span><code>function <b>hi</b>(b : <a href="system.html#uInt8">uint8</a>) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="lo"></span><code>function <b>lo</b>(b : <a href="system.html#uInt8">uint8</a>) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="switchendian"></span><code>function <b>switchendian</b>(b : <a href="system.html#uInt8">uint8</a>) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="switchendian32"></span><code>function <b>switchendian32</b>(b : <a href="system.html#uInt32">uint32</a>) : <a href="system.html#uInt32">uint32</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="getWord"></span><code>function <b>getWord</b>(i : <a href="system.html#uInt32">uint32</a>; hi : boolean) : <a href="system.html#uInt16">uint16</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="getByte"></span><code>function <b>getByte</b>(i : <a href="system.html#uInt32">uint32</a>; index : <a href="system.html#uInt8">uint8</a>) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="outb"></span><code>procedure <b>outb</b>(port : <a href="system.html#uInt16">uint16</a>; val : <a href="system.html#uInt8">uint8</a>);</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="outw"></span><code>procedure <b>outw</b>(port : <a href="system.html#uInt16">uint16</a>; val : <a href="system.html#uInt16">uint16</a>);</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="outl"></span><code>procedure <b>outl</b>(port : <a href="system.html#uInt16">uint16</a>; val : <a href="system.html#uInt32">uint32</a>);</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="inb"></span><code>function <b>inb</b>(port : <a href="system.html#uInt16">uint16</a>) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="inw"></span><code>function <b>inw</b>(port : <a href="system.html#uInt16">uint16</a>) : <a href="system.html#uInt16">uint16</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="inl"></span><code>function <b>inl</b>(port : <a href="system.html#uInt16">uint16</a>) : <a href="system.html#uInt32">uint32</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="io_wait"></span><code>procedure <b>io_wait</b>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="memset"></span><code>procedure <b>memset</b>(location : <a href="system.html#uInt32">uint32</a>; value : <a href="system.html#uInt8">uint8</a>; size : <a href="system.html#uInt32">uint32</a>);</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="memcpy"></span><code>procedure <b>memcpy</b>(source : <a href="system.html#uInt32">uint32</a>; dest : <a href="system.html#uInt32">uint32</a>; size : <a href="system.html#uInt32">uint32</a>);</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="printmemory"></span><code>procedure <b>printmemory</b>(source : <a href="system.html#uInt32">uint32</a>; length : <a href="system.html#uInt32">uint32</a>; col : <a href="system.html#uInt32">uint32</a>; delim : <a href="system.html#pchar">PChar</a>; offset_row : boolean);</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="printmemoryWND"></span><code>procedure <b>printmemoryWND</b>(source : <a href="system.html#uInt32">uint32</a>; length : <a href="system.html#uInt32">uint32</a>; col : <a href="system.html#uInt32">uint32</a>; delim : <a href="system.html#pchar">PChar</a>; offset_row : boolean; WND : <a href="system.html#HWND">HWND</a>);</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="halt_and_catch_fire"></span><code>procedure <b>halt_and_catch_fire</b>();</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="halt_and_dont_catch_fire"></span><code>procedure <b>halt_and_dont_catch_fire</b>();</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="BSOD"></span><code>procedure <b>BSOD</b>(fault : <a href="system.html#pchar">pchar</a>; info : <a href="system.html#pchar">pchar</a>);</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="psleep"></span><code>procedure <b>psleep</b>(t : <a href="system.html#uInt16">uint16</a>);</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="sleep"></span><code>procedure <b>sleep</b>(seconds : <a href="system.html#uInt32">uint32</a>);</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="get16bitcounter"></span><code>function <b>get16bitcounter</b> : <a href="system.html#uInt16">uint16</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="get32bitcounter"></span><code>function <b>get32bitcounter</b> : <a href="system.html#uInt32">uint32</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="get64bitcounter"></span><code>function <b>get64bitcounter</b> : <a href="system.html#uInt64">uint64</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="getTSC"></span><code>function <b>getTSC</b> : <a href="system.html#uInt64">uint64</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="div6432"></span><code>function <b>div6432</b>(dividend : <a href="system.html#uInt64">uint64</a>; divisor : <a href="system.html#uInt32">uint32</a>) : <a href="system.html#uInt64">uint64</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="BCDToUint8"></span><code>function <b>BCDToUint8</b>(bcd : <a href="system.html#uInt8">uint8</a>) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="HexCharToDecimal"></span><code>function <b>HexCharToDecimal</b>(hex : char) : <a href="system.html#uInt8">uint8</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="resetSystem"></span><code>procedure <b>resetSystem</b>();</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="getESP"></span><code>function <b>getESP</b> : <a href="system.html#uInt32">uint32</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="MsSinceSystemBoot"></span><code>function <b>MsSinceSystemBoot</b> : <a href="system.html#uInt64">uint64</a>;</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <h3 class="detail">Variables</h3> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="endptr"></span><code><b>endptr</b>: <a href="system.html#uInt32">uint32</a>; external name '__end';</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <table class="detail wide_list"> <tr class="list"> <td class="itemcode"><span id="stack"></span><code><b>stack</b>: <a href="system.html#uInt32">uint32</a>; external name 'KERNEL_STACK';</code></td> </tr> <tr><td colspan="1"> </td></tr> </table> <h2 class="authors">Author</h2> <ul class="authors"> <li>Kieron Morris <<a href="mailto:kjm@kieronmorris.me">kjm@kieronmorris.me</a>></li> </ul> <hr><span class="appinfo"><em>Generated by <a href="https://github.com/pasdoc/pasdoc/wiki">PasDoc 0.15.0</a>. </em> </span> </td></tr></table></body></html>