flat assembler
Message board for the users of flat assembler.
Index
> Windows > [solved] undefined symbol 'CreateFile' |
Author |
|
AsmGuru62 14 Jul 2014, 03:16
Code: numBytes dd 128 ... mov eax, numBytes ; EAX <-- address of numBytes mov eax, [numBytes] ; EAX <-- contents of numBytes (128 in this case) 1. Try to use invoke for all APIs (CreateFile, GetFileSize), like you do with ExitProcess. 2. No need for SetFilePointer - when file just opened - its pointer is already zero - at the beginning of the file. |
|||
14 Jul 2014, 03:16 |
|
Foxxy 14 Jul 2014, 05:05
Why should I use invoke over normal calling? I guess it makes it neater. However, I did try to use invoke, but it still gave me the error. And thank you for clearing up the brackets for me, in disassembly brackets indicate the address of something, not the contents.
|
|||
14 Jul 2014, 05:05 |
|
Foxxy 14 Jul 2014, 05:19
Also, as it turns out it is a bad idea to import something already declared in 'win32ax.inc', it causes this issue.
|
|||
14 Jul 2014, 05:19 |
|
AsmGuru62 14 Jul 2014, 10:39
I think you're mistaken about disassembler.
Please compare these: DisAsm: Code: ; ; Load into ECX from address "ebx + 4Ch" ; mov ecx, dword [ebx + 4Ch] FASM: Code: ; ; Load into EAX from address "numBytes" ; mov eax, [numBytes] Brackets present in both cases and whatever inside is an address. |
|||
14 Jul 2014, 10:39 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.