Thread: Help in assembly please

  1. #1

    Angry Help in assembly please

    Hi, I am trying to write this simple program, but I am not sure how to do, please help.

    I have the following:
    program 1
    org $500
    start move.l sam,d0
    add.l sue,d0
    add.l ted,d0
    add.l jill,d0
    move.l d0,sum
    subq.w #3,sam
    subq.w #3,ted
    addq.w #5,sue
    addq.w #5,jill
    org $1000
    sam dc.l $abcd
    sue dc.l @1234
    ted dc.l %101100111
    jill dc.l 2349
    sum ds.l 1

    Here's what I am supposed to do:

    1. Store "Program 1" at location $2000 then declare a constant 316 and label it with "bear"
    2. Let horse be 200 and tiger be 18
    3. Compute ((bear+horse)-tiger) and store the result to "result"
    4. Now isolate bit 0 and 7 of "result" then store them to "done"
    5. The program needs to be loaded at location $1000 and data need to be loaded at location $2000.

    Thanks for any help.

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    You do realise this is a C++ board !
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Waterloo, Texas
    Ask here. They have many ASM gurus there
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
        return std::pow
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;

  4. #4
    Registered User
    Join Date
    Apr 2002
    Um, your assignment is talking about bears and tigers and your program is defining "jill" and "sue". That doesn't make sense. Looks like your using M68K correct? Send me a message if you still can't figure it out.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Learning Assembly
    By mrafcho001 in forum Tech Board
    Replies: 5
    Last Post: 03-12-2006, 05:00 PM
  2. C to assembly interface
    By Roaring_Tiger in forum C Programming
    Replies: 4
    Last Post: 02-04-2005, 03:51 PM
  3. assembly language...the best tool for game programming?
    By silk.odyssey in forum Game Programming
    Replies: 50
    Last Post: 06-22-2004, 01:11 PM
  4. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of
    Replies: 7
    Last Post: 04-02-2003, 04:28 AM
  5. C,C++,Perl,Java
    By brusli in forum C Programming
    Replies: 9
    Last Post: 12-31-2001, 03:35 AM