X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-tools%2Flib%2Fao-hex.h;h=eb510ba2a18321dc2614f8ac17a3adcb3f14e7b4;hp=8528eb458689b2ebc615d18a3dd11d0534eca289;hb=0223fced2c6d2b9f63ede6258afae46c3f55c200;hpb=95a8180f3d7929dbad65c80421f99c925f245af0 diff --git a/ao-tools/lib/ao-hex.h b/ao-tools/lib/ao-hex.h index 8528eb45..eb510ba2 100644 --- a/ao-tools/lib/ao-hex.h +++ b/ao-tools/lib/ao-hex.h @@ -19,6 +19,8 @@ #define _AO_HEX_H_ #include +#include +#include #define AO_HEX_RECORD_NORMAL 0x00 #define AO_HEX_RECORD_EOF 0x01 @@ -47,6 +49,13 @@ struct ao_hex_image { uint8_t data[0]; }; +struct ao_sym { + unsigned addr; + char *name; + bool required; + bool found; +}; + struct ao_hex_file * ao_hex_file_read(FILE *file, char *name); @@ -60,9 +69,13 @@ void ao_hex_image_free(struct ao_hex_image *image); struct ao_hex_image * -ao_hex_load(char *filename); +ao_hex_load(char *filename, struct ao_sym **symbols, int *num_symbols); int ao_hex_image_equal(struct ao_hex_image *a, struct ao_hex_image *b); +bool +ao_hex_save(FILE *file, struct ao_hex_image *image, + struct ao_sym *symbols, int num_symbols); + #endif /* _AO_HEX_H_ */