0 Replies - 1068 Views - Last Post: 04 September 2013 - 01:23 PM Rate Topic: -----

#1 Sushi2006  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 04-September 13

Brand new to assembly language, questions on homework.

Posted 04 September 2013 - 01:23 PM

So the problem states write a complete 68000 assembly language program to add 100 numbers stored in $A00. Store the result as a longword in $B00.

So I'm trying to work this out and I feel like I need to put a loop into the code somewhere or adding 100 numbers would take an incredibly long time to type out.

Now I know the basic look of it should be like this:

[Org $400
Clr.L D0
ADD.B $A00,D0
ADD.B $A01,D0
ADD.B $A02,D0
MOVE.B D0,$B00
TRAP #15
DC.W 0]

But I don't know where to put MOVEQ into this, and I don't know how I would tell the program to do it for 100 numbers.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1