![Smile :)](./images/smilies/grayscale_smile.gif)
.NOLIST
#define EQU .equ
#define equ .equ
#define END .end
#define end .end
#include "ti83plus.inc"
.LIST
.org 9D93h
.db $BB,$6D
; Sprite Displaying Routine
______ ld hl,(Pixel) ;------ exact pixel to display to
______ ld a,l
______and %00000111 ;----- find the remainder of hl \ 8
______ ld b,a ;----- load the reaminder into b
______ld a,(Sprite)
______ld h,a ;----- load the image that is to be displayed into h
______ ld a,(Sprite_2)
______ ld l,a ;----load the image that is to be displayed into l
______ ld a,1 ; use a as a counter
Loop:
______ srl h ; this is the bit offset
______ rr l
______ or a
______ cp b
______ jp z,Next
______ inc a
______ jp Loop
Next:
______ ld a,h
______ ld (Spr),a ; -------store the fixed h and l registers into memory
______ ld a,l
______ ld (Spr_2),a
______ ld hl,$9340 ; ------ld hl with the screen buffer equate of Plotsscreen
______ ld de,(Pixel)
______ srl d
______ rr e
______ or a ;---------- reset the carry flag
______ srl d ; --------divide the pixel by 8
______ rr e
______ or a
______ srl d
______ rr e
______ or a
______ add hl,de
______ ld a,(Spr) ;--------- retrieve the stored memory
______ ld (hl),a
______ inc hl
______ ld a,(Spr_2)
______ ld (hl),a
______ B_CALL(_Grbufcpy)
______ ret
Sprite:
______ .db %11111111
Sprite_2:
______.db %00000000
Spr:
______ .db %00000000
Spr_2:
______.db %00000000
Pixel:
______ .db 734 ;----- pixel
.end
end