Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module spr8
- // first regs hldebc
- ld hl,sprite
- ld de,scrAddr
- // bc - free
- exx
- // second regs hldebc
- ld hl,mask
- ld de,scrAddr
- ld b,8
- nextSymbol:
- // push de 11t
- ld c,8
- nextLine:
- ld a,(de) // screen
- and (hl) // mask
- inc hl
- exx
- // first regs hldebc
- or (hl) // sprite
- inc hl
- exx
- // second regs hldebc
- ld (de),a // screen
- inc d // call to screen line, for calculate can using [de,bc] from first regs hldebc
- dec c
- jr nz,nextLine
- // pop de 10t
- // inc e 4t
- // = 25t
- //------
- exx
- // first regs hldebc
- ld a,d
- exx
- // second regs hldebc
- ld d,a
- inc e
- //------ 20t vs 25t at push de,pop de,inc e
- // of course can use: |ld a,d|sub 8|ld d,a|inc e| = 19t without stack or exx
- dec b
- jr nz,nextSymbol
- ret
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement