\section{util/dll-src/lx.h File Reference}
\label{lx_8h}\index{util/dll-src/lx.h@{util/dll-src/lx.h}}
Brick\-OS executable file support. 

\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct {\bf lx\_\-t}
\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf HEADER\_\-FIELDS}\ 8
\begin{CompactList}\small\item\em number of header fields stored on disk \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int {\bf lx\_\-write} (const {\bf lx\_\-t} $\ast$lx, const unsigned char $\ast$filename)
\begin{CompactList}\small\item\em write a Brick\-OS exectutable to a file \item\end{CompactList}\item 
int {\bf lx\_\-read} ({\bf lx\_\-t} $\ast$lx, const unsigned char $\ast$filename)
\begin{CompactList}\small\item\em read a Brick\-OS executable from a file \item\end{CompactList}\item 
void {\bf lx\_\-relocate} ({\bf lx\_\-t} $\ast$lx, unsigned short base)
\begin{CompactList}\small\item\em relocate a Brick\-OS executable to a new base address (may be called repeatedly). \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Brick\-OS executable file support. 

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


Definition in file {\bf lx.h}.

\subsection{Define Documentation}
\index{lx.h@{lx.h}!HEADER_FIELDS@{HEADER\_\-FIELDS}}
\index{HEADER_FIELDS@{HEADER\_\-FIELDS}!lx.h@{lx.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define HEADER\_\-FIELDS\ 8}\label{lx_8h_a0}


number of header fields stored on disk 



Definition at line 29 of file lx.h.

\subsection{Function Documentation}
\index{lx.h@{lx.h}!lx_read@{lx\_\-read}}
\index{lx_read@{lx\_\-read}!lx.h@{lx.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int lx\_\-read ({\bf lx\_\-t} $\ast$ {\em lx}, const unsigned char $\ast$ {\em filename})}\label{lx_8h_a2}


read a Brick\-OS executable from a file 



Definition at line 87 of file lx.c.

References ASSURED\_\-READ, lx\_\-t::data\_\-size, malloc(), lx\_\-t::num\_\-relocs, lx\_\-t::reloc, strcmp(), lx\_\-t::text, and lx\_\-t::text\_\-size.

Referenced by main().\index{lx.h@{lx.h}!lx_relocate@{lx\_\-relocate}}
\index{lx_relocate@{lx\_\-relocate}!lx.h@{lx.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void lx\_\-relocate ({\bf lx\_\-t} $\ast$ {\em lx}, unsigned short {\em base})}\label{lx_8h_a3}


relocate a Brick\-OS executable to a new base address (may be called repeatedly). 



Definition at line 139 of file lx.c.

References lx\_\-t::base, lx\_\-t::num\_\-relocs, lx\_\-t::reloc, and lx\_\-t::text.

Referenced by main().\index{lx.h@{lx.h}!lx_write@{lx\_\-write}}
\index{lx_write@{lx\_\-write}!lx.h@{lx.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int lx\_\-write (const {\bf lx\_\-t} $\ast$ {\em lx}, const unsigned char $\ast$ {\em filename})}\label{lx_8h_a1}


write a Brick\-OS exectutable to a file 



Definition at line 51 of file lx.c.

References ASSURED\_\-WRITE, lx\_\-t::data\_\-size, lx\_\-t::num\_\-relocs, lx\_\-t::reloc, lx\_\-t::text, and lx\_\-t::text\_\-size.

Referenced by main().