rcmx_rld.asm
bitfixer_bitfixer/dg/z88dk/libsrc/z80_crt0s/z80_emu/rcmx_rld.asm

; Substitute for z80 rld instruction
; aralbrec 06.2007

PUBLIC rcmx_rld

.rcmx_rld

   jr nc, dorld
   
   call dorld
   scf
   ret

.dorld
   
   rlca
   rlca
   rlca
   rlca                        ; a = bits 32107654
   
   sla a
   rl (hl)
   adc a,0
   
   rla
   rl (hl)
   adc a,0
   
   rla
   rl (hl)
   adc a,0
   
   rla
   rl (hl)
   adc a,0
   
   or a
   ret
