Re: A86: TI-86 ASM Questions...


[Prev][Next][Index][Thread]

Re: A86: TI-86 ASM Questions...




In a message dated 8/19/98 10:26:11 AM Central Daylight Time,
ahmedre@bellsouth.net writes:

<< 
 Random:	       ; Creates a pseudorandom number 0 <= x < A
  ld b,a	       ; Thanks to Jimmy Mardell for this routine
  ld a,r
  add a,a
  ld hl,0
  ld d,0
  ld e,a
 RMul:
  add hl,de
  djnz RMul
  ld a,h
  ret
 
 --
 Ahmed El-Helw
 ahmedre@bellsouth.net
 http://asm8x.home.ml.org
 ICQ: 3350394 >>






I tried using this routine in my program, in a part where it generates random
x and y coordinates for certain sprites to be put.  For some reason they
almost always end up in a line going from the upper right of the screen to the
lower left (with one or two somwhere else).  Is there any way to make theis
random routine more random?