This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: BRA NEXT Check next item LISTY MOVE.B -1(A1), (A2)+ Copy item from list Y NEXT DBRA D0, LOOP Continue if more entries 17 Problem 3 A 68000 program to reverse the order of bits in register D2: MOVE #15, D0 Use D0 as counter CLR D1 D1 will receive new value LOOP LSL D2 Shift MSB of D2 into X bit ROXR D1 Shift X bit into MSB of D1 DBRA D0, LOOP Repeat until D0 reaches &1 MOVE D1, D2 Put new value back in D2 Problem 4 a. The program scans through the list starting location $AC0000 to find the 17 th negative number in the list. b. Machine code Location Code $AB0000 $4280 $AB0002 $207C $AB0004 $00AC $AB0006 $0000 $AB0008 $3218 $AB000A $6CFC $AB000C $5280 $AB000E $0C40 $AB0010 $0011 (= 17) $AB0012 $6DF4 $AB0014 $33E8 $AB0020 $FFFE (=-2) $AB0022 $00AA $AB0024 $FFFE The last four words could be just three words: $AB0014 $33E0 $AB0020 $00AA $AB0022 $FFFE...
View Full Document
This note was uploaded on 02/21/2011 for the course ECE 662 taught by Professor Orin,d during the Winter '08 term at Ohio State.
- Winter '08