'Generating 1 random number within 0-256 range in x86 8086 tasm(16 bit) [duplicate]

At this point i have been learning assembly for about 6 months. My current project is a random number generator. I need to generate 1 random number in 0 to 256 range. I have tried this: mov ax,[Clock] mov [rng],al This did not work since the clock is giving me 0. I have tried to learn other methods with no avail. My question is how do i make it work?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source