x86 - how can define variable on heap in assembly -


i want declare new variable on heap ( don't want use stack) . how can it? want know instruction? assume there 10 variable use stack , want change location of them , put them on heap.

easy answer, write simple application in c uses getmem.
pick disassembler , @ x64 code compiler generates.
you'll have reproduce same code in assembler.

longer answer:
there no x64 instruction putting stuff on heap, takes 100 instructions that, that's why people call library function.
library functions highly optimized, don't bother reinventing wheel.
once you've got memory reference, it's simple pointer. assembly excels @ pointer manipulation should easy.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -