I'm writing an assembly program which I want to be able to do the (basic) following:
x = 100;
y = int[x]
E.g. the size of y depends on the value of x.
NOTE: I am using NASM instruction set on a 64 bit Ubuntu system.
In assembly I know that the size of an array needs to be declared in the data section of the file e.g.
myvariable resq 1000
The problem is I won't know how big to make it till I have done a previous calculation. What I really want is something like:
mov rax, 100
myvariable resq rax
But that's not allowed right? Just having some confusion over array access/declarations in assembly.
Any pointers appreciated!