Something like this should work:

Rnd0 var word
Rnd1 var byte
Lim var byte ' your limiting variable (0 - 255)


Random Rnd0
Rnd1 = Rnd0 */ lim

Al.