A83: Re: RandInt(
[Prev][Next][Index][Thread]
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
-----Oorspronkelijk bericht-----
Van: Anton Kuckartz <su025882@wolmail.nl>
Aan: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Datum: woensdag 20 september 2000 17:25
Onderwerp: A83: RandInt(
>
>I want to use the BASIC command RandInt() in ASM. Is that possible, and
what
>is the code for it?
>
>
Follow-Ups: