flat assembler
Message board for the users of flat assembler.
Index
> Main > .. |
Author |
|
pool 03 Jan 2013, 01:03
..
Last edited by pool on 17 Mar 2013, 12:12; edited 1 time in total |
|||
03 Jan 2013, 01:03 |
|
nop 03 Jan 2013, 01:37
Code: mov esp,top_of_stack <rest of code> top_of_stack: times 256 db ? ;or whateva size stack u want or need |
|||
03 Jan 2013, 01:37 |
|
pool 03 Jan 2013, 02:12
..
Last edited by pool on 17 Mar 2013, 12:14; edited 1 time in total |
|||
03 Jan 2013, 02:12 |
|
baldr 03 Jan 2013, 10:27
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.
|
|||
03 Jan 2013, 10:27 |
|
sinsi 03 Jan 2013, 11:00
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: |
|||
03 Jan 2013, 11:00 |
|
pool 03 Jan 2013, 11:22
..
Last edited by pool on 17 Mar 2013, 12:14; edited 1 time in total |
|||
03 Jan 2013, 11:22 |
|
typedef 03 Jan 2013, 17:01
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. |
|||
03 Jan 2013, 17:01 |
|
HaHaAnonymous 03 Jan 2013, 17:08
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 22:06; edited 1 time in total |
|||
03 Jan 2013, 17:08 |
|
pool 03 Jan 2013, 17:28
..
Last edited by pool on 17 Mar 2013, 12:14; edited 1 time in total |
|||
03 Jan 2013, 17:28 |
|
cod3b453 03 Jan 2013, 18:40
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.
|
|||
03 Jan 2013, 18:40 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.