I cut my teeth on a Z80 machine with 4K DRAM...
I remember writing an integer division routine where I rotated each new quotient bit into the same register as the dividend (i.e. into the upper bits since the dividend was getting "smaller" with each iteration) to avoid using the other registers or any memory...
I hated the 8080 mnemonics but I loved the Z80 ones...
LOL, and where I'm from we say "zed 80" instead of "zee 80"...
Code:
; 16/8 bit integer division
; HL <- dividend
; D <- divisor
; H -> remainder
; L -> quotient
div168 ld e,0
ld b,8
divlp add hl,hl
xor a
sbc hl,de
jp p,divskp
add hl,de
dec hl
divskp inc hl
djnz divlp
ret