#include "asm86.h" #include "ti86asm.inc" .org _asm_exec_ram nop jp runTime ; geek-talk for time that the program is running .dw 0 .dw programDescription programDescription: .db "blittBitmapLarge Demo",0 runTime: call _clrLCD ld ix,largeSprite ld de,35*256+2 ; x*256+y call blittBitmapLarge jp _pause largeSprite: .db 3, 15 .db %11111111, %11111111, %11111111 .db %10000000, %00000000, %00000001 .db %10110010, %10010001, %00000001 .db %10101010, %00111011, %10000001 .db %10110010, %10010001, %00000001 .db %10101010, %10010001, %00000001 .db %10110010, %10001000, %10000001 .db %10000000, %00000000, %00000001 .db %10000000, %00101000, %11010001 .db %10000000, %01010101, %01010001 .db %10000000, %01010101, %10010001 .db %10000000, %01010101, %00000001 .db %10000000, %01000100, %11010001 .db %10000000, %00000000, %00000001 .db %11111111, %11111111, %11111111 ; blittBitmapLarge - by Josh Gentry ; if you use this, leave this with the routine ; ;INPUT: D,E = x,y ; IX = pointer to sprite ; ;OUTPUT: all registers modified (except shadow registers) ; sprite draw to screen ; ;SPRITE FORM: ; .db width in bytes, height ; .db sprite data blittBitmapLarge: ld a,e add a,a add a,a ld l,a ld h,$3f ld a,d rra add hl,hl rra add hl,hl rra or l ld l,a ld a,d and $07 ld c,a ld e,(ix) ld d,e inc ix ld b,(ix) inc ix blittBitmapLargeLoop: push hl blittBitmapLargeLoop1: push de ld d,(ix) ld e,$00 ld a,c or a jr z,blittBitmapLargeDraw blittBitmapLargeRotate: srl d rr e dec a jr nz,blittBitmapLargeRotate blittBitmapLargeDraw: ld a,(hl) xor d ld (hl),a inc hl ld a,(hl) xor e ld (hl),a inc ix pop de dec e jr nz,blittBitmapLargeLoop1 ld e,d pop hl push de ld de,$10 add hl,de pop de djnz blittBitmapLargeLoop ret .end