flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
AsmGuru62 02 Apr 2016, 13:30
As I discovered, it is a version mismatch.
I have built an app using VS 2015 on Win 7 and then tried to run it on XP. Got the exact same misleading error. I think the format directive has a version part - try to set version 5.1 or 6. Go to 2.4.2 from here: http://flatassembler.net/docs.php?article=manual#2.4 |
|||
![]() |
|
revolution 02 Apr 2016, 13:37
You forgot the ".end"
Code: .end start |
|||
![]() |
|
l4m2 02 Apr 2016, 13:48
Now okay to run but no output
Code: format pe console include 'win32ax.inc' macro rdt { irp x, pushad, cpuid, popad, rdtsc \{ x \} } .data align 4 num1 dd -12345 num2 dd 333 stri: db '***', 61 dup 0 dummy dd 1 .code proc start rdt mov esi, eax mov eax, [num1] cdq sub esi, eax idiv [num2] rdt invoke WriteFile, <invoke GetStdHandle,STD_OUTPUT_HANDLE>, stri, \ <invoke wsprintf, stri, <"%d", 10>, esi>, dummy, 0 invoke ExitProcess, 0 endp .end start |
|||
![]() |
|
revolution 02 Apr 2016, 13:56
Yup. wsprintf is a ccall function so you can't use it with the invoke like that, the stack doesn't get restored.
|
|||
![]() |
|
l4m2 02 Apr 2016, 14:13
revolution wrote: Yup. wsprintf is a ccall function so you can't use it with the invoke like that, the stack doesn't get restored. |
|||
![]() |
|
l4m2 02 Apr 2016, 14:17
The result is so strange and I can't copy it out from the console:.
740064 686099 306980 01209 1363976 94890 9769264 |
|||
![]() |
|
revolution 02 Apr 2016, 14:32
l4m2 wrote:
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.