Quote:
Originally Posted by ross
Or if you care only about extract high bits you can do:
Code:
move.w d0,-(sp)
move.b (sp)+,d0 *
16 cycles.
[* based on 68k stack auto-align property ]
|
I like such tricks! Can it work with 68020? BTW I have a routine to print the next text, for example,
Code:
bsr printstr
dc.b "Hello World!",0
even
printstr:
movea.l (sp)+,a2
lea stringbuf(a3),a4 ;A3 is a base for data section
moveq #0,d0
.l1: addq.w #1,d0
move.b (a2)+,d1
move.b d1,(a4)+
bne .l1
move.l a2,d1
addq.l #1,d1 ;is it necessary?
andi.b #$fe,d1
move.l d1,-(sp)
;movea.l GRAPHICS_BASE(a3),a6
;movea.l RASTER_PORT(a3),a1
lea stringbuf(a3),a0
subq.w #1,d0
jmp Text(a6)
So I have to remove a possible digit 1 at A2. Maybe is there yet another trick which help to improve address register inability to be ANDed?
Quote:
Originally Posted by chb
Is there a special case for n = 8 which needs less cycles?
|
I am sure this is a mistake in the book.