module is directly addressable using the current DS. That makes
sense.
Unfortunately, I have no choice but to use DS

location in my code, because that's what DOS function 25h insists
on. So I'll have to save the original DS and restore it as soon
as I get control back from DOS.
Thanks for your reply!
Allan
Allan,
I think the code below demonstrates what you want, except it gets the code address into the CS


Since you're accessing code, the CS register is already pointing at the code segment. DS is pointing at the data segment, where your variables are. If you start mixing them you'll probably get confused. It CAN be done, but it's just as easy not to mix the use of DS and CS.
If you change DS then all references you make to any variables in the PB code will be wrong as they are all referenced by DS.
Paul.
------------------
Leave a comment: