flat assembler
Message board for the users of flat assembler.
![]() |
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. |
|||
![]() |
|
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.
|
|||
![]() |
|
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.
|
|||
![]() |
|
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. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.