zx_aaddrcup.asm
bitfixer_bitfixer/dg/z88dk/libsrc/zx81/chroma81/zx_aaddrcup.asm
; uchar __FASTCALL__ *zx_aaddrcup(void *attraddr)
; Stefano, 2014.12

PUBLIC zx_aaddrcup
EXTERN HRG_LineStart

.zx_aaddrcup

; enter : hl = valid attribute address
; exit  : hl = new attribute address up one character
;         TODO: carry set if off screen

IF FORlambda
   ld de,33
ELSE
   ld de,35
ENDIF
   and a
   sbc hl,de

   ret
