flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > problem with "data resource" in FASMW 1.67.7 |
Author |
|
Slai 27 Aug 2006, 01:50
with the new version of FASMW 1.67.7 I get a message "Error: illegal instruction" on "data resource"
should I use something else instead ? |
|||
27 Aug 2006, 01:50 |
|
Slai 27 Aug 2006, 15:35
actually, it's not from FASMW, but from the new INCLUDE folder, because when I replace it with an old version of this folder, it works
|
|||
27 Aug 2006, 15:35 |
|
UCM 27 Aug 2006, 17:23
Could you show us your code, to make sure that you are not making a fundamental error?
|
|||
27 Aug 2006, 17:23 |
|
Madis731 27 Aug 2006, 19:07
maybe like exchanging use16, use32, use64 - sometimes has happened to me
|
|||
27 Aug 2006, 19:07 |
|
Slai 29 Aug 2006, 06:59
anyway, I am using a previous version of the INCLUDE folder, so I can compile my programs. I just thought that it might be some kind of bug that should be fixed for the next release of FASM.
|
|||
29 Aug 2006, 06:59 |
|
madmatt 29 Aug 2006, 08:37
a few errors you should be aware of for starters:
1. You need this at the start of your program format PE GUI 4.0 entry WINMAIN 2. change 'entry $' to WINMAIN: 3. remove 'data import' and 'data resource', uncomment the 'section' lines 4. in 'wmsize' section, 'MoveWindow' has wrong number of parameters, should have 5 parameters 5. I"d move your resource and import sections to the bottom of your assembly file. BTW, Fasm works just fine. I've gotten the program to compile but doesn't work correctly, You'll need to do some debugging. |
|||
29 Aug 2006, 08:37 |
|
Slai 29 Aug 2006, 14:05
10x madmatt! I am aware of the above and my eccentric programming (I do this mainly to have less lines in the source, and smaller size of the executable), but it worked this way with the previous version of the include file (with the GDI32.DLL included in the import section). The only problem seemed to be that I didnt had the format directive. With "format PE GUI 4.0" included the program worked perfectly on my computer. tnx again madmatt!
About the 'wmsize' section, the rest of the parameters of 'MoveWindow' are pushed before invoke GetDlgItem so it does not change them. To make it even more complicated, I optimized it to this: Code: wmsize: mov eax, [lparam] shr eax, 16 push TRUE eax mov eax, [lparam] and eax, 0ffffh invoke GetDlgItem,[hwnd],10,0,0,eax invoke MoveWindow,eax jmp finish |
|||
29 Aug 2006, 14:05 |
|
UCM 29 Aug 2006, 15:12
madmatt: You don't need to change entry $, I do that all the time and it works also, you CAN put data import, data resource etc. into the flat section (FASM does this).
|
|||
29 Aug 2006, 15:12 |
|
Tomasz Grysztar 31 Aug 2006, 08:28
Just use win32aX.inc for a header and it will work without "format PE" line.
|
|||
31 Aug 2006, 08:28 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.