flat assembler
Message board for the users of flat assembler.
Index
> Main > Error: unexpected end of file - source attached |
Author |
|
Jorge F. Gonzalez 28 May 2004, 01:30
(second post)
I am compiling a simple program for testing a considerably more complicated black box add-on .inc file, and am also making use of some macros and def's in another .inc file (though I suppose these details might be unimportant), and am having Fasm quit, giving me an "Error: unexpected end of file" message, but no details about why it is saying this. What it is that makes Fasm quit with this message? For those who like nothing better than making heads and tails out of assembly code where label names constitute most of the code documentation, the source files involved are attached this time, although the cause of the problem is probably something other than the code's specifics, i.e. what this code does. I figure something is probably missing, and guessed that it could be something along the lines of a missing procedure definition, except I would expect that FAsm would say that that in particular is the problem if such was indeed the case, instead of just vaguely complaining of a file unexpectedly ending. Thanks to everybody who looks at this.
Last edited by Jorge F. Gonzalez on 28 May 2004, 05:45; edited 1 time in total |
|||||||||||||||||||||||||||||||
28 May 2004, 01:30 |
|
comrade 28 May 2004, 02:27
paste source?
|
|||
28 May 2004, 02:27 |
|
aaro 28 May 2004, 09:48
Newest versions of fasm have different proc syntax:
Code:
proc name, arg
enter
return
endp
|
|||
28 May 2004, 09:48 |
|
vid 28 May 2004, 13:52
you just have to add "endp" at end of procedure.
|
|||
28 May 2004, 13:52 |
|
Jorge F. Gonzalez 28 May 2004, 17:45
But what is it that prompts the "unexpected end of file" error?
P.S.: the version of FAsm I am using does not use the endp directive or macro. |
|||
28 May 2004, 17:45 |
|
Madis731 29 May 2004, 11:42
If we don't have the full source and includes, then we can't help you...sorry!
But, if you check your code thorougly you might find some unended codegroups, that is why it reach the end of file unexpectedly - something isn't finished properly. I have had this error even when not ending start: with ExitProccess... |
|||
29 May 2004, 11:42 |
|
pelaillo 29 May 2004, 17:08
Jorge F. Gonzalez wrote: But what is it that prompts the "unexpected end of file" error? I hope this help This does not depend on FAsm version. This depends on macros you are using. For example: 1. You are including Win32A.inc but you are using macros Code: .data .code that are not defined on standard Win32A.inc but in Win32AX.inc 2. If you are using standard Win32A.inc, the proc macro must end with endp to close the opened stack frame. 3. If you customize standard macros, we need to see them in order to help you. 4. If you are using standard macros, there are some errors on "black box.inc" such as (there are a few more of the same): Code: ; added endp to all procs macro BB_DiscardWindow { if BB_DebugMode = ON ; stdcall BB_ScrapWindow call BB_ScrapWindow end if } macro BB_LeftProc { if BB_DebugMode = ON ;stdcall call BB_RecProcReturn call BB_RecProcReturn end if } macro BB_DontMonitor VarName { if BB_DebugMode = ON ; stdcall BB_DropVar VarName stdcall BB_DropVar,VarName end if } proc BB_RecProcReturn ; this procedure doesn't have a stack frame, ; so enter is not needed ; enter test [BlackBox.Flags], BB_IsOperable jz .End dec [BlackBox.ProcNameStackPos] or [BlackBox.Flags], BB_FinishedProc .End: return endp |
|||
29 May 2004, 17:08 |
|
khanh 01 Jun 2004, 10:58
I have the same problems as well, when trying to comply a package in Fresh source.
Anyway, the error should be clearly indicated? This may be something missing from Fasm. Sorry for my English. |
|||
01 Jun 2004, 10:58 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.