- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
entry start
include 'C:\Program Files\Casm\win32a.inc' ; Include file win32a.inc
section '.text' code readable executable
start:
invoke GetModuleHandle,0
invoke DialogBoxParam,eax,37,HWND_DESKTOP,DialogProc,0
or eax,eax
jz exit
exit:
invoke ExitProcess,0
proc DialogProc hwnddlg,msg,wparam,lparam
push ebx esi edi
cmp [msg],WM_INITDIALOG
je .wminitdialog
cmp [msg],WM_CLOSE
je .wmclose
xor eax,eax
jmp .finish
.wminitdialog:
jmp .processed
.wmclose:
invoke EndDialog,[hwnddlg],0
.processed:
mov eax,1
.finish:
pop edi esi ebx
ret
endp
section '.bss' readable writeable
flags dd ?
caption rb 40h
message rb 100h
section '.idata' import data readable writeable
library kernel,'KERNEL32.DLL',\
user,'USER32.DLL'
import kernel,\
GetModuleHandle,'GetModuleHandleA',\
ExitProcess,'ExitProcess'
import user,\
DialogBoxParam,'DialogBoxParamA',\
EndDialog,'EndDialog'
section '.rsrc' resource data readable
directory RT_DIALOG,dialogs
resource dialogs,\
37,LANG_ENGLISH+SUBLANG_DEFAULT,demonstration
dialog demonstration,'TestProgram',170,170,105,75,WS_CAPTION+WS_POPUP+WS_SYSMENU+DS_MODALFRAME
dialogitem 'STATIC','Compile',-1,10,10,70,29,WS_VISIBLE
dialogitem 'STATIC','WITH...',-1,10,20,70,8,WS_VISIBLE
dialogitem 'STATIC','C',-1,10,30,70,8,WS_VISIBLE
dialogitem 'STATIC','A',-1,10,40,70,8,WS_VISIBLE
dialogitem 'STATIC','S',-1,10,50,70,8,WS_VISIBLE
dialogitem 'STATIC','M',-1,10,60,70,8,WS_VISIBLE
enddialog
Dummy00001 19.04.2014 20:58 # +1
ЗЫ в тему. читал http://llvm.org/docs/LangRef.html и http://llvm.org/docs/tutorial/index.html - вставило. IRBuilder основательно переработали - кодогенерация теперь весьма удобна. ну насколько только кодогенерация и может быть удобной.