What is the meaning of MY_TABLE TIMES 10 DW 0 in assembly

Click For Summary

Discussion Overview

The discussion centers around the interpretation of the assembly programming statement "MY_TABLE TIMES 10 DW 0," specifically its meaning in terms of memory allocation and initialization in assembly language.

Discussion Character

  • Exploratory, Technical explanation

Main Points Raised

  • One participant expresses confusion about the statement, seeking clarification on its meaning regarding memory allocation.
  • Another participant clarifies that the statement is not actual assembly code but a directive to the assembler to allocate memory for 10 words, initializing them to 0.
  • A further contribution explains that the definition of a "word" can vary based on CPU architecture, noting that it can be 16, 32, or 64 bits, and provides an example of an older architecture with a different word size.

Areas of Agreement / Disagreement

Participants do not appear to reach a consensus on the specifics of the term "word" in different architectures, indicating that multiple interpretations may exist.

Contextual Notes

The discussion does not resolve the ambiguity surrounding the definition of "word" across different CPU architectures, which may affect the understanding of the assembly statement.

shantanu135
Messages
5
Reaction score
0
i am new to this one.and this is about assembly programming.on reading about assembly on tutorialspoint i came up to this.i didnt understan it correctly.it says
"Allocates10 words (2 bytes) each initialized to 0"
what does this statement mean?
please someone tell me about the meaning of this statement.
 
Technology news on Phys.org
This is not assembly code, it is a message to the assembler. This "pseudo-code" tells the assembler to allocate 10 words in memory, creating a name for the first location and make sure they are initialized to 0 at run-time.
 
To be clear: a byte is 8 bits and a word varies based on the CPU architecture you're programming for. Hence for some a word is 16 bits = 2 bytes for others a word might be 32 bits (4 bytes) or 64 bits. Some older architectures like the Honeywell 6000 mainframe used 36 bits per word.

https://en.wikipedia.org/wiki/Word_(computer_architecture)
 
thanks
 

Similar threads

Replies
60
Views
18K
Replies
29
Views
5K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 18 ·
Replies
18
Views
7K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
Replies
1
Views
4K
Replies
6
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K