I am trying to learn assembly language and I need clarification on something. Please correct me if I am wrong on any of this since I don't know much about assembly.
All the tutorials I watch have the variables of assembly programs assigned to a memory address like 0x0000
, and I can understand that you must manually assign memory addresses in assembly, but how do you know what address to use?
Obviously it makes sense to start at the lowest memory address possible, but what if the variable you are assigning is larger than the memory available at 0x0000
? Would the variable in question run over to 0x0001
or 0x0002
? If it did wouldn't that mess up other variables assigned spaces with similar numbering (or are you not supposed to assign them that close)?
If I have two programs written in assembly running at the same time (in a modern OS) and I have used the same memory addresses in both programs, will one program conflict with the other, or does the OS just assign an available memory address regardless of what was actually written in the program?
Any information on the subject is appreciated.