home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
misc
/
volume15
/
upm
/
part01
/
lh.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-12-17
|
373b
|
29 lines
/*
Load .HEX format file into Z-80 memory.
*/
/* #include <stdio.h> */
#define NULL 0
#include <strings.h>
#include <ctype.h>
#include "z80.h"
BYTE hexval(),hex_byte(),csum();
BYTE hexval(c)
char c;
{
char *l;
static char digits[]="0123456789ABCDEF";
if (islower(c))
c=toupper(c);
l=index(digits,c);
if (l==NULL)
return 255;
return l-digits;
}