zx_saddrcdown.asm
bitfixer_bitfixer/dg/z88dk/libsrc/spectrum/display/zx_saddrcdown.asm
; uchar __FASTCALL__ *zx_saddrcdown(void *pixeladdr)
; aralbrec 06.2007

PUBLIC zx_saddrcdown

.zx_saddrcdown

; enter: hl = valid screen address
; exit : carry = moved off screen
;        hl = new screen address one char down
; uses : af,hl

   ld a,l
   add a,$20
   ld l,a
   ret nc
   
   ld a,h
   add a,$08
   ld h,a
   cp $58
   ccf

   ret
