int main (int argc, char *argv[]) { printf("I'm here! FIXME\n"); if (argc != 3) { printf(help_string); exit(0); } FILE *f_source; FILE *f_destination; f_source = fopen(argv[1], "r"); f_destination = fopen(argv[2], "w"); assembleFile(f_source, f_destination); return 0; }
/* * print out a data block */ void PrintDataBlock(FILE *f, ParserState *P, int isBinary) { AST *ast; initDataOutput(isBinary); if (gl_errors != 0) return; for (ast = P->datblock; ast; ast = ast->right) { switch (ast->kind) { case AST_BYTELIST: outputAlignedDataList(f, 1, ast->left); break; case AST_WORDLIST: outputAlignedDataList(f, 2, ast->left); break; case AST_LONGLIST: outputAlignedDataList(f, 4, ast->left); break; case AST_INSTRHOLDER: assembleInstruction(f, ast->left); break; case AST_IDENTIFIER: /* just skip labels */ break; case AST_FILE: assembleFile(f, ast->left); break; case AST_ORG: case AST_RES: case AST_FIT: break; default: ERROR(ast, "unknown element in data block"); break; } } if (datacount != 0 && !isBinary) { fprintf(f, "\n"); } }