Help in assembly please

This is a discussion on Help in assembly please within the C++ Programming forums, part of the General Programming Boards category; Hi, I am trying to write this simple program, but I am not sure how to do, please help. I ...

  1. #1
    LePlusMieux
    Guest

    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
    break
    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
    Posts
    6,231
    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
    Location
    Waterloo, Texas
    Posts
    5,655
    Ask here. They have many ASM gurus there

  4. #4
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    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, 04:00 PM
  2. C to assembly interface
    By Roaring_Tiger in forum C Programming
    Replies: 4
    Last Post: 02-04-2005, 02: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 Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 03:28 AM
  5. C,C++,Perl,Java
    By brusli in forum C Programming
    Replies: 9
    Last Post: 12-31-2001, 02:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21