RE: A83: Re: RandInt(
[Prev][Next][Index][Thread]
RE: A83: Re: RandInt(
Is this with decimals, or just a number without decimals?
-----Oorspronkelijk bericht-----
Van: owner-assembly-83@lists.ticalc.org
[mailto:owner-assembly-83@lists.ticalc.org]Namens Frank Schoep
Verzonden: woensdag 20 september 2000 18:44
Aan: assembly-83@lists.ticalc.org
Onderwerp: A83: Re: RandInt(
Dunno if it's right, but it should work (slowly):
; random number routine (returns de (0 to hl)
; input : hl = maximal result
; output: de = pseudo random number
randnum:
push hl
call _random
pop hl
call _setxxxxop2
call _fpmult
call _convop1
ret
Just paste this code somewhere in your project and use 'call randnum' to
create a random number in DE with HL as maximal number. I thought Ion
supported some routine, but I don't really wanna know.
Greez,
Frank
References: