View | Details | Raw Unified | Return to bug 117648
Collapse All | Expand All

(-)util/error.c (+1 lines)
Lines 7-12 Link Here
7
 */
7
 */
8
8
9
#include <stdio.h>
9
#include <stdio.h>
10
#include <stdlib.h>
10
#include <stdarg.h>
11
#include <stdarg.h>
11
#include "util.h"
12
#include "util.h"
12
#include "error.h"
13
#include "error.h"
(-)util/hash.c (-2 / +6 lines)
Lines 28-36 Link Here
28
Hash(void *bytes, unsigned length)
28
Hash(void *bytes, unsigned length)
29
{
29
{
30
	unsigned	crc = CRC_INIT;
30
	unsigned	crc = CRC_INIT;
31
   unsigned char byte;
32
   unsigned len = 0;
31
33
32
	while (length--)
34
   for(len=0; len<length; len++){
33
		crc = table[(crc ^ *((unsigned char *) bytes)++) & 0xFF] ^ (crc >> 8);
35
      byte = ((unsigned char *)bytes)[len];
36
		crc = table[(crc ^ byte) & 0xFF] ^ (crc >> 8);
37
   }
34
	return(crc ^ CRC_FINAL);
38
	return(crc ^ CRC_FINAL);
35
}
39
}
36
40
(-)util/names.c (+1 lines)
Lines 6-11 Link Here
6
 */
6
 */
7
7
8
#include <stdio.h>
8
#include <stdio.h>
9
#include <string.h>
9
#include "util.h"
10
#include "util.h"
10
#include "error.h"
11
#include "error.h"
11
#include "hash.h"
12
#include "hash.h"
(-)asm/emit.c (-2 / +4 lines)
Lines 191-197 Link Here
191
191
192
/* Try to do zero page */
192
/* Try to do zero page */
193
193
194
	if (zmode >= 0 && CheckOp(ins, zmode) >= 0)
194
	if (zmode >= 0 && CheckOp(ins, zmode) >= 0) {
195
		if (ivalue->type == iSegRel
195
		if (ivalue->type == iSegRel
196
				&& ivalue->u.segrel.segment == AbsSegment
196
				&& ivalue->u.segrel.segment == AbsSegment
197
				&& (ivalue->u.segrel.offset & ~0xFF) == 0)
197
				&& (ivalue->u.segrel.offset & ~0xFF) == 0)
Lines 207-212 Link Here
207
			EmitIvalue(ivalue, FALSE, 0x01);
207
			EmitIvalue(ivalue, FALSE, 0x01);
208
			return;
208
			return;
209
		}
209
		}
210
   }
210
211
211
/* Can we ONLY do zero page (but didn't)? */
212
/* Can we ONLY do zero page (but didn't)? */
212
213
Lines 239-245 Link Here
239
240
240
/* Compute displacement to target address */
241
/* Compute displacement to target address */
241
242
242
	if (gPass == 2)
243
	if (gPass == 2) {
243
		if (ivalue->type != iSegRel || ivalue->u.segrel.segment != gSegment)
244
		if (ivalue->type != iSegRel || ivalue->u.segrel.segment != gSegment)
244
			uerror("illegal branch address");
245
			uerror("illegal branch address");
245
		else
246
		else
Lines 248-253 Link Here
248
			if (disp < -128 || disp > 127)
249
			if (disp < -128 || disp > 127)
249
				uerror("branch of %d bytes is out of range", disp);
250
				uerror("branch of %d bytes is out of range", disp);
250
		}
251
		}
252
   }
251
253
252
/* Done */
254
/* Done */

Return to bug 117648