// configurable tokens
#define ULAS_TOK_COMMENT ';'
// start of as directives such as .org
-#define ULAS_TOK_ASDIR_BEGIN '.'
+#define ULAS_TOK_ASMDIR_BEGIN '.'
// start of preprocessor directives such as #define or #include
#define ULAS_TOK_PREPROC_BEGIN '#'
*/
int ulas_asmline(FILE *dst, FILE *src, const char *line, size_t n) {
+ // const char *start = line;
int rc = 0;
fprintf(dst, "%s", line);
// read the first token and decide
+ ulas_tok(&ulas.tok, &line, n);
+
+ if (ulas.tok.buf[0] == ULAS_TOK_ASMDIR_BEGIN) {
+ // is directive!
+ puts("Directive");
+ } else {
+ // is regular line in form of [label:] instruction ; comment
+ }
return rc;
}