What Does the | Symbol Mean in Assembly?

  • Thread starter Thread starter nothing909
  • Start date Start date
  • Tags Tags
    Assembly
Click For Summary

Discussion Overview

The discussion revolves around the meaning of the | symbol in assembly language, particularly in the context of a specific assembly instruction. Participants explore its interpretation and relevance in comparison to its use in C programming.

Discussion Character

  • Homework-related, Conceptual clarification, Debate/contested

Main Points Raised

  • One participant states that the | symbol is a bitwise OR in assembly, similar to its meaning in C.
  • Another participant questions whether the | symbol has a different definition in assembly, suggesting a need for clarification.
  • A third participant asks why a bitwise OR operation is performed in the given context.
  • Another participant emphasizes that there is no universal assembly language, noting that different processor families have their own assembly languages, which may affect the interpretation of the | symbol.

Areas of Agreement / Disagreement

Participants express differing views on whether the | symbol has a consistent meaning across different assembly languages, indicating a lack of consensus on this point.

Contextual Notes

The discussion highlights the need for specificity regarding the type of assembly language being referenced, as interpretations may vary by processor architecture.

nothing909
Messages
168
Reaction score
4
Homework Statement
Code:
mov.w   #WDTPW|WDTHOLD, &WDTCTL

What does the | symbol mean in assembly? I've been learning C and I've just recently started learning assembly. In C, the | symbol is a bitwise OR, but what does it mean in assembly?
 
Physics news on Phys.org
Are you asking why a bitwise OR is performed?
 
nothing909 said:
What does the | symbol mean in assembly? I've been learning C and I've just recently started learning assembly. In C, the | symbol is a bitwise OR, but what does it mean in assembly?
There is no such thing as generic "assembly." Each processor family (Intel/AMD x86, Intel Itanium, Motorola 68000, ARM, MIPS, etc.) has its own assembly language. You have to specify which kind of assembly language you're working with.
 

Similar threads

Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
Replies
16
Views
4K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
13
Views
39K