c - Variable in NASM -
i trying convert lines:
struct node * head; struct node * tail;
into nasm (x86-64). code partially in c , partially in assembly.
should write in section .bss
this:
head resb 8 tail resb 8
also making global in section .text
:
global head:data 8 global tail:data 8
? doesn't want work :/ know pointer in fact address, unsigned long
.
=====
here the struct:
struct node { unsigned long length; char * buf; struct node * previous; struct node * next; };
you might want define global variables in data section can initialize values. pointers can defined quad words using dq
:
section .data global head head dq 0 global tail tail dq 0