flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Help with 'defined', please |
Author |
|
vid 18 Jan 2007, 11:49
first one really should display 'defined'.
But this might be to some specific behavior of "display", try doing something else, like: Code: if defined X db 1 else db 2 end if X: and, then look at resulting file with hexeditor to see if byte 1 or byte 2 was defined. |
|||
18 Jan 2007, 11:49 |
|
jbojarczuk 18 Jan 2007, 12:23
I tried using the 'defined' in order to create extrn or public definitions for the label, but I need this definition to be made before the label definition. The problem is, it's behaviour is exactly like the expected from the display macro.
I also suppose that, if the display macro wouldn't work with it, it would either display both lines, or none of them. |
|||
18 Jan 2007, 12:23 |
|
vid 18 Jan 2007, 12:33
Hey, what are you talking about? I tried your first example, and it displayed "Defined". Next time at least try code before stating what it does!
|
|||
18 Jan 2007, 12:33 |
|
Tomasz Grysztar 18 Jan 2007, 12:36
As for using the "defined" for the problem of creating "extrn" or "public" definitions, see the answer to 6th question in FAQ.
|
|||
18 Jan 2007, 12:36 |
|
vid 18 Jan 2007, 12:47
tomasz: by the way, is Q/A about fixed-base PEs still valid? (the one before last in FAQ)
|
|||
18 Jan 2007, 12:47 |
|
Tomasz Grysztar 18 Jan 2007, 14:12
No, not really.
|
|||
18 Jan 2007, 14:12 |
|
vid 18 Jan 2007, 14:15
how about placing "if ~defined" problem there instead?
|
|||
18 Jan 2007, 14:15 |
|
Tomasz Grysztar 18 Jan 2007, 14:34
This one is ine the manual.
|
|||
18 Jan 2007, 14:34 |
|
jbojarczuk 18 Jan 2007, 14:57
Here is the answer from my building environment (VC 2005, using the VC preprocessor before FASM building process)...
Code: Build Log Build started: Project: Win32, Configuration: Debug|Win32 Command Lines Creating temporary file "r:\Asm\AsmBaseLib2\Solution\Win32\Debug\BAT00000117481840.bat" with contents [ @echo off "R:\Asm\AsmBaseLib2\AsmBuild.bat" "Base.fasm" "Base.i" "Debug\Base.obj" if errorlevel 1 goto VCReportError goto VCEnd :VCReportError echo Project : error PRJ0019: A tool returned an error code from "Assembling" exit 1 :VCEnd ] Creating command line "r:\Asm\AsmBaseLib2\Solution\Win32\Debug\BAT00000117481840.bat" Output Window Assembling Pre-Pre-Processing... 1: "Base.fasm" 2: "Base.i" 3: "Debug\Base.obj" r:\Asm\AsmBaseLib2\Solution\Win32 Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. Base.fasm Assembling... flat assembler version 1.67.7 (300869 kilobytes memory) Defining symbol as extrn Offset para x:12 Not defined <=== NOT DEFINED!!! Inicializando VirtualTable para JRBBase InitVirtualTableLst JRBBase Base.i [973]: ClassEndCode Base.i [866] ClassEndCode [1]: InitVirtualTable a_strClass Base.i [200] InitVirtualTable [3]: InitVirtualTableLst a_strClass , t_astrList Base.i [190] InitVirtualTableLst [6]: a_strClass#_PVTABLE : error: symbol already defined. Project : error PRJ0002 : Error result 2 returned from 'C:\WINNT\system32\cmd.exe'. Results Build Time 0:00 Build log was saved at "file://r:\Asm\AsmBaseLib2\Solution\Win32\Debug\BuildLog.htm" Win32 - 1 error(s), 0 warning(s) The only 'Not defined' display I have is in that piece of code that is in this thread's start. As for the 'symbol already defined.' problem, it is happening because I can't seem to use if defined , and then he tries to place the label as 'extrn'. I would gladly upload the file, but I am not beeing able to run scripts in this reply page; I keep getting 'Object expected' error (otherwise I would upload the source file and the .html generated from the build). Thank you all for your help on this. |
|||
18 Jan 2007, 14:57 |
|
jbojarczuk 18 Jan 2007, 14:59
By the way, just tried
if ~defined Teste display 'Not defined', 13 , 10 else display 'Defined' , 13 , 10 end if Teste dd 5 and I still get 'Not defined' in the output. |
|||
18 Jan 2007, 14:59 |
|
vid 18 Jan 2007, 15:05
Quote: This one is ine the manual. what do you think FAQ stands for? it CAN be mentioned on multiple places. jbojarczuk: The problem you mentioned doesn't exist. Code example you posted work as it should. Problem is probably elsewhere. Best would be, if you could post complete source that goes to FASM, and point out the problem there. |
|||
18 Jan 2007, 15:05 |
|
LocoDelAssembly 18 Jan 2007, 15:44
offtopic: Why all the code block of jbojarczuk are shown as normal text instead of code block? I tested copying and pasting his post and then previewing them and works fine :S
|
|||
18 Jan 2007, 15:44 |
|
vid 18 Jan 2007, 16:26
[/url]tags sometimes bitch up too... i quess just some bug in phpBB
|
|||
18 Jan 2007, 16:26 |
|
LocoDelAssembly 18 Jan 2007, 17:20
aaaarrggghh, perhaps he is using "Disable BBCode in this post" or he has "Always allow BBCode" on his profile set to off?
|
|||
18 Jan 2007, 17:20 |
|
vid 18 Jan 2007, 17:24
seem to be second one... and same for smileys. i have fixed these two posts.
|
|||
18 Jan 2007, 17:24 |
|
jbojarczuk 18 Jan 2007, 17:39
Hi everybody,
Since I have not been able to attach the file in this thread, I created another one in order to make the file available - (Help with 'defined', please 2). offtopic: thanks for the tip, LocoDelAssembly. Got my profile corrected. |
|||
18 Jan 2007, 17:39 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.