Using the 83+, this is how its done: ld b,25 ; upper bound (random goes from 0 to 24 not including 25) call ionRandom ; the ion call for this ld (variblename),a ; the random num is stored in this variable