-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.asm
More file actions
54 lines (45 loc) · 805 Bytes
/
test.asm
File metadata and controls
54 lines (45 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.386
Include \masm32\include\Irvine32.inc
Includelib \masm32\lib\Irvine32.lib
includelib \masm32\lib\Kernel32.lib
includelib \masm32\lib\User32.lib
.DATA
str1 BYTE "Input a Number to set Size", 0dh, 0ah, 0
str2 BYTE "Random Number Array is", 0dh, 0ah, 0
str3 BYTE "The Max Number is : ", 0
input DWORD ?
.CODE
MAIN PROC
mov edx, OFFSET str1
call WriteString
call ReadInt
mov input, eax
call crlf
mov edx, OFFSET str2
call WriteString
mov ecx, input
mov ebx, 0
call Randomize
L1:
mov eax, 99
call RandomRange
add eax, 100
call WriteDec
call crlf
cmp ebx, eax
;call dumpregs
jl CHANGE
loop L1
CHANGE:
mov ebx, eax
call dumpregs
loop L1
call crlf
; mov edx, OFFSET str3
; call WriteString
; mov eax, ebx
; call WriteDec
; call crlf
exit
MAIN ENDP
END MAIN