1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

assembly language

Discussion in 'Software Development' started by martin65, Nov 12, 2007.

Thread Status:
Not open for further replies.
  1. martin65

    martin65 Thread Starter

    Jan 7, 2006
    I've started working with assembly language, with simulator LC-2, for a while!
    now I'm trying to write a program that multiplies a number by -6 . I've got the right code for multiplying it by 6, and then I was trying to inverse the sign of the result of that to get the answer if it was multiplied by -6. so I did the same code as if its multiplied by 6, and then the final result of that was stored in register R3, so to get the result of multiplying the same number with -6, I was trying to get the negative of R3 so I wrote: NOT R3, R3 which means NOT R3 and store the result in itself! so say my number was 4 and I wanted 4x-6=-24, so I got 24 and then inverted its sign to get -24 but then simulating this in LC-2 gave me -25 !!!
    do u know why? and what do I have 2 do 2 fix it??
    aside: by the way do u know whats -6 in hexadecimal?

    thanx in advance
  2. Elvandil


    Aug 1, 2003
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Similar Threads - assembly language
  1. Joe Hudson
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/650860

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice