Q BgQuestion:

      
Novice
Karma Points: 25
Respect (26%):
posted by  jbaili on 11/5/2009 2:25:52 AM  |  status: Closed  |  Earned Karma: 25

assembly6

Course Textbook Chapter Problem Needs by
N/A N/A N/A N/A 11/5/2009 at 8:00:00 PM
Question Details:

Write a 68000 assembly program to clear the contents of memory

locations in the range $5000 to $6000

?
Bonus Point Alert! Earn +7 additional karma points for helping this gold member.

AAnswers:

Answer Question Ask for clarification
(SME)
Moderator
posted by rachel 's on 11/5/2009 3:10:05 AM  |  status: Live
Asker's Rating: Lifesaver   
Response Details:
Dear,
               MOVE.W          #$1000, D0           ;     Load length of data into D0
               MOVEA.L         #$00005000, A0   ;     Load starting address into A0
REPEAT:CLR.W             (A0)+                      ;    Clear a location pointed to  by A0 and increment A0 by 2
                SUBQ.W         #1, D0                     ;    Decrement D0 by 1
                BNE.B             REPEAT                 ;    Branch to repeat if Z=0, otherwise it go to next instruction.
 
    CLR.W  (A1): IF A1.L = $00005000, then after execution of CLR.W[A1], the 16-bit content memory location $005000 will be cleared zero.
  clear 100016 words starting at memory locations 00500016.
  Note that # symbol used by motorola assembler to indicate immediate mode.                                  
         
Answer Question Ask for clarificarion

Join Cramster's Community

Cramster.com brings together students, educators and subject enthusiasts in an online study community. With around-the-clock expert help and a community of over 100,000 knowledgeable members, you can find the help you need, whenever you need it. Join for free today » How Cramster is different from tutoring »