-
Notifications
You must be signed in to change notification settings - Fork 0
/
cApp_27.asm
59 lines (46 loc) · 1.04 KB
/
cApp_27.asm
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
55
56
57
58
59
.586 ; Set processor type
.model flat, stdcall ; 32-bit memory model
option casemap:none
include asesh.inc
.data
dwItem0 dd 0
dwItem1 dd 1
dwItem2 dd 2
dwItem3 dd 3
dwItem4 dd 4
dwItem5 dd 5
dwItem6 dd 6
dwItem7 dd 7
dwArray dd dwItem0, dwItem1, dwItem2, dwItem3, dwItem4, dwItem5
dd dwItem6, dwItem7
.code
start:
call main
mainLoop:
push 01Bh
call GetAsyncKeyState
cmp eax, 0h
jne exitMainLoop
push 064h
call Sleep
jmp mainLoop
exitMainLoop:
ret
main proc
LOCAL dwLoopCount:DWORD
mov dwLoopCount, 0h
mov esi, dwArray
.while dwLoopCount <= 7h
mov edi, [esi] ; Derefrence esi into edi
print chr$("Address: ")
print str$(esi) ; Display the address of the value
print chr$(9h)
print chr$("Value: ")
print str$(edi) ; Display the derefrenced value
print chr$(0Ah)
add esi, sizeof DWORD ; Add 4 to esi to get the next array item
inc dwLoopCount
.endw
ret
main endp
end start