What Does the | Symbol Mean in Assembly?

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

The | symbol in assembly language represents a bitwise OR operation, identical to its function in C programming. This was confirmed in a discussion regarding the assembly instruction "mov.w #WDTPW|WDTHOLD, &WDTCTL," where participants emphasized that the meaning of the | symbol does not change across different programming languages. Furthermore, it is important to note that assembly language varies by processor family, including Intel/AMD x86, ARM, and MIPS, necessitating specificity when discussing assembly operations.

PREREQUISITES
  • Understanding of bitwise operations in programming
  • Familiarity with C programming language
  • Basic knowledge of assembly language concepts
  • Awareness of different processor architectures (e.g., x86, ARM)
NEXT STEPS
  • Research the differences in assembly language syntax across various processor families
  • Explore advanced bitwise operations in C and their assembly equivalents
  • Learn about assembly language programming for Intel/AMD x86 architecture
  • Study the role of assembly language in embedded systems programming
USEFUL FOR

Students learning programming, software developers transitioning from C to assembly, and anyone interested in low-level programming and 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
Last edited:
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
4K
Replies
16
Views
4K
  • · Replies 1 ·
Replies
1
Views
5K
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
13
Views
38K