flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Macro Temp Labels |
Author |
|
baldr 17 Jan 2009, 20:52
Mercury Knight,
local was interpreted as preprocessor's directive because it is inside macro definition. Use locals/endl. |
|||
17 Jan 2009, 20:52 |
|
Mercury Knight 17 Jan 2009, 23:50
DOH! I should have thought of that! If its inside a macro, like my segment macros, then local is interpreted as the preprocessor's directive. Otherwise, outside of a macro, it is interpreted as the macro defined in proc32.inc. I tested it by temporarily renaming the local macro to localx, now it compiles properly. Now I need to find another name for the local macro that will remain clear without needing to use locals/endl.
Just out of curiosity, is there an updated version of fasmpre? I found an older version here (1.65) but it would not preprocess *any* of my source files, thus all that time wasted trying to visualize mentally what the compiler is doing. Thanks again baldr! *grinz* M |
|||
17 Jan 2009, 23:50 |
|
Mercury Knight 25 Jan 2009, 00:35
Am I right in understanding that when you include a file, its the same as if the included file was embedded *unmodified* in the source at the point that you included the file?
The following below will compile successfully using the segments.inc file listed in the first post, but if you move everything between START and STOP to a new file, and then in this file include the new file, you will get an error when you reach the .endx macro (apparently the segment names are invalid). Seems like include makes some changes where it shouldn't. I haven't been able to track down this failure, so I'm wondering if any of you could. Code: ; example of simplified Win32 programming using complex macro features include 'win32wx.inc' include 'segments.inc' .model pe,gui 4.0 ;-- START .segment text start: invoke MessageBox,HWND_DESKTOP,str1,str2,MB_OK invoke ExitProcess,0 .segment data str1 TCHAR "Hi! I'm the example program!",0 str2 TCHAR "Win32 Assembly",0 ;-- STOP .endx text, data .end start Thanks! M |
|||
25 Jan 2009, 00:35 |
|
revolution 25 Jan 2009, 04:44
Mercury Knight wrote: Am I right in understanding that when you include a file, its the same as if the included file was embedded *unmodified* in the source at the point that you included the file? |
|||
25 Jan 2009, 04:44 |
|
Mercury Knight 25 Jan 2009, 06:00
revolution wrote:
Go figure, I had a suspicion something like that was happening. Already back to the drawing board rewriting segments.inc! Thanks rev. M |
|||
25 Jan 2009, 06:00 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.