diff -ur as31/as31.h as31_patched/as31.h
--- as31/as31.h	2000-04-21 02:37:46.848996351 +0200
+++ as31_patched/as31.h	2007-11-24 18:36:22.135324390 +0100
@@ -20,6 +20,7 @@
  */
 
 #include <stdio.h>
+#include <string.h>
 
 /* ----------------------------------------------------------------------
  * user / keyword symbol structures:
Nur in as31_patched/: .lexer.c.swp.
diff -ur as31/parser.y as31_patched/parser.y
--- as31/parser.y	2000-04-21 02:29:31.858997172 +0200
+++ as31_patched/parser.y	2007-11-24 18:16:10.000000000 +0100
@@ -1015,21 +1015,21 @@
  *	of code. (using a large bit field).
  *
  */
-
-#define indx(a) ( (a)/(sizeof(long)*8) )
-#define bit(a)	( 1 << ((a)%(sizeof(long)*8)) )
+typedef unsigned long bitfield_t;
+#define indx(a) ( (a)/(sizeof(bitfield_t)*8) )
+#define bit(a)	( (bitfield_t) 1 << ((a)%(sizeof(bitfield_t)*8)) )
 
 #define getloc(a) (regions[indx(a)] & bit(a))
 #define setloc(a) (regions[indx(a)] |= bit(a))
 
-static unsigned long regions[ 0x10000/(sizeof(long)*8) ];
+static bitfield_t regions[ 0x10000/(sizeof(bitfield_t)*8) ];
 
 void inclc(int i)
 {
 
 	while (i-- > 0) {
 		if( pass2 && getloc(lc) )
-			error("Location counter overlaps");
+			error("Location counter overlaps on byte %lu", lc);
 		if( pass2 ) setloc(lc);
 		lc += 1;
 	}
@@ -1083,7 +1083,7 @@
 {
 	int i,j;
 
-	fprintf(listing,show?"%04X: ":"      ",lc);
+	fprintf(listing,show?"%04lX: ":"      ",lc);
 
 	j=0;
 	for(i=0; i<bytecount; i++ ) {
Nur in as31_patched/: patch.
