Subj : Re: An order or linking bug To : borland.public.cpp.borlandcpp From : Bob Gonder Date : Thu Dec 09 2004 08:48 am "David Morris" wrote: >I had thought that this was due to a buffer over run, but by placing some >marker characters around these pointers, I showed that it was not a buffer >over-run. I also tried forcing the DS register to point to the data segment >(this made no difference). You could use far pointers so that your ISR knows for sure it has the correct segment. Also, might want to also fix ES == DS as stosb and others use ES. (I don't recall your code.) >It would seem that this problem only occurs if the ISR data is not near the >beginning of the DATAS segment. For example by moving some data in to the >uninitialised segment BSS (all still in the DGROUP), the problem goes away. Fixing problems by moving the data around usually means over\underwrites by surrounding data. In this case, maybe the buffer fell across a 64k boundry, and moving it to the front brought it within bounds? >The DOS executable is 340K and includes (my own) overlay code for a PABX driver >module. Overlays can be tricky. .