diff lwasm/pass1.c @ 332:67224d8d1024

Basic input layer works
author lost
date Tue, 02 Mar 2010 00:10:32 +0000
parents
children 04c80c51b16a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lwasm/pass1.c	Tue Mar 02 00:10:32 2010 +0000
@@ -0,0 +1,43 @@
+/*
+pass1.c
+
+Copyright © 2010 William Astle
+
+This file is part of LWTOOLS.
+
+LWTOOLS 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/>.
+*/
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include <lw_alloc.h>
+
+#include "lwasm.h"
+#include "input.h"
+
+void do_pass1(asmstate_t *as)
+{
+	char *line;
+	
+	for (;;)
+	{
+		line = input_readline(as);
+		if (!line)
+			break;
+		printf("%s\n", line);
+		lw_free(line);
+	}
+}