flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
DJ Mauretto 18 Oct 2011, 13:18
Hello,
With cdecl calling convention you must clean up the stack in this way : Code: push a push b call function name add esp, size*2 ; size * number of arguments( if you use 32 bit 4*2) For stdcall you do not have to clean the stack: Code: push a push b push c call function name ![]() _________________ Nil Volentibus Arduum ![]() |
|||
![]() |
|
sinsi 18 Oct 2011, 13:34
Those 66s look a bit strange, that's a size override. Not pushing dwords?
|
|||
![]() |
|
Andy 18 Oct 2011, 13:43
yes, freq and duration are dwords, I used wrong opcodes?
|
|||
![]() |
|
DJ Mauretto 18 Oct 2011, 13:49
Quote: yes, freq and duration are dwords, I used wrong opcodes? Yes ![]() what language are you using? C language ? Java ? Visual Basic ? Code: 68 00 10 ; push 1000 68 00 10 ; push 1000 B8 FF 79 83 7C ; mov eax,7c8379ff FF D8 ; call eax C3 ; ret _________________ Nil Volentibus Arduum ![]() |
|||
![]() |
|
Andy 18 Oct 2011, 14:01
auch, it's my fault, I typed wrong it's 68 in my example. I am using AutoIt. Thanks for your help guys, seems I made many mistakes today, actually my error wasn't in this raw code, but anyway I learn something: to clean up the stack. I have just one more question, where I can find some good beginers FASM tutorials?
|
|||
![]() |
|
DJ Mauretto 18 Oct 2011, 14:14
Quote: I am using AutoIt ![]() Quote: where I can find some good beginers FASM tutorials http://flatassembler.net/docs.php ![]() _________________ Nil Volentibus Arduum ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.