flat assembler
Message board for the users of flat assembler.
Index
> Windows > Error: invalid expression |
Author |
|
DimonSoft 06 Dec 2018, 08:24
One line might not always be enough. One possibility is that kernel module has not been defined with library macro, another one might be in a way you’re defining the functions to import in the next few lines (for some definition of “few”).
|
|||
06 Dec 2018, 08:24 |
|
revolution 06 Dec 2018, 12:06
Please show more source to give context. import is a macro that takes many parameters, and we can't see the other lines after the line continuation trailing backslash.
|
|||
06 Dec 2018, 12:06 |
|
Cos 06 Dec 2018, 14:50
There is source code I used:
Code: format PE console entry start include 'win32a.inc' ; =============================================== section '.text' code readable executable start: ; Your program begins here: inc eax inc eax dec eax inc eax ; Exit the process: push 0 call [ExitProcess] ; ==================================== ; Imports section: section '.idata' import data readable library kernel,'kernel32.dll' import kernel,\ ExitProcess,'ExitProcess' |
|||
06 Dec 2018, 14:50 |
|
revolution 06 Dec 2018, 22:20
So the problem is the blank line after the import. If you remove the blank line then it will assemble.
Code: format PE console entry start include 'win32a.inc' ; =============================================== section '.text' code readable executable start: ; Your program begins here: inc eax inc eax dec eax inc eax ; Exit the process: push 0 call [ExitProcess] ; ==================================== ; Imports section: section '.idata' import data readable library kernel,'kernel32.dll' import kernel,\ ExitProcess,'ExitProcess' Code: format PE console entry start include 'win32a.inc' ; =============================================== section '.text' code readable executable start: ; Your program begins here: inc eax inc eax dec eax inc eax ; Exit the process: push 0 call [ExitProcess] ; ==================================== ; Imports section: section '.idata' import data readable library kernel,'kernel32.dll' import kernel,\ \ ExitProcess,'ExitProcess' |
|||
06 Dec 2018, 22:20 |
|
Cos 07 Dec 2018, 00:22
Thanks, its works now. Appreciate your help.
|
|||
07 Dec 2018, 00:22 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.