Meaning of "?" (Question Mark) in assembly

1

2

For some project i am required to draw the memory diagram of assembly code.I know that in assembly language "?" means, values are un-initialized. But what happens exactly in memory when i put "?"?

Lets take the code below

.data
ABC byte 8
ABC byte ?
ABC byte 7

in my memory diagram,should i just put zeros for "?" value or does it keep the previous values in those blocks?

Wardruna

Posted 2015-07-11T16:46:48.063

Reputation: 33

Answers

0

But what happens exactly in memory when I put "?"

There is no answer because the value is undefined!

  • Some space is allocated for the data, but it's value is unitialised (or undefined).

  • In other words it can contain anything at all (random data that was already at that memory address).

  • This means that if you want to read from this memory, and expect to read meaningful data, you must first write to it.

DavidPostill

Posted 2015-07-11T16:46:48.063

Reputation: 118 938

That was the answer i was looking for: "it can contain anything at all (random data that was already at that memory address)" – Wardruna – 2015-07-11T18:17:08.100