flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2, 3 Next |
Author |
|
Walter
Code: ;****************** ;* FindWindow.asm * ;****************** include 'win32ax.inc' .code start: invoke FindWindow,NULL,"MyFile.txt - Notepad" .if eax <> 0 invoke MessageBox,HWND_DESKTOP,"Window Found!" ,"FindWindow",MB_OK .endif .end start |
|||
![]() |
|
revolution
You'll need to call ExitProcess also else your code will run off the end and probably crash.
|
|||
![]() |
|
Trentie89
Thanks heaps guys, but now the compiler seems to have gone nuts, when I copy and paste your code, it says error : illegal instruction .code ( Whats happening ????? ) Thanks so much for your help.
|
|||
![]() |
|
revolution
Trentie89 wrote: ... but now the compiler seems to have gone nuts, when I copy and paste your code, it says error : illegal instruction .code ( Whats happening ????? ) Thanks so much for your help. revolution wrote: You'll need to call ExitProcess also else your code will run off the end and probably crash. |
|||
![]() |
|
Trentie89
I'm a bit of a newbie with ASM, I have tried this and it still doesn't work, still says error.
Code: ;****************** ;* FindWindow.asm * ;****************** include 'win32ax.inc' .code start: invoke FindWindow,NULL,"MyFile.txt - Notepad" .if eax <> 0 invoke MessageBox,HWND_DESKTOP,"Window Found!" ,"FindWindow",MB_OK .endif invoke ExitProcess,0 .end start |
|||
![]() |
|
revolution
Works okay for me in WinXP and Win7
|
|||
![]() |
|
Trentie89
I'm on Windows 10, is that why it wont work I wonder.?. Look at attached screenshot. Thanks so heaps for helping me btw.[/img]
_________________ I Am the greatest.!. ( NOT YET ). |
||||||||||
![]() |
|
revolution
Oh, I thought you were talking about runtime errors. You have an assembly time error.
But I can't understand why include would be an illegal instruction? That doesn't make sense to me. Is your fasmw the original .exe? Did you make any changes to it or something? |
|||
![]() |
|
system error
look at your "fasmw.ini".
Things like these could happen if you unzipped the fasm package at location A, run the FASMW there, and then moving that FASM folder to location B. FASMW.ini is set the first time you open FASMW.exe, that includes setting up the default FASM path where you first run it. Changing the content of .ini file would help. Other than that, you have other problems. Weird problem, I must say. |
|||
![]() |
|
revolution
system error: If the path is wrong then you still don't get an "illegal instsruction" error. You'd get a "file not found" error.
|
|||
![]() |
|
system error
@revo Yeah i know that. I was just being general to potential beginners' problems.
This one is weird though. Getting 'illegal instruction' on an include directive is ... just funny. I think he's running a script or something, or even a shortcut with wrong configuration. |
|||
![]() |
|
Trentie89
Should I download fasm again and unzip it at a new location? I Havent modified anything from memory.
|
|||
![]() |
|
Trinitek
Trentie89 wrote: Should I download fasm again and unzip it at a new location? I Havent modified anything from memory. |
|||
![]() |
|
l_inc
Trentie89
If the error persists, would you please zip the source file you're trying to compile and attach it here? _________________ Faith is a superposition of knowledge and fallacy |
|||
![]() |
|
Trentie89
Hello Guys,
I Tried unzipping fasm to a new location, fresh from my downloaded one. It still says same error. Which file would you like me to zip, the asm file you mean.?. Or my entire fasm file? Thanks so much guys. |
|||
![]() |
|
KevinN
I haven't used asm or fasm much and in a while but I don't remember ever using double quotes with fasm.. just single quotes
|
|||
![]() |
|
zhak
Double quotes are OK. Just tried to compile the example as it appears in comments above on Win10 and it's OK. And indeed, after moving fasm dir to another location, I started getting file not found error, but not illegal instruction. My best guess is include directive contains non-latin chars that look like latin
|
|||
![]() |
|
revolution
zhak wrote: My best guess is include directive contains non-latin chars that look like latin |
|||
![]() |
|
revolution
Trentie89 wrote: Which file would you like me to zip, the asm file you mean.?. |
|||
![]() |
|
Goto page 1, 2, 3 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.