asm_zx_saddr2cy.asm
bitfixer_bitfixer/dg/z88dk/libsrc/_DEVELOPMENT/arch/zx/display/z80/asm_zx_saddr2cy.asm

; ===============================================================
; Jun 2007
; ===============================================================
;
; uint zx_saddr2cy(void *saddr)
;
; Character y coordinate corresponding to screen address.
;
; ===============================================================

SECTION code_clib
SECTION code_arch

PUBLIC asm_zx_saddr2cy

asm_zx_saddr2cy:

   ld a,l
   rlca
   rlca
   rlca
   and $07
   ld l,a
   
   ld a,h
   and $18
   or l
   
   ld l,a
   ld h,0
   
   ret
