projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.37.tar.gz
[xscreensaver]
/
hacks
/
asm6502.c
diff --git
a/hacks/asm6502.c
b/hacks/asm6502.c
index bceb4fb499a4d2e2611bc9bafd5b83deaf9a2952..c95e5babd9e8e50cbb9fd0cf3017e173edfbeb18 100644
(file)
--- a/
hacks/asm6502.c
+++ b/
hacks/asm6502.c
@@
-20,8
+20,6
@@
I changed the structure of the assembler in this version.
*/
I changed the structure of the assembler in this version.
*/
-#define NDEBUG /* Uncomment when done with debugging */
-
#include <stdlib.h>
#include <stdio.h>
/*#include <malloc.h>*/
#include <stdlib.h>
#include <stdio.h>
/*#include <malloc.h>*/
@@
-31,7
+29,14
@@
#include <assert.h>
#include <ctype.h>
#include <math.h>
#include <assert.h>
#include <ctype.h>
#include <math.h>
-#include <inttypes.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#if defined(HAVE_STDINT_H)
+# include <stdint.h>
+#elif defined(HAVE_INTTYPES_H)
+# include <inttypes.h>
+#endif
#include <unistd.h>
#include "yarandom.h"
#include <unistd.h>
#include "yarandom.h"
@@
-41,7
+46,7
@@
# define random rand
#endif*/
# define random rand
#endif*/
-#ifndef
USE_IPHON
E
+#ifndef
HAVE_MOBIL
E
# define READ_FILES
#endif
# define READ_FILES
#endif
@@
-1876,7
+1881,7
@@
static BOOL translate(m6502_Opcodes *op,Param *param, machine_6502 *machine){
if (op->BRA) {
pushByte(machine, op->BRA);
{
if (op->BRA) {
pushByte(machine, op->BRA);
{
- int diff = abs(
param->lbladdr -
machine->defaultCodePC);
+ int diff = abs(
(int)param->lbladdr - (int)
machine->defaultCodePC);
int backward = (param->lbladdr < machine->defaultCodePC);
pushByte(machine, (backward) ? 0xff - diff : diff - 1);
}
int backward = (param->lbladdr < machine->defaultCodePC);
pushByte(machine, (backward) ? 0xff - diff : diff - 1);
}