I hope these questions is rather simple: (NASM Compiler, Linux, x86 Intel Syntax)
PART 1:
I am trying to figure out how to use the .bss section of an Assembly program to find a way to store values, like a value from an operation (+ - * /), to an declared variable. For example:
section .bss
variable: resb 50 ;Imaginary buffer
section .text
add 10,1 ;Operation
;move the result into variable
So, I know it is possible to do this with the kernel intterupt for reading user input (but that involves strings, but is there a way to copy this value into the variable variable so that it can be used later? This would be much easier than having to push and pop two things on and off the stack.
PART 2:
Is there a way to remove the value of the variable in the .bss section? In other words, if I want to store a new value in the .bss variable, how could I do it without the characters/values already in the variable not getting compounded with the new value(s)?
Thanks