I have recently started to learn assembly and I keep on coming across a certain syntax which i don't fully understand and after spending hours researching I find the syntax in code but no explanation so I was hoping someone could explain.
I see it in many instructions but for an example i will use SUB.
SUB EAX, DWORD PTR DS:[78E32C]
My understanding is that this would subtract the value at memory address 0078E32Ch from the EAX register. However I do not understand what the DS means. I sometimes also see SS in the same place of DS.
It has been bugging me now. Is is not as correct just to use:
SUB EAX, DWORD PTR [78E32C]
My guess is from the : syntax is that it means the memory segment referred to in the DS segment register, so in fact it means the memory address DS:0078E32C but I can't find anything that confirms this.
Am I wrong in thinking this?
Thanks for any comments and I apologise for such a basic question.