]> git.sur5r.net Git - cc65/commitdiff
added _randomize() implementation
authorizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 10 Nov 2002 15:48:57 +0000 (15:48 +0000)
committerizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 10 Nov 2002 15:48:57 +0000 (15:48 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1499 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/geos/devel/Makefile
libsrc/geos/devel/randomize.s [new file with mode: 0644]

index 62fb3c53cab34f29ecaef4593e7548424cb222e0..653741ab34a921d63ab798338e40975c427818b6 100644 (file)
@@ -8,7 +8,7 @@
        @$(AS) -o $@ $(AFLAGS) $<
 
 
-S_OBJS = crt0.o oserror.o
+S_OBJS = crt0.o oserror.o randomize.o
 
 all: $(S_OBJS)
 
diff --git a/libsrc/geos/devel/randomize.s b/libsrc/geos/devel/randomize.s
new file mode 100644 (file)
index 0000000..c16bc54
--- /dev/null
@@ -0,0 +1,16 @@
+;
+; Ullrich von Bassewitz, 05.11.2002
+;
+; void _randomize (void);
+; /* Initialize the random number generator */
+;
+
+       .export         __randomize
+       .import         _srand
+
+       .include        "../inc/geossym.inc"
+
+__randomize:
+       lda     random          ; get random value from internal generator
+       ldx     random+1
+       jmp     _srand          ; and use it as seed