Like this?


dph data 42h <--- add this line with existing DATA statement
dpl data 43h <--- add this line with existing DATA statement


write_char:
push dph <--- delete this line
push dpl <--- delete this line
...
mov dpl,a
...
mov dph,a
...
pop dpl <--- delete this line
pop dph <--- delete this line
ret

Robert