again: shared libraries
whenever i call a function of a shared library, the called function needs to work on the shared library's data.
thus: do all exported shared library functions do somthing like:
Code:
some_shared_function {
mov somewhere, ds // back up the current data segment
mov ax, (the data segment of the library) // prepare the shared libraries data segment for loading
lds ax ; load the data segment of the shared library into ds
(usuall calculations and stuff)
// restore the old data segment
mov ax, somewhere
lds ax ; restore old data segment
ret // return to the caller
}
or how do shared library functions access their data?