How to make a dynamic array in the middle of a program in assembly? I tried this code and it didn't work
.CODE
.DATA
list DWORD <register or memory>DUP(?)
Do you know any way to solve this problem?
dup
is not NASM or FASM syntax, but MASM; and since you cannot legally use MASM on *nix, sys_newstat
and sys_brk
would be out of the question. So you are targeting Windows?
You would use the Heap*
memory API functions. You would use HeapAlloc
and HeapReAlloc
. If you don't mind the CRT dependency, then you could do as Linuxios reccommends and use malloc