CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: Assembly Direct Addressing Mode (Subtracting) Question

  1. #1
    Join Date
    Feb 2016

    Assembly Direct Addressing Mode (Subtracting) Question

    I have been literally stuck on this question forever. I have no idea how to do it. Please help if you can.

    Question: Write a program direct.asm that subtracts var2 from var1, then places the result in answer. Declare all three variables in the data segment as words. Inititalize var1 as 3231H and var2 as 2217H.

    I know that I am suppose to put dw because it is 16-bit integer but it keeps giving me errors.

  2. #2
    Join Date
    Jun 2010

    Re: Assembly Direct Addressing Mode (Subtracting) Question

    And what are these errors, and at which locations in your code? You'd best post at least a sample from your code so we can see what you have written. (Please use code tags.)

    Also, in the first place, what CPU architecture are you writing that for? Each architecture has its own assembly language, and there's dozens of them out there. And some of these even exist in a few variations...
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)