; ; load hl from stack level l (with respect to caller). ; i.e. l=0 corresponds to sp = TOS ; l=1 corresponds to sp+2 (value under TOS) etc. ; Use this like lhld, with relative word address in l. ; Maximum l value on entry is 127 ; h,l .lhlstk:: push d push psw mov a,l add a; in words lxi h,6; allow for call & 2 pushes dad sp add l mov l,a adc h sub l mov h,a mov e,m inx h mov d,m xchg pop psw pop d ret