flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
pool
..
Last edited by pool on 17 Mar 2013, 12:12; edited 1 time in total |
|||
![]() |
|
nop
Code: mov esp,top_of_stack <rest of code> top_of_stack: times 256 db ? ;or whateva size stack u want or need |
|||
![]() |
|
pool
..
Last edited by pool on 17 Mar 2013, 12:14; edited 1 time in total |
|||
![]() |
|
baldr
Now think of it again: stack grows top-down (i.e. to lower addresses), and both examples set esp to the start of memory block.
|
|||
![]() |
|
sinsi
nop wrote:
Code: mov esp,top_of_stack <rest of code> times 256 db ? ;or whateva size stack u want or need top_of_stack: ![]() |
|||
![]() |
|
pool
..
Last edited by pool on 17 Mar 2013, 12:14; edited 1 time in total |
|||
![]() |
|
typedef
pool wrote: So my code would be: hahaha. You need to setup the stack itself first before you call any function. Unless it knows where to return. |
|||
![]() |
|
HaHaAnonymous
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:06; edited 1 time in total |
|||
![]() |
|
pool
..
Last edited by pool on 17 Mar 2013, 12:14; edited 1 time in total |
|||
![]() |
|
cod3b453
Windows will normally allocate separate page regions for each thread stack but the code you have will work too as long as the memory region is a valid read/write area and large enough. In fact, I'm using this to debug thread/virtual-syscall code for my OS project in VS2010.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.