386 model flat stdcall includelib kernel32 lib includelib user32 lib M

 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
.386
.model flat, stdcall
includelib kernel32.lib
includelib user32.lib
MessageBoxA PROTO ,:DWORD, :DWORD, :DWORD, :DWORD
ExitProcess PROTO ,:DWORD
.data
MsgBoxCaption db "Caption String!",0
MsgBoxText db "strinG STRing STRING strinG",0
table db "abcdefghijklmnopqrstuvwxyz"
d = ‘a’ – ‘A’
.code
Winmain PROC
lea edx, MsgBoxText
cycle:
mov al, [edx]
cmp al,0
jz goout
cmp al, «a»
jng badchar
cmp al, «z»
jge badchar
sub al, N
lea ebx, table
xlat
mov [edx], al
badchar:
add edx, 1
jmp cycle
goout:
push 0
push offset MsgBoxCaption
push offset MsgBoxText
push 0
call MessageBoxA
push 0
call ExitProcess
Winmain endp
end Winmain