you are missing one line of code... call _random ld a,40 call _setxxop2 call _fpmult ld a,10 ;----------------------------- call _setxxop2 ;----------------------------- call _fpadd