Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8297959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:35:42+00:00 2026-06-08T15:35:42+00:00

I just started learning assembler language. I came across the concept of EQU. At

  • 0

I just started learning assembler language. I came across the concept of EQU. At first it made perfect sense, until I got to DC.B. What is the difference between DC.B and EQU? Can’t you just use EQU for every constant?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T15:35:44+00:00Added an answer on June 8, 2026 at 3:35 pm

    I’m not familiar with your specific assembler syntax, so this answer is an educated guess.

    The EQU directive is used to tell the assembler that you wish to have a named symbolic constant (often computed from other assembler values including other EQU definitions) that you can refer to in other places in the assembly source text. You must always write

     symbolname EQU constantexpression
    

    This allows you to write symbolname instead of the constantexpression in other places in your source text. But this name by itself has no direct effect on the final assembled program binary data.

    “DC.B” (I assume ‘define constant (byte)’ is used to tell the assembler that you with the final assembled program to have a byte of data embedded in it at the relative position in the source file”. You write

    optionalname DC.B  constantexpression
    

    to have the computed value of the constant expression placed into a data byte in the assembled program binary data.

    So, you might write

     AnEvenNumber  EQU    2
     MyEvenNumber  DC.B   AnEvenNumber
    

    The first line produces just a named constant, and without the second, has no effect on your binary. The second line produces a byte in your binary, that contains the value designated by the named symbol constant.

    Notice that the DC.B directive also allows an optional name; this symbol can also be used in other places in your code. Depending on the sophistication of your assembler, you may be able to define

     LocationOfEvenNumber EQU  MyEvenNumber
    

    and

          DC.W    LocationOfEvenNumber
    

    now producing a word in your binary file that “points” to your byte of binary data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started learning Python a couple of days ago as my first language
Just started learning Groovy, got the PragProg book Programming Groovy and had a problem
I just started learning Haskell. I think I've got the basics down, but I
Just started learning NServiceBus and trying to understand the concept. When it talks about
Just started learning mvc3. I've built a fairly basic website (also using EF-Code-First if
I just started learning C#. Sorry for the noob question. My first training app
Just started learning Php on my own, and got stuck at the beginning. This
I just started learning jquery and I am struggling on some concept problem. If
Just started learning c++ today and im pretty boggled. its an amazing language but
I just started learning python and django and I have a question. I got

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.