David Warshawsky
David Warshawsky

Reputation: 142

How would an individual dword of an array in intel x86(little endian) assembly be stored for value 5?

I am currently a university student and my professor zoomed in while recording the lecture so I couldn't see what he was writing. I'm not sure how for example a "DWORD 5" would be stored say for example starting at location 2000:

I was thinking

2000: 00000101

2001: 00000000

2002: 00000000

2003: 00000000

but I'm not sure if it could be.

2000: 00000000

2001: 00000000

2002: 00000000

2003: 00000101

I would appreciate it if someone could explain which one is correct.

Upvotes: 0

Views: 347

Answers (1)

ilkkachu
ilkkachu

Reputation: 6517

x86 is little-endian, and "[a] little-endian system, stores the least-significant byte at the smallest address".

So, the first one.

Upvotes: 2

Related Questions