turbo-pascal-assembly

Randomize

Initializes the built-in random generator with a random value.

SYS0615: MOV AH,2C
SYS0617: INT 21

Returns the current system time using DOS INT 21h AH = 2Ch service.

Upon return:

SYS0619: MOV [RandSeed.Low],CX
SYS061D: MOV [RandSeed.High],DX
SYS0621: RETF

Store the 32-bit number in DX:CX into RandSeed (LongInt) and return.

See also: RandSeed, or go back