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

srecload.c File Reference

load symbol-srec files More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "srec.h"
#include "srecload.h"

Go to the source code of this file.

Defines

#define IMG_LOWEST   0x0000
#define IMG_HIGHEST   0xffff
#define IMG_MAXSIZE   0x10000

Functions

int symbols_load (image_t *img, FILE *file)
 load symbols from symbolsrec file
void image_load (image_t *img, const char *filename)
 load an RCX s-record file and return its image


Detailed Description

load symbol-srec files

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

Definition in file srecload.c.


Define Documentation

#define IMG_HIGHEST   0xffff
 

Definition at line 50 of file srecload.c.

#define IMG_LOWEST   0x0000
 

Definition at line 49 of file srecload.c.

#define IMG_MAXSIZE   0x10000
 

Definition at line 51 of file srecload.c.


Function Documentation

void image_load image_t img,
const char *  filename
 

load an RCX s-record file and return its image

Parameters:
filename file to load
img image to store to

Definition at line 158 of file srecload.c.

References srec_t::addr, image_t::base, calloc(), srec_t::count, srec_t::data, image_t::data_size, exit(), memcpy(), image_t::offset, S_INVALID_CHAR, S_INVALID_CKSUM, S_INVALID_HDR, S_INVALID_TYPE, S_NULL, S_TOO_LONG, S_TOO_SHORT, srec_decode(), symbols_load(), image_t::text, image_t::text_size, and srec_t::type.

Referenced by main().

int symbols_load image_t img,
FILE *  file
[static]
 

load symbols from symbolsrec file

Returns:
current line in file
the symbol section is enclosed in $$ symbol line format is SYMBOL $ADDR

Definition at line 60 of file srecload.c.

References image_t::base, image_t::bss_size, image_t::data_size, exit(), NULL, image_t::offset, strcmp(), and image_t::text_size.

Referenced by image_load().


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