flat assembler
Message board for the users of flat assembler.
Index
> Windows > odd error |
Author |
|
vid 04 May 2006, 14:41
you need to
Code: include '%fasminc%/MACRO/import32.inc' "library" is not directive, it's just macro defined in this file |
|||
04 May 2006, 14:41 |
|
blacky 04 May 2006, 15:53
IS theres omething about using 'call' and invoke that makes using the words OFFSET or ADDR not work?
why do i get undefined symbol for this: Code: push offset pinfo push offset sinfo push 0 push 0 push CREATE_NEW_CONSOLE push 0 push 0 push 0 push offset wmoname push 0 call [CreateProcess] pinfo PROCESS_INFORMATION sinfo STARTUPINFO are defined in .data section. And it also wont let me do things like push pinfo.dwProcessID |
|||
04 May 2006, 15:53 |
|
f0dder 04 May 2006, 16:26
blacky, "offset" is a relic from MASM. You should just do "push pinfo" and "push sinfo" to store the addresses of those variables.
When accessing memory, you need "indirection brackets" - like "push [pinfo.dwProcessID]". Also, why are you using manual pushpushpushpushcall instead of invoke? |
|||
04 May 2006, 16:26 |
|
blacky 04 May 2006, 17:12
yea , f0dder thanks i just took a look at a very good asm reference and i used the formal way. (push pinfo)
I dont know why but the push push call just makes sense to me and it helps me understand how 'real' assembly works, i use invoke whenever my fingers feel like typing it heh.. thx. |
|||
04 May 2006, 17:12 |
|
vid 04 May 2006, 17:58
f0dder wrote: Also, why are you using manual pushpushpushpushcall instead of invoke? you can comment code better then |
|||
04 May 2006, 17:58 |
|
blacky 04 May 2006, 18:13
so stupid i just had to erase it..
Last edited by blacky on 04 May 2006, 18:29; edited 1 time in total |
|||
04 May 2006, 18:13 |
|
f0dder 04 May 2006, 18:19
vid wrote:
Do you really need a comment for each parameter passed to a function? :-s Blacky, MB_OK is a symbolic constant for 0 - so you *could* just "push 0", but you *should* "push MB_OK". Anyway, you're forgetting the 'hwnd' parameter to MessageBox, use 0. _________________ - carpe noctem |
|||
04 May 2006, 18:19 |
|
blacky 04 May 2006, 18:28
yea just noticed.. dumbest mistake ive done..how careless.
|
|||
04 May 2006, 18:28 |
|
okasvi 04 May 2006, 19:59
vid wrote:
yep, it helps, sometimes when using api not used to and pushing temp vars i put comment after it what it is supposed to be, and when i was starting with fasm it helped me to see what i do and where in ollydbg easier... _________________ When We Ride On Our Enemies support reverse smileys |: |
|||
04 May 2006, 19:59 |
|
Tomasz Grysztar 05 May 2006, 03:01
You can put a comment next to each parameter with "invoke", too (just split it to multiple lines).
|
|||
05 May 2006, 03:01 |
|
vid 05 May 2006, 08:34
tomasz: of course, but indenting makes problem then. it just "looks bad"
|
|||
05 May 2006, 08:34 |
|
RedGhost 06 May 2006, 03:57
i use push/call not invoke aswell, and it does allower a cleaner syntax for commenting specific parameters
|
|||
06 May 2006, 03:57 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.