Re: [fasm-help] defining locals,local labels
Brought to you by:
privalov
|
From: Tomasz G. <fa...@me...> - 2002-08-31 08:48:08
|
1) There was a bug with invoke macro that caused local labels to not work. Make sure you have the latest version this thread (look in replies): http://board.win32asmcommunity.net/showthread.php?s=&threadid=7468 2) There's a big difference between local variables for procedure (which are defined by macros) and the local labels. You can use both these features, or only one of them. Look in the docs - there's explained how the local labels (with dot at the beginning) work. You can name the local variable with local label, so it won't be assesible after first non-local label in your proc, but it's a good solution if you use only local labels inside the proc. You can also name local variable with global label (without a dot at the beginning), but you won't be able to define it twice in two different procedures. You can even define local variables with both those names (as it's in your example), but it can lead to mistakes, look at the example: proc ShowMessageOne, ptrMsg .dummy dd ? ; defines ShowMessageOn.dummy variable dummy dd ? ; defines global dummy variable, new prefix for ; local labels is used enter mov eax,[.dummy] ; now it tries to read from [dummy.dummy], ; causes an error return -- Tomasz |