diff src/pass1.c @ 13:05d4115b4860

Started work on new expression evaluator system and major code re-work for next release
author lost
date Wed, 22 Oct 2008 04:51:16 +0000
parents
children 3c0e5f311c95
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pass1.c	Wed Oct 22 04:51:16 2008 +0000
@@ -0,0 +1,50 @@
+/*
+pass1.c
+Copyright © 2008 William Astle
+
+This file is part of LWASM.
+
+LWASM is free software: you can redistribute it and/or modify it under the
+terms of the GNU General Public License as published by the Free Software
+Foundation, either version 3 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+more details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+Handles first pass of assembly
+
+First pass involves the following:
+
+1. read all lines from the main source file, following all "include"
+   directives as appropriate
+2. parse each line into a symbol, operation code, and operand as appropriate
+3. each operand is evaluated for syntax and futher for value if there are
+   multiple addressing sizes available; any undefined or not fully resolved
+   value will default to the largest addressing size available (16 bit)
+4. addresses are assigned to every symbol defined in the assembly
+5. macros are defined and expanded at this pass
+
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <argp.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "lwasm.h"
+
+void lwasm_pass1(asmstate_t *as)
+{
+}