The better soluce is to use es:0 instead of FS:0 .Change the value of ES only for the need,it must return to it's value after ES:0.

ToutEnMasm
Posted on 2003-06-20 05:00:03 by ToutEnMasm
hi. Please explain why :| . I've never seen usage of ES. Is it used for exception handling, too ?
Posted on 2003-07-19 02:16:35 by Ultrano
strings function is defined to use ES segment :)
Posted on 2003-07-19 02:37:43 by roticv
Yes ,FS:0 is the location for the address of the proc called when an exception occured.MASM don't accept the use of FS , so when the proc for the exception is made , we have to save ES , put FS in ES , put the offset of the proc in ES:0 and restablish ES to it's original value.That is for WIN98 with WP one API makeit.
ToutEnMasm
Posted on 2003-07-19 08:09:29 by ToutEnMasm
why do it in that backwards way, when you can just "assume fs:nothing" and access after that with no problems at all?
Posted on 2003-07-19 09:38:08 by f0dder
Should it be assume fs:flat?
Posted on 2003-07-19 09:59:33 by roticv