0

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.

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Clockowl
0

It's probably the indeed that. DS: Data Segment, so it'd be.. DS + [78E32C]. I can't think of anything else, pretty sure it's that.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.