[fasm-help] defining locals,local labels,asmwork
Brought to you by:
privalov
|
From: webmaster <wm...@sc...> - 2002-08-31 07:03:48
|
hi, please have a look at the modified example.asm:
include '%include%/win32a.inc'
.data
caption db "Win32 Assembly",0
message db "Hi! I'm the example program!",0
.code
start:
stdcall ShowMessageOne,message
stdcall ShowMessageTwo,message
invoke MessageBox,HWND_DESKTOP,message,caption,MB_OK
invoke ExitProcess,0
proc ShowMessageOne,ptrMsg
dummy dd ? ; dummy doesn't work as local - .dummy does
work as local
.dummy dd ?
enter
mov eax,[dummy]
jmp xskip ; .skip doesn't work
invoke MessageBox,HWND_DESKTOP,[ptrMsg],caption,MB_OK
xskip: ; .skip: doesn't work
return
proc ShowMessageTwo,ptrMsg ; shouldn't ptrMsg be a local variable?
.ptrMsg dd ? ; no complaint about this!
.dummy dd ?
.rc POINT
enter
mov eax,[.dummy]
mov eax,[.rc.x]
push caption
pop [.ptrMsg]
mov eax,[.ptrMsg]
invoke MessageBox,HWND_DESKTOP,eax,caption,MB_OK
return
.end start
-----------------------------------------
I now started using the asmwork IDE - in general I like it very much.
Two points seem to be considerable for me:
- (asmwork.asm) label wait_for_compiler: after #SetCursor...# I inserted
#invoke Sleep,10#. Otherwise compiling takes 100% of both processors on my
dual board. It might be even useful to spend the compilation process an own
thread which notifies the windowproc when finished.
- perhaps it is possible that the asm-file which is loaded first is always
preselected as file to compile.
So in the settings there would be a input and an output setting. That would
make compilation handling easier when you correct mistakes in an included
asm-file and then try to compile it again (now you first have to select the
main file again before you can compile).
wolfgang
|