Because the loop can repeat an unknown number of times, you get random times spent to roll the dice.
For 4, you could do 'if $Roll > 4, $Roll = $Roll - 4'
For 6, you can use 24 and subtract 6 from it repeatedly until it's 6 or less (or, if it's >12 you subtract 12, and if >18 subtract 18, I'm not sure which ends up more efficient in the end). For 12 you can use 24 again, but just subtract 12.
For 10 and 20, 40's your best bet, I suppose.
Assuming generating a number between 1 and 40 doesn't take terribly long, this is basically just using "mod" but by way of subtraction so you don't need to do any division on a GameBoy.
While you're still doing a bit of looping, you're at least guaranteed to never do the loop more than a fixed number of times.