Character maps.

This commit is contained in:
stag019
2013-12-22 20:55:14 -05:00
parent fd4b5c8925
commit 1218da79a9
8 changed files with 252 additions and 2 deletions

18
include/asm/charmap.h Normal file
View File

@@ -0,0 +1,18 @@
#ifndef ASMOTOR_ASM_CHARMAP_H
#define ASMOTOR_ASM_CHARMAP_H
#define MAXCHARMAPS 512
#define CHARMAPLENGTH 8
struct Charmap {
int count;
char input[MAXCHARMAPS][CHARMAPLENGTH + 1];
char output[MAXCHARMAPS];
};
int readUTF8Char(char *destination, char *source);
void charmap_Sort();
int charmap_Add(char *input, UBYTE output);
int charmap_Convert(char **input);
#endif

View File

@@ -12,6 +12,7 @@ struct Section {
ULONG nBank;
struct Section *pNext;
struct Patch *pPatches;
struct Charmap *charmap;
UBYTE *tData;
};
@@ -20,6 +21,7 @@ void out_SetFileName(char *s);
void out_NewSection(char *pzName, ULONG secttype);
void out_NewAbsSection(char *pzName, ULONG secttype, SLONG org, SLONG bank);
void out_AbsByte(int b);
void out_AbsByteGroup(char *s, int length);
void out_RelByte(struct Expression * expr);
void out_RelWord(struct Expression * expr);
void out_PCRelByte(struct Expression * expr);