extrn .crlf, .couta, .hexa ; ; .crlf & .t4hx .t4hxc:: call .crlf ; " " ; print (hl) in hex on console ; a,f,c .t4hx:: mov a,h; msb call .t2hx mov a,l; lsb ; " " ; list a byte (a) as 2 ascii char. ; a,f .t2hx:: push psw; save a rlc; trade digits rlc rlc rlc call .hxd; upper 4 bits pop psw; lower 4 bits ; " " ; convert hex (a) to ascii (a) & print on console ; a,f .hxd:: call .hexa jmp .couta end