start: ld b,10 ;b is 10 call randome ;jump down ret randome: push bc ;save counter ld a,65 call _SetXXOP1 ld a,90 call _SetXXOP2 call _randint call _CONVOP1 call _putc ;get and display a random number from register a pop bc ;retrieve counter DJNZ randome ;decrease b (now 9) check to see if non zero (nope) then jr to randome. ret ;if it is zero, quit