The Link Library from Irvine


Randomize
It initializes the starting seed value of the and procedures.

RandomRange
It produces a random integer within the range of 0 to (n – 1), where n is an input parameter passed in the EAX. The random integer is returned in .

Clrscr
It clears the console screen.

Crlf
It advances the cursor to the beginning of the next line in the console window. It writes a string containing the values and .

Delay
It pauses the program for a specified number of milliseconds. Before calling , set to the desired interval.

GetCommandtail (not working)
It copies the program’s command line into a null-terminated string, whose offset is saved in .

Note that this procedure is not working because of unknown reasons.

Generating 5 Randomized Numbers
Counting n (< 10) Seconds
 INCLUDE Irvine32.inc
 .data 
  NUMBER = 5
  dummy  WORD  ?
  
 .code
 main PROC
  call  Clrscr
 

mov ecx, NUMBER L1: mov eax, 10 call RandomRange call WriteInt mov al, ' ' call WriteChar loop L1 exit main ENDP END main
 INCLUDE Irvine32.inc  
 .data
  dummy  WORD  ?

 .code
 main PROC
  call   ReadChar
  call   WriteChar
  call   Crlf
 

movzx ecx, al L1: mov eax, ecx call WriteInt call Crlf mov eax, 1000 call Delay loop L1 exit main ENDP END main
An Execution Example
An Execution Example

    +4 +2 +7 +7 +7


     5 
    +5
    +4
    +3
    +2
    +1


The italic white text with navy background is entered by users.



      “I’m not arguing, I’m just explaining why I’m right.”    
      ― Unknown