Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fill Routine
#26
I'm puzzled.
The __DECY routine and the one in our code *differ* Confusedhock:
I now remember where did I took these routines from this Speccy Tutorial

Code:
__DECY:          SPPixelDown:
*   dec b          inc h
    inc h          ld a,h
    ld a, h        and $07
    and 7          ret nz
    ret nz         ld a,h
*   ex af, af'    sub $08
*   scf           ld h,a
*   ex af, af'    ld a,l
    ld a, l        add a,$20
    add a, 32     ld l,a
    ld l, a        ret nc
    ret c          ld a,h
    ld a, h        add a,$08
    sub 8          ld h,a
    ld h, a        cp $58
    ret            ccf
                   ret
The dec b, and ex af, af' sequence on the left (marked with an asterisk *) can be ignored. But the SP routine on the right does an extra ADD a, 08 mine does not do :?:
Accoding to Speccy.org seems to be an optimization. Any ideas?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)