; h is the bigger number
; output: E = quotient, H = remainder

divhbyl:
 ld b,7
 ld c,%10000000
 ld e,0
divide_bit_loop:
 push bc

 ld d,h
shift_H:
  sra d
  djnz shift_H

  ld a,d
  sub l
  jr c,skip_Quotient_Add

  ; shift it back to norm

 pop bc
 push bc

  ld d,l
shift_H_back:
  sla d
  djnz shift_H_back

  ld a,h
  sub d
  ld h,a

  ld a,e
  add a,c
  ld e,a

skip_Quotient_Add:
 pop bc
; call showProgress

 xor a
 rr c
 djnz divide_bit_loop

 ld a,h
 sub l
 ret c

 ld h,a
 inc e
 ret
