-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhexutl.h
More file actions
37 lines (24 loc) · 918 Bytes
/
hexutl.h
File metadata and controls
37 lines (24 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#if 0
===========================================================================
H E X U T L . H
Copyright 1989 Atari Games. All rights reserved.
Author: Lyle Rains
---------------------------------------------------------------------------
Revision history:
---------------------------------------------------------------------------
Known bugs/features/limitations:
===========================================================================
#endif
#ifndef HEXUTL_H
#define HEXUTL_H
#include "mixit.h"
#define HEXTOBYTE(hex) ((hex)[1] + ((hex)[0] << 4))
#define XX 0x7F
extern uint8_t chartohex[256];
extern uint8_t hex_of[16];
int strtobytes(uint8_t *str, int nbytes);
int strtohex(uint8_t *str, int nchars);
void hextobytes(uint8_t *hexstr, int nbytes);
LogicalAddr bytestoaddr(uint8_t *bytestr, int nbytes);
LogicalAddr hextoaddr(uint8_t *hexstr, int nnybbles);
#endif /* HEXUTL_H */