include 'hll.inc'
.$
the beer source: example of hll macros used in fasm
- multiline comments
- var definition
- hll functions including strings
- new imports
- smarter if, switch
- assembly listing
by blez
$.
type gui
enable listing
extern mciSendStringA:public
extern opencd:local
string sName = 'MyApplication'
string sbuff[128]
dword result
MessageBoxA(0,'Do you need additional place for the beer?',sName,MB_ICONQUESTION+MB_YESNO)
mov [result], eax
.if dword [result] = IDYES
opencd()
.else
MessageBoxA(0,'Well ok then..',sName,MB_ICONINFORMATION+MB_OK)
.endif
ExitProcess(0)
proc opencd
mciSendStringA('open cdaudio',0,0,0)
mciSendStringA('set cdaudio door open',0,0,0)
mciSendStringA('close cdaudio',0,0,0)
endp
imports
libs kernel32,user32,winmm
from kernel32,ExitProcess
from user32,MessageBoxA,wsprintfA
from winmm,mciSendStringA