format PE console use32 entry start include win32a inc ----data---- CO

 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
format PE console
use32
entry start
include 'win32a.inc'
;----data----;
COL1 = 2h+8h ; цвет1
COL2 = 1h+2h+8h ; цвет2
str1 db "Plz enter filename(.asm) :",13,10,0
str1len =($-str1)
str2 db "wa7er`z commentz cleaner(asm).",0
str3 db "File not found.",13,10,0
str3len =($-str3)
writtenc dd ?
inp dd ?
outp dd ?
struct pointerzz
X dw 0
Y dw 0
ends
;----data----;
start:
invoke CharToOemA,str1,str1
invoke CharToOemA,str2,str2
invoke CharToOemA,str3,str3
invoke FreeConsole ,0
invoke AllocConsole ,0
invoke GetStdHandle ,-10
push EaX
pop [inp]
invoke GetStdHandle ,-11
push EaX
pop [outp]
push 100 ; ширина консоли
push 25 ; высота консоли
pop [pointerzz.Y]
pop [pointerzz.X]
invoke SetConsoleScreenBufferSize,[outp],pointerzz
invoke SetConsoleTitleA,str2
push 0 ; позиция
push 1 ; курсора
pop [pointerzz.X]
pop [pointerzz.Y]
invoke SetConsoleCursorPosition,[outp],pointerzz
invoke SetConsoleTextAttribute,[outp],COL1
invoke WriteConsoleA,[outp],str1,str1len,writtenc,NULL
call [FreeConsole]
call [ExitProcess]
data import
library kernel32,'KERNEL32.DLL',\
user32, 'USER32.DLL'
include 'api\kernel32.inc'
include 'api\user32.inc'
end data