Mercurial > hg-old > index.cgi
diff src/pass2.c @ 43:b33eca135258
Added second pass code generation
author | lost |
---|---|
date | Sun, 04 Jan 2009 06:16:22 +0000 |
parents | 05d4115b4860 |
children | 2330b88f9600 |
line wrap: on
line diff
--- a/src/pass2.c Sun Jan 04 06:13:13 2009 +0000 +++ b/src/pass2.c Sun Jan 04 06:16:22 2009 +0000 @@ -1,6 +1,6 @@ /* pass2.c -Copyright © 2008 William Astle +Copyright © 2009 William Astle This file is part of LWASM. @@ -26,13 +26,16 @@ #include "config.h" #endif -#include <argp.h> -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> - #include "lwasm.h" void lwasm_pass2(asmstate_t *as) { + lwasm_line_t *l; + + as -> passnum = 2; + as -> addr = 0; + + // iterate over all the lines and re-parse them + for (l = as -> lineshead; l; l = l -> next) + lwasm_parse_line(as, l); }