[A86] What's wrong w/ this?


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

[A86] What's wrong w/ this?



I am writing my 1st PutSprite routine. It works, sortof. Just look at it. It 
is supposed to draw an 8x8 sprite, one byte at a time.

;IX=SPRITE
;B,C=X,Y
ps_normal:
  call _findpixel
  ld   b,0        ; I know I could use simulated...but...
  ld   c,a
  add  hl,bc
  ld   b,8
ps_draw:
  ld   a,(ix)
  xor  (hl)
  ld   (hl),a
ps_shift:
  ld   a,16
  ld   d,0        ; I know I could use simulated...but...
  ld   e,a
  add  hl,de
  inc  (ix)
  djnz ps_draw
  ret

Josh Gentry
"Real programmers code in pen during math class."
http://www.freewebz.com/jdgentry







Follow-Ups: