flat assembler
Message board for the users of flat assembler.
Index
> Main > unexpected end of file error |
Author |
|
Tommy 11 Sep 2004, 09:14
I guess it is "jz @F" after .keyup:
Code: @@: mov al, byte[eax+ecx] cmp al, 20h jc .specialkeys cmp ebx, 1 jz @F stosb |
|||
11 Sep 2004, 09:14 |
|
Tomasz Grysztar 11 Sep 2004, 09:15
There is "@F" jump to the next anonymous label in the line after "cmp ebx,1", but there is no next anonymous label defined there.
|
|||
11 Sep 2004, 09:15 |
|
silkodyssey 11 Sep 2004, 12:59
Quote:
I hate this error and it's not very helpful at all. I hope we can get something better in future versions of fasm. _________________ silkodyssey |
|||
11 Sep 2004, 12:59 |
|
roticv 11 Sep 2004, 14:03
Thanks. I just forgot to change the label name..
|
|||
11 Sep 2004, 14:03 |
|
Madis731 12 Sep 2004, 11:40
Compiler doesn't know where WE want ie our proc/endp pair to be. It searches it until the end of file and if it hasn't found it yet, it wonders "Why on earth did this file end? ^o) "
This is our obligation to make a ready pair so we can code inside it not code until we feel to put an endp |
|||
12 Sep 2004, 11:40 |
|
Tomasz Grysztar 12 Sep 2004, 12:49
I have made a special update of 1.55 packages today, there are some new error messages to replace the hated "unexpected end of file".
|
|||
12 Sep 2004, 12:49 |
|
madmatt 13 Sep 2004, 17:26
Thank you very much Mr. Privalov! Glad to see an end to the 'end of file error'.
MadMatt |
|||
13 Sep 2004, 17:26 |
|
silkodyssey 13 Sep 2004, 19:21
Glad to see the end of it as well
_________________ silkodyssey |
|||
13 Sep 2004, 19:21 |
|
Tommy 13 Sep 2004, 19:23
Very good Privalov!
|
|||
13 Sep 2004, 19:23 |
|
MattBro 22 Sep 2004, 02:54
OK here is a dumb little routine to find the length of a C style string.
I had been using it for a while in fasm 1.51 and then decided to upgrade to 1.55. Surprisingly I get the dreaded Error: unexpected end of file message. The code follows Code: include '%fasminc%\win32ax.inc' section '.data' data readable writeable _nstr db '12345',0 _stmsg db 'The length of the string is ' _len db '0',0 _title db 'A window',0 .code start: stdcall StrLength, _nstr add al,'0' mov [_len],al invoke MessageBox, HWND_DESKTOP, _stmsg, _title,MB_OK invoke ExitProcess,0 ; ( -- strlen) proc StrLength, StringBuff ; get length of string StringBuff ; StringBuff ; pointer to string ; ; StringBuff must be null terminated ; incrementing eax. The value in eax is the string length ; ; returns: eax = length of string StringBuff enter mov edi, [StringBuff] ; dpush 0 ; character count mov eax,0 ; character count ; Aprintf 'finding strlen of %s ', dword [ptrString] StrLength.top: ; top of loop cmp [edi], byte 0 ; check for string null termination je StrLength.done ; if null, jump out of loop and return inc edi ; pointer to next byte inc eax ; increment counterc jmp StrLength.top ; back to top of loop ; jump here to return StrLength.done: return .end start The problem lies somewhere in the StrLength procedure. -Matt _________________ -- ------------------------------------------------------- "I am the Way and the Truth and the Light, no one comes to the Father except through me" - Jesus --------------------------------------------------------- |
|||
22 Sep 2004, 02:54 |
|
MattBro 22 Sep 2004, 03:22
Well I'll be! I just answered my own question. Apparently the proc macro now requires termination with an endp macro! I must have missed that somewhere in the last few updates.
-Matt |
|||
22 Sep 2004, 03:22 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.