我正在尝试将内存动态分配到堆中,然后在这些内存地址中分配值。我了解如何分配内存,但我如何将例如寄存器中的值分配给第一个动态内存地址?这是我到目前为止:
push rbp
mov rbp, rsp ;initialize an empy stack to create activation records for the rest of the subroutines
mov rax, 0x2d ;linux system call for brk()
mov rbx, 0x0 ;to get the adress of the first adress we are allocating we must have 0 in rbx
int 0x80 ;calls the linux operating system kernel for assistance
mov [brk_firstLocation], rax ;the first position in the heap will be returned in rax thus i save the first loaction in a …Run Code Online (Sandbox Code Playgroud)