shithub: scc

Download patch

ref: 2c5658c7d684eef9de76ff7715f7da6debb69d8f
parent: f69acd24b277d282010482c659f286050f05a926
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Mar 25 09:15:32 EDT 2014

Add forgotten file code.c

This file is needed in order to can compile

--- /dev/null
+++ b/code.c
@@ -1,0 +1,21 @@
+
+#include <stdint.h>
+#include <stdio.h>
+
+#include "symbol.h"
+
+void
+emitsym(struct symbol *sym)
+{
+	char c;
+
+	if (sym->s.isglobal)
+		c = 'G';
+	else if (sym->s.isstatic)
+		c = 'T';
+	else if (sym->s.isregister)
+		c = 'R';
+	else
+		c = 'A';
+	printf("\t%c%d", c, sym->id);
+}
\ No newline at end of file