\section{include/sys/bitops.h File Reference}
\label{bitops_8h}\index{include/sys/bitops.h@{include/sys/bitops.h}}
Internal Interface: H8/300 bit operations. 

\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf ASMCONST}\ const
\item 
\#define {\bf bit\_\-set}(byte, bit)\ \_\-\_\-asm\_\-\_\- ASMCONST ( \char`\"{}bset \%0,@\%1$\backslash$n\char`\"{} : : \char`\"{}i\char`\"{} (bit),\char`\"{}r\char`\"{} (byte))
\begin{CompactList}\small\item\em set a single bit in memory \item\end{CompactList}\item 
\#define {\bf bit\_\-clear}(byte, bit)\ \_\-\_\-asm\_\-\_\- ASMCONST ( \char`\"{}bclr \%0,@\%1$\backslash$n\char`\"{} : : \char`\"{}i\char`\"{} (bit),\char`\"{}r\char`\"{} (byte))
\begin{CompactList}\small\item\em clear a single bit in memory \item\end{CompactList}\item 
\#define {\bf bit\_\-load}(mask, bit)\ \_\-\_\-asm\_\-\_\- ASMCONST ( \char`\"{}bld \%0,\%1l$\backslash$n\char`\"{} : : \char`\"{}i\char`\"{} (bit),\char`\"{}r\char`\"{} (mask):\char`\"{}cc\char`\"{})
\begin{CompactList}\small\item\em load a single bit from a mask to the carry flag \item\end{CompactList}\item 
\#define {\bf bit\_\-iload}(mask, bit)\ \_\-\_\-asm\_\-\_\- ASMCONST ( \char`\"{}bild \%0,\%1l$\backslash$n\char`\"{} : : \char`\"{}i\char`\"{} (bit),\char`\"{}r\char`\"{} (mask):\char`\"{}cc\char`\"{})
\begin{CompactList}\small\item\em load the inverse of a single bit from a mask to the carry flag \item\end{CompactList}\item 
\#define {\bf bit\_\-store}(byte, bit)\ \_\-\_\-asm\_\-\_\- ASMCONST ( \char`\"{}bst \%0,@\%1$\backslash$n\char`\"{} : : \char`\"{}i\char`\"{} (bit),\char`\"{}r\char`\"{} (byte))
\begin{CompactList}\small\item\em store the carry flag to a single single bit in memory \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Internal Interface: H8/300 bit operations. 

\begin{Desc}
\item[Author:]Markus L. Noga $<${\tt markus@noga.de}$>$\end{Desc}


Definition in file {\bf bitops.h}.

\subsection{Define Documentation}
\index{bitops.h@{bitops.h}!ASMCONST@{ASMCONST}}
\index{ASMCONST@{ASMCONST}!bitops.h@{bitops.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define ASMCONST\ const}\label{bitops_8h_a0}




Definition at line 45 of file bitops.h.\index{bitops.h@{bitops.h}!bit_clear@{bit\_\-clear}}
\index{bit_clear@{bit\_\-clear}!bitops.h@{bitops.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define bit\_\-clear(byte, bit)\ \_\-\_\-asm\_\-\_\- ASMCONST ( \char`\"{}bclr \%0,@\%1$\backslash$n\char`\"{} : : \char`\"{}i\char`\"{} (bit),\char`\"{}r\char`\"{} (byte))}\label{bitops_8h_a2}


clear a single bit in memory 

((char$\ast$)byte)\&=$\sim$(1$<$$<$bit) 

Definition at line 65 of file bitops.h.\index{bitops.h@{bitops.h}!bit_iload@{bit\_\-iload}}
\index{bit_iload@{bit\_\-iload}!bitops.h@{bitops.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define bit\_\-iload(mask, bit)\ \_\-\_\-asm\_\-\_\- ASMCONST ( \char`\"{}bild \%0,\%1l$\backslash$n\char`\"{} : : \char`\"{}i\char`\"{} (bit),\char`\"{}r\char`\"{} (mask):\char`\"{}cc\char`\"{})}\label{bitops_8h_a4}


load the inverse of a single bit from a mask to the carry flag 

carry=mask \& inverse of (1$<$$<$bit) 

Definition at line 77 of file bitops.h.\index{bitops.h@{bitops.h}!bit_load@{bit\_\-load}}
\index{bit_load@{bit\_\-load}!bitops.h@{bitops.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define bit\_\-load(mask, bit)\ \_\-\_\-asm\_\-\_\- ASMCONST ( \char`\"{}bld \%0,\%1l$\backslash$n\char`\"{} : : \char`\"{}i\char`\"{} (bit),\char`\"{}r\char`\"{} (mask):\char`\"{}cc\char`\"{})}\label{bitops_8h_a3}


load a single bit from a mask to the carry flag 

carry=mask \& (1$<$$<$bit) 

Definition at line 71 of file bitops.h.\index{bitops.h@{bitops.h}!bit_set@{bit\_\-set}}
\index{bit_set@{bit\_\-set}!bitops.h@{bitops.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define bit\_\-set(byte, bit)\ \_\-\_\-asm\_\-\_\- ASMCONST ( \char`\"{}bset \%0,@\%1$\backslash$n\char`\"{} : : \char`\"{}i\char`\"{} (bit),\char`\"{}r\char`\"{} (byte))}\label{bitops_8h_a1}


set a single bit in memory 

$\ast$((char$\ast$)byte)$|$=(1$<$$<$bit) 

Definition at line 59 of file bitops.h.\index{bitops.h@{bitops.h}!bit_store@{bit\_\-store}}
\index{bit_store@{bit\_\-store}!bitops.h@{bitops.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define bit\_\-store(byte, bit)\ \_\-\_\-asm\_\-\_\- ASMCONST ( \char`\"{}bst \%0,@\%1$\backslash$n\char`\"{} : : \char`\"{}i\char`\"{} (bit),\char`\"{}r\char`\"{} (byte))}\label{bitops_8h_a5}


store the carry flag to a single single bit in memory 

$\ast$((char$\ast$)byte)= ( ($\ast$((char$\ast$)byte)) \& ($\sim$(1$<$$<$bit)) ) $|$ (carry$<$$<$bit) 

Definition at line 83 of file bitops.h.