Question

I'm new to assembly, and now I'm trying to figure out what do the dw, db, and ? mean in a struc.

For example here:

struc segment_descriptor
  seg_length0_15        dw      ?
  base_addr0_15         dw      ?
  base_addr16_23        db      ?
  flags                 db      ?
  access                db      ?
  base_addr24_31        db      ?
ends segment_descriptor
Était-ce utile?

La solution

"dw" is variable of type WORD, "db" is variable of type BYTE, dd is variable of type double word (int32_t). "?" means the values are not initialized.

Autres conseils

There is no answer because the value is undefined!

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

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

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top