Mercurial > hg-old > index.cgi
changeset 43:b33eca135258
Added second pass code generation
author | lost |
---|---|
date | Sun, 04 Jan 2009 06:16:22 +0000 |
parents | 4bb7b723e5b7 |
children | 2330b88f9600 |
files | src/pass2.c |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
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); }