]> git.sur5r.net Git - cc65/blob - libsrc/vic20/randomize.s
Add "joystick mouse" driver and default mouse callback routine (not
[cc65] / libsrc / vic20 / randomize.s
1 ;
2 ; Ullrich von Bassewitz, 05.11.2002
3 ;
4 ; void _randomize (void);
5 ; /* Initialize the random number generator */
6 ;
7
8         .export         __randomize
9         .import         _srand
10
11         .include        "vic20.inc"
12
13 __randomize:
14         lda     VIC_LINES       ; Get overflow bit
15         asl     a               ; Shift bit 7 into carry
16         lda     VIC_HLINE       ; Get bit 1-8 of rasterline
17         rol     a               ; Use bit 0-7
18         tax                     ; Use VIC rasterline as high byte
19         lda     TIME            ; Use 60HZ clock as low byte
20         jmp     _srand          ; Initialize generator
21