WIP: assembly step
authorLukas Krickl <lukas@krickl.dev>
Mon, 13 Nov 2023 13:03:02 +0000 (14:03 +0100)
committerLukas Krickl <lukas@krickl.dev>
Mon, 13 Nov 2023 13:03:02 +0000 (14:03 +0100)
include/ulas.h
src/ulas.c

index 6fe20a95b3debc1863751343a3d7c4d2ec626dbd..b1df17707f7201e079669d50e42a5ac6edf88b6b 100644 (file)
@@ -281,7 +281,8 @@ int ulas_preprocnext(struct ulas_preproc *pp, FILE *dst, FILE *src, char *buf,
 //          -1 on error
 //  Warning: calling this recursively may clobber pp buffers and those should
 //  not be used in the caller after recursvion finishes!
-//  or initialize a new preproc object if the old state is important! (preprocinit and preprocfree)
+//  or initialize a new preproc object if the old state is important!
+//  (preprocinit and preprocfree)
 int ulas_preprocline(struct ulas_preproc *pp, FILE *dst, FILE *src,
                      const char *raw_line, size_t n);
 
@@ -289,4 +290,10 @@ int ulas_preprocline(struct ulas_preproc *pp, FILE *dst, FILE *src,
 char *ulas_preprocexpand(struct ulas_preproc *pp, const char *raw_line,
                          size_t *n);
 
+/**
+ * Assembly step 
+ */
+
+int ulas_asm(FILE *dst, FILE *src);
+
 #endif
index 10851b6593865ea09ab81d1c36f95099ffb56e42..8aca72d9d1bf7551e3e2f405a68680c674568460 100644 (file)
@@ -72,7 +72,8 @@ int ulas_main(struct ulas_config cfg) {
     goto cleanup;
   }
 
-  // TODO: rest of steps here
+  fseek(preprocdst, 0, SEEK_SET);
+  rc = ulas_asm(ulasout, preprocdst);
 
 cleanup:
   if (!cfg.preproc_only) {
@@ -683,3 +684,13 @@ int ulas_preproc(FILE *dst, FILE *src) {
 
   return rc;
 }
+
+/**
+ * Assembly step
+ */
+
+int ulas_asm(FILE *dst, FILE *src) {
+  int rc = 0;
+
+  return rc;
+}