Re: [hatari-devel] New version of WinUAE's cpu core

[ Thread Index | Date Index | More Archives ]

Sigh. I forgot to set A0 back, later code relies upon it, so there's no extra nop available if d0 needs to be set to 0 for subsequent code with this solution. The last word instead needs to be $ffe8, lea -24(a0),a0


On Mon, Nov 24, 2014 at 1:01 PM, Troed Sångberg <troed@xxxxxxxxxxx> wrote:
(The space filling nop in region one might be needed to set d0 to 0 if later code relies upon it of course)

On Mon, Nov 24, 2014 at 12:17 PM, Troed Sångberg <troed@xxxxxxxxxxx> wrote:
The first region clears $fffffa01, 03, 05, 07, 09, b, d, f, 11, 13, 15, 17 - without touching the even addresses. It's a nice and proper usage of the movep instruction. Achieving the same using the same amount of code space (18 bytes, makes for simple patching) is doable. Suggestion:

lea $fffffa01.w,a0
moveq #11,d0
loop clr.b (a0)
lea 2(a0),a0
dbf d0,loop

(The last nop is a space filler, this code is actually smaller than the original)

Mail converted by MHonArc 2.6.19+