A86: putsprite


[Prev][Next][Index][Thread]

A86: putsprite




ok, 

I got putsprite,   edited it to fit my needs(Its not copyright is it?  wait
dont respond to that, I dont want to go into that copyright crap again)

I converted it to HEX and copyed it to my calc.  I made sure I double checked
EVERYTHING in the HEX code.  I ran it on my calc but it came up with some
error(it didn't crash my calc)

I made sure that it worked before I put it on my calc by running the asm file
in ti86emu.  I ran fine and did what I wanted it to.  but It didn't do it on
my calc.   I am wondering if it was the conversion that screwed it all up.
could this be?

Below is the code:



#include "ti86asm.inc"

.org _asm_exec_ram


 ld ix,Zambian
 ld b,63
 ld c,23
 call PutSprite
 ret

Zambian:		
.db %01110000
.db %01110000
.db %00100100
.db %01111111
.db %10110100
.db %01110000
.db %00101000
.db %01101100

PutSprite:
 ld h,63		
 ld a,c
 add a,a		
 add a,a
 ld l,a
 add hl,hl		
 add hl,hl
 ld a,b		
 rra
 rra
 rra
 or l				
 ld l,a
 ld a,7		
 and b
 ld d,a			
 ld e,8		
 push bc

ps_loop:
 ld b,d		
 ld a,(ix)			
 inc ix			
 ld c,0
 call bit_shift
 xor (hl)			
 ld (hl),a
 inc l
 ld a,(hl)
 xor c			
 ld (hl),a
 ld a,15			
 call add_hl_a
 dec e			
 jr nz,ps_loop
 pop bc
 ret

add_hl_a:			
 add a,l
 ld l,a
 ret nc
 inc h
 ret

bit_shift:			
 dec b			
 ret m
 srl a
 rr c
 jr bit_shift

.end

.end

 

Thanks,
BlAsTo1414




Follow-Ups: