<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16">
  <compounddef id="video_8c" kind="file" language="C++">
    <compoundname>video.c</compoundname>
    <includes refid="io_8h" local="no">sys/io.h</includes>
    <includes refid="video_8h" local="no">sys/video.h</includes>
    <includes refid="spinlock_8h" local="no">ubixos/spinlock.h</includes>
    <includes refid="tty_8h" local="no">ubixos/tty.h</includes>
    <incdepgraph>
      <node id="3">
        <label>sys/video.h</label>
        <link refid="video_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
      <node id="12">
        <label>ubixos/tty.h</label>
        <link refid="tty_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="6">
        <label>sys/select.h</label>
        <link refid="select_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>ubixos/spinlock.h</label>
        <link refid="spinlock_8h"/>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="10">
        <label>sys/_sigset.h</label>
        <link refid="__sigset_8h"/>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/sys/video.c</label>
        <link refid="video_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>sys/types.h</label>
        <link refid="include_2sys_2types_8h"/>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="5">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="8">
        <label>sys/_timespec.h</label>
        <link refid="__timespec_8h"/>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="9">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="var">
      <memberdef kind="variable" id="video_8c_1aa6d08b2dd961295607e6a5d52f1d471e" prot="public" static="no" mutable="no">
        <type>int</type>
        <definition>int printColor</definition>
        <argsstring></argsstring>
        <name>printColor</name>
        <initializer>= <ref refid="video_8h_1a2984c3db0ad3a4a571a8ee0b4d2fe90b" kindref="member">defaultColor</ref></initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/sys/video.c" line="35" column="5" bodyfile="C:/Dev/git/UbixOS/sys/sys/video.c" bodystart="35" bodyend="-1"/>
        <referencedby refid="vfs__calls_8c_1a159495d16f0ec154193733ad4fb1fc71" compoundref="vfs__calls_8c" startline="293" endline="364">sys_write</referencedby>
      </memberdef>
      <memberdef kind="variable" id="video_8c_1a47ec71507e9b790e7dfdd9e641c4541f" prot="public" static="yes" mutable="no">
        <type>unsigned char *</type>
        <definition>unsigned char* videoBuffer</definition>
        <argsstring></argsstring>
        <name>videoBuffer</name>
        <initializer>= (unsigned char *) 0xB8000</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/sys/video.c" line="34" column="22" bodyfile="C:/Dev/git/UbixOS/sys/sys/video.c" bodystart="34" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="video_8c_1a05d079fd6b2d61320ad423e5c918903c" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void backSpace</definition>
        <argsstring>()</argsstring>
        <name>backSpace</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/sys/video.c" line="37" column="6" bodyfile="C:/Dev/git/UbixOS/sys/sys/video.c" bodystart="37" bodyend="56"/>
        <references refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" compoundref="io_8c" startline="38" endline="46">inportByte</references>
        <references refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" compoundref="io_8c" startline="72" endline="78">outportByte</references>
      </memberdef>
      <memberdef kind="function" id="video_8c_1a9d7e8af417b6d543da691e9c0e2f6f9f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void clearScreen</definition>
        <argsstring>()</argsstring>
        <name>clearScreen</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/sys/video.c" line="109" column="6" bodyfile="C:/Dev/git/UbixOS/sys/sys/video.c" bodystart="109" bodyend="120"/>
      </memberdef>
      <memberdef kind="function" id="video_8c_1a5429378b96a24fadfd2d1f8d777eb95a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void kprint</definition>
        <argsstring>(char *string)</argsstring>
        <name>kprint</name>
        <param>
          <type>char *</type>
          <declname>string</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/sys/video.c" line="58" column="6" bodyfile="C:/Dev/git/UbixOS/sys/sys/video.c" bodystart="58" bodyend="106"/>
        <references refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" compoundref="io_8c" startline="38" endline="46">inportByte</references>
        <references refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" compoundref="fat__string_8h" startline="17">NULL</references>
        <references refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" compoundref="io_8c" startline="72" endline="78">outportByte</references>
        <references refid="tty_8h_1a4f96ccac7e60296ef496008d8cbed0ff" compoundref="tty_8c" startline="167" endline="169">tty_find</references>
        <references refid="tty_8h_1aafbb5679104334c34d7691b2de7d7a86" compoundref="tty_8c" startline="38">tty_foreground</references>
        <references refid="tty_8h_1ad96f57a7c113d3cfa76ee5fed6de33c0" compoundref="tty_8c" startline="115" endline="165">tty_print</references>
        <referencedby refid="kprintf_8c_1ab2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="259" endline="276">kprintf</referencedby>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*-</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2002-2018<sp/>The<sp/>UbixOS<sp/>Project.</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="4"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>*<sp/>This<sp/>was<sp/>developed<sp/>by<sp/>Christopher<sp/>W.<sp/>Olsen<sp/>for<sp/>the<sp/>UbixOS<sp/>Project.</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,<sp/>are<sp/>permitted</highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/>1)<sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors.</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/>2)<sp/>Redistributions<sp/>in<sp/>binary<sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors<sp/>in<sp/>the<sp/>documentation<sp/>and/or</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/>3)<sp/>Neither<sp/>the<sp/>name<sp/>of<sp/>the<sp/>UbixOS<sp/>Project<sp/>nor<sp/>the<sp/>names<sp/>of<sp/>its<sp/>contributors<sp/>may<sp/>be<sp/>used<sp/>to</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>endorse<sp/>or<sp/>promote<sp/>products<sp/>derived<sp/>from<sp/>this<sp/>software<sp/>without<sp/>specific<sp/>prior<sp/>written</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>permission.</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>AND<sp/>CONTRIBUTORS<sp/>&quot;AS<sp/>IS&quot;<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>COPYRIGHT<sp/>OWNER<sp/>OR<sp/>CONTRIBUTORS</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>*<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT<sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>*<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN</highlight></codeline>
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT</highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="27"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="io_8h" kindref="compound">sys/io.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="video_8h" kindref="compound">sys/video.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="spinlock_8h" kindref="compound">ubixos/spinlock.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="tty_8h" kindref="compound">ubixos/tty.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*videoBuffer<sp/>=<sp/>(</highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)<sp/>0xB8000;</highlight></codeline>
<codeline lineno="35" refid="video_8c_1aa6d08b2dd961295607e6a5d52f1d471e" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="video_8c_1aa6d08b2dd961295607e6a5d52f1d471e" kindref="member">printColor</ref><sp/>=<sp/><ref refid="video_8h_1a2984c3db0ad3a4a571a8ee0b4d2fe90b" kindref="member">defaultColor</ref>;</highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight></codeline>
<codeline lineno="37" refid="video_8c_1a05d079fd6b2d61320ad423e5c918903c" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="video_8c_1a05d079fd6b2d61320ad423e5c918903c" kindref="member">backSpace</ref>()<sp/>{</highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><ref refid="objgfx30_8h_1ada085051a6d9a8e00a2cb256d1af14ba" kindref="member">uInt32</ref><sp/>bufferOffset<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3d4,<sp/>0x0e);</highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/>bufferOffset<sp/>=<sp/><ref refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(0x3d5);</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/>bufferOffset<sp/>&lt;&lt;=<sp/>0x8;<sp/></highlight><highlight class="comment">/*<sp/>Shift<sp/>Address<sp/>Left<sp/>8<sp/>Bits<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3d4,<sp/>0x0f);</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/>bufferOffset<sp/>+=<sp/><ref refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(0x3d5);</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/>bufferOffset<sp/>&lt;&lt;=<sp/>0x1;<sp/></highlight><highlight class="comment">/*<sp/>Shift<sp/>Address<sp/>Left<sp/>1<sp/>Bits<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/>videoBuffer[bufferOffset--]<sp/>=<sp/>0x20;</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/>videoBuffer[bufferOffset--]<sp/>=<sp/><ref refid="video_8c_1aa6d08b2dd961295607e6a5d52f1d471e" kindref="member">printColor</ref>;</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/>videoBuffer[bufferOffset]<sp/>=<sp/>0x20;</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/>bufferOffset<sp/>&gt;&gt;=<sp/>0x1;</highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><ref refid="tty_8h_1aafbb5679104334c34d7691b2de7d7a86" kindref="member">tty_foreground</ref>-&gt;<ref refid="structtty__termNode_1a22e444939c17fda952c5924c8780aa8b" kindref="member">tty_x</ref><sp/>=<sp/>(bufferOffset<sp/>&amp;<sp/>0xFF);</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><ref refid="tty_8h_1aafbb5679104334c34d7691b2de7d7a86" kindref="member">tty_foreground</ref>-&gt;<ref refid="structtty__termNode_1a9440a0dd6d9f9402e84725a303946bb9" kindref="member">tty_y</ref><sp/>=<sp/>(bufferOffset<sp/>&gt;&gt;<sp/>0x8);</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D4,<sp/>0x0f);</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D5,<sp/><ref refid="tty_8h_1aafbb5679104334c34d7691b2de7d7a86" kindref="member">tty_foreground</ref>-&gt;<ref refid="structtty__termNode_1a22e444939c17fda952c5924c8780aa8b" kindref="member">tty_x</ref>);</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D4,<sp/>0x0e);</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D5,<sp/><ref refid="tty_8h_1aafbb5679104334c34d7691b2de7d7a86" kindref="member">tty_foreground</ref>-&gt;<ref refid="structtty__termNode_1a9440a0dd6d9f9402e84725a303946bb9" kindref="member">tty_y</ref>);</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="56"><highlight class="normal">}</highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight></codeline>
<codeline lineno="58" refid="video_8c_1a5429378b96a24fadfd2d1f8d777eb95a" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="video_8c_1a5429378b96a24fadfd2d1f8d777eb95a" kindref="member">kprint</ref>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*</highlight><highlight class="keywordtype">string</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="59"><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>bufferOffset<sp/>=<sp/>0x0,<sp/>character<sp/>=<sp/>0x0,<sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Short<sp/>circuit<sp/>if<sp/>we&apos;re<sp/>in<sp/>tty<sp/>mode<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref><sp/>!=<sp/><ref refid="tty_8h_1aafbb5679104334c34d7691b2de7d7a86" kindref="member">tty_foreground</ref>)<sp/>{</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="tty_8h_1ad96f57a7c113d3cfa76ee5fed6de33c0" kindref="member">tty_print</ref>(</highlight><highlight class="keywordtype">string</highlight><highlight class="normal">,<sp/><ref refid="tty_8h_1a4f96ccac7e60296ef496008d8cbed0ff" kindref="member">tty_find</ref>(0));</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="67"><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>We<sp/>Need<sp/>To<sp/>Get<sp/>The<sp/>Y<sp/>Position<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D4,<sp/>0x0e);</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/>bufferOffset<sp/>=<sp/><ref refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(0x3D5);</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/>bufferOffset<sp/>&lt;&lt;=<sp/>8;<sp/></highlight><highlight class="comment">/*<sp/>Shift<sp/>Address<sp/>Left<sp/>8<sp/>Bits<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Then<sp/>We<sp/>Need<sp/>To<sp/>Add<sp/>The<sp/>X<sp/>Position<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D4,<sp/>0x0f);</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/>bufferOffset<sp/>+=<sp/><ref refid="io_8h_1a77b934268de1b3ecdcf3f275413b3108" kindref="member">inportByte</ref>(0x3D5);</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/>bufferOffset<sp/>&lt;&lt;=<sp/>1;<sp/></highlight><highlight class="comment">/*<sp/>Shift<sp/>Address<sp/>Left<sp/>1<sp/>Bits<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="76"><highlight class="normal"></highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>((character<sp/>=<sp/>*</highlight><highlight class="keywordtype">string</highlight><highlight class="normal">++))<sp/>{</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(character)<sp/>{</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/></highlight><highlight class="charliteral">&apos;\n&apos;</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>bufferOffset<sp/>=<sp/>(bufferOffset<sp/>/<sp/>160)<sp/>*<sp/>160<sp/>+<sp/>160;</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>videoBuffer[bufferOffset++]<sp/>=<sp/>character;</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>videoBuffer[bufferOffset++]<sp/>=<sp/><ref refid="video_8c_1aa6d08b2dd961295607e6a5d52f1d471e" kindref="member">printColor</ref>;</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="comment">/*<sp/>switch<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Check<sp/>To<sp/>See<sp/>If<sp/>We<sp/>Are<sp/>Out<sp/>Of<sp/>Bounds<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(bufferOffset<sp/>&gt;=<sp/>160<sp/>*<sp/>25)<sp/>{</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>160<sp/>*<sp/>24;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>videoBuffer[i]<sp/>=<sp/>videoBuffer[i<sp/>+<sp/>160];</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="comment">/*<sp/>for<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>80;<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>videoBuffer[(160<sp/>*<sp/>24)<sp/>+<sp/>(i<sp/>*<sp/>2)]<sp/>=<sp/>0x20;</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>videoBuffer[(160<sp/>*<sp/>24)<sp/>+<sp/>(i<sp/>*<sp/>2)<sp/>+<sp/>1]<sp/>=<sp/><ref refid="video_8c_1aa6d08b2dd961295607e6a5d52f1d471e" kindref="member">printColor</ref>;</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="comment">/*<sp/>for<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>bufferOffset<sp/>-=<sp/>160;</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="comment">/*<sp/>if<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="comment">/*<sp/>while<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/>bufferOffset<sp/>&gt;&gt;=<sp/>1;<sp/></highlight><highlight class="comment">/*<sp/>Set<sp/>the<sp/>new<sp/>cursor<sp/>position<sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D4,<sp/>0x0f);</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D5,<sp/>((bufferOffset<sp/>&amp;<sp/>0x0ff)<sp/>&amp;<sp/>0xFF));</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D4,<sp/>0x0e);</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D5,<sp/>((bufferOffset<sp/>&gt;&gt;<sp/>8)<sp/>&amp;<sp/>0xFF));</highlight></codeline>
<codeline lineno="104"><highlight class="normal"></highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="106"><highlight class="normal">}</highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight></codeline>
<codeline lineno="108"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Clears<sp/>The<sp/>Screen<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="109" refid="video_8c_1a9d7e8af417b6d543da691e9c0e2f6f9f" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="video_8c_1a9d7e8af417b6d543da691e9c0e2f6f9f" kindref="member">clearScreen</ref>()<sp/>{</highlight></codeline>
<codeline lineno="110"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">short</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="111"><highlight class="normal"></highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0x0;<sp/>i<sp/>&lt;<sp/>(80<sp/>*<sp/>25);<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/>videoBuffer[i<sp/>*<sp/>2]<sp/>=<sp/>0x20;</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/>videoBuffer[i<sp/>*<sp/>2<sp/>+<sp/>1]<sp/>=<sp/><ref refid="video_8h_1a2984c3db0ad3a4a571a8ee0b4d2fe90b" kindref="member">defaultColor</ref>;</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D4,<sp/>0x0f);</highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D5,<sp/>0);</highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D4,<sp/>0x0e);</highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/><ref refid="io_8h_1a8acc1a06073db2e7b92ffbd00fbd0cf1" kindref="member">outportByte</ref>(0x3D5,<sp/>0);</highlight></codeline>
<codeline lineno="120"><highlight class="normal">}</highlight></codeline>
<codeline lineno="121"><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline>
<codeline lineno="123"><highlight class="comment"><sp/>END</highlight></codeline>
<codeline lineno="124"><highlight class="comment"><sp/>***/</highlight><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/sys/video.c"/>
  </compounddef>
</doxygen>
