Very simple assembly question: labels vs variables
Posted: Fri Oct 28, 2011 5:58 pm
Okay, so I'm not a novice to programming and I'm rather embarrassed to ask such a simple question...but I'm getting frustrated with trying to rephrase "assembly lables vs variables" into something that'll produce meaningful results in Google.
BUT.
I'm failing to see any functional difference between the following two lines:
Is that because there actually is no difference?
It seems like most variables and string constants are always the first one, but then when I see example code for things like disk address packets and bios parameter blocks, they use labels instead of variable names to isolate certain parts. Why?
BUT.
I'm failing to see any functional difference between the following two lines:
Code: Select all
string1 db 'Hello',0
string1: db 'Hello',0
It seems like most variables and string constants are always the first one, but then when I see example code for things like disk address packets and bios parameter blocks, they use labels instead of variable names to isolate certain parts. Why?