flat assembler
Message board for the users of flat assembler.
Index
> Windows > an error with "assume" |
Author |
|
revolution 11 May 2008, 09:05
fasm doesn't have an assume directive, you need to do it with macros. Have you included the macros?
|
|||
11 May 2008, 09:05 |
|
Necromancer13.13 11 May 2008, 09:44
Yes, of course.
I've included '%fasminc%\macro\masm.inc' |
|||
11 May 2008, 09:44 |
|
Necromancer13.13 11 May 2008, 10:47
help please! How can I use assume? :'( Why does not it work?
|
|||
11 May 2008, 10:47 |
|
revolution 11 May 2008, 12:10
Have you tried searching this board yet? There are already some threads about assume problems and their solutions.
|
|||
11 May 2008, 12:10 |
|
Necromancer13.13 11 May 2008, 14:26
Oh.. yes.. sorry... I've found it... O__o
http://board.flatassembler.net/topic.php?t=8424 in masm.inc "reg\#@assumed equ ;<--- add a backslash here " But why there is no backslash there by default? Is this bug? =-O |
|||
11 May 2008, 14:26 |
|
revolution 11 May 2008, 15:08
Yes, it is a bug, and the fix has not yet been updated into the download package.
|
|||
11 May 2008, 15:08 |
|
Necromancer13.13 11 May 2008, 15:30
heh.. It's a pity
I've patched my masm.inc, but there is one more question about structures:( Now I try to compile this Code: mov esi,[ebp+kernel32_base] mov ebx,esi assume esi:IMAGE_DOS_HEADER add esi,[esi.e_lfanew] assume esi:IMAGE_NT_HEADERS lea esi,[esi.OptionalHeader] assume esi:IMAGE_OPTIONAL_HEADER FASM finds error in "lea esi,[esi.OptionalHeader]". But there is nothing wrong there =-O P.S. These are some structures from an include-file peformat.inc: Code: struct IMAGE_NT_HEADERS Signature dd ? ; IMAGE_NT_SIGNATURE FileHeader IMAGE_FILE_HEADER OptionalHeader IMAGE_OPTIONAL_HEADER ends and Code: struct IMAGE_DOS_HEADER e_magic dw ? ; { Magic number } ; IMAGE_DOS_SIGNATURE e_cblp dw ? ; { Bytes on last page of file } e_cp dw ? ; { Pages in file } e_crlc dw ? ; { Relocations } e_cparhdr dw ? ; { Size of header in paragraphs } e_minalloc dw ? ; { Minimum extra paragraphs needed } e_maxalloc dw ? ; { Maximum extra paragraphs needed } e_ss dw ? ; { Initial (relative) SS value } e_sp dw ? ; { Initial SP value } e_csum dw ? ; { Checksum } e_ip dw ? ; { Initial IP value } e_cs dw ? ; { Initial (relative) CS value } e_lfarlc dw ? ; { File address of relocation table } e_ovno dw ? ; { Overlay number } e_res dw 4 dup (?) ; { Reserved words } e_oemid dw ? ; { OEM identifier (for e_oeminfo) } e_oeminfo dw ? ; { OEM information; e_oemid specific} e_res2 dw 10 dup (?) ; { Reserved words } e_lfanew dd ? ; { File address of new exe header } ends |
|||
11 May 2008, 15:30 |
|
revolution 11 May 2008, 15:36
Where is your IMAGE_OPTIONAL_HEADER structure. You may need to fully specify which member of the structure you want
Code: lea esi,[esi.OptionalHeader.someMemberHere] |
|||
11 May 2008, 15:36 |
|
Necromancer13.13 11 May 2008, 16:16
Thank you, revolution!! Thank you! )
Yeah! ) Now it works Thank you ) |
|||
11 May 2008, 16:16 |
|
revolution 11 May 2008, 16:45
3 x "Thank you" ---> so, 3 x "Your welcome".
|
|||
11 May 2008, 16:45 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.