Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

lx.h File Reference

BrickOS executable file support. More...

Go to the source code of this file.

Data Structures

struct  lx_t

Defines

#define HEADER_FIELDS   8
 number of header fields stored on disk

Functions

int lx_write (const lx_t *lx, const unsigned char *filename)
 write a BrickOS exectutable to a file
int lx_read (lx_t *lx, const unsigned char *filename)
 read a BrickOS executable from a file
void lx_relocate (lx_t *lx, unsigned short base)
 relocate a BrickOS executable to a new base address (may be called repeatedly).


Detailed Description

BrickOS executable file support.

Author:
Markus L. Noga <markus@noga.de>

Definition in file lx.h.


Define Documentation

#define HEADER_FIELDS   8
 

number of header fields stored on disk

Definition at line 29 of file lx.h.


Function Documentation

int lx_read lx_t lx,
const unsigned char *  filename
 

read a BrickOS 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().

void lx_relocate lx_t lx,
unsigned short  base
 

relocate a BrickOS 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().

int lx_write const lx_t lx,
const unsigned char *  filename
 

write a BrickOS 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().


Generated on Fri Feb 25 08:02:45 2005 for brickos by  doxygen 1.3.9.1