flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
vid
in FASM, name of label always stands for offset. Eg. if "szMsg" is at offset 403020, then "mov eax, szMsg" means "mov eax, 403020", and "mov eax, [szMsg]" means "mov eax, [403020]". First moves offset, second moves value at offset. BTW, this is same in NASM.
|
|||
![]() |
|
Izu1
This still doesnt compile, says write failed.
Code: push MB_OK push szDlgTitle push szMsg push 0 call [MessageBox] |
|||
![]() |
|
Picnic
Hi Izu1,
Perhaps an instance of the application keep running in the background? |
|||
![]() |
|
vid
Write failed means the output file can't be (re)written. You probably didn't finish your application, and it is still running (so the EXE file is locked and can't be overwritten by FASM). Hit CTRL+ALT+DEL and kill it.
|
|||
![]() |
|
Izu1
Yes seems like the process did not terminate properly...
![]() |
|||
![]() |
|
revolution
Standard call (stdcall) spec says that the stack is adjusted by the callee. So you don't have to adjust it.
|
|||
![]() |
|
Izu1
thanks for help everyone, I'm still kind of new to assembler programming and completely new to fasm.
|
|||
![]() |
|
Picnic
Hi everyone,
Why this code output is 321 in MASM and 123 in FASM? Code: .686 .model flat, stdcall include \masm32\include\windows.inc include \masm32\include\kernel32.inc include \masm32\include\user32.inc includelib \masm32\lib\kernel32.lib includelib \masm32\lib\user32.lib .data msg dd 0,0 .code main: mov [msg], "123" invoke MessageBox, 0, ADDR msg, 0, 0 invoke ExitProcess, 0 end main Code: format pe console 4.0 include 'win32ax.inc' .data msg dd 0,0 .code main: mov [msg], "123" invoke MessageBox, 0, addr msg, 0, 0 invoke ExitProcess, 0 .end main |
|||
![]() |
|
Tomasz Grysztar
See fasm's FAQ, third question.
|
|||
![]() |
|
Picnic
Thanks for response Tomasz Grysztar.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.