Article # 634, added by Geoworks, historical record
| first | previous | index | next | last |

What is SEGMENT_CS and how is it used?



Q. What is the difference between:

	mov	bx, SEGMENT_CS

   and

	mov	bx, cs

A. The first one generates XIP-friendly references to the current code
   resource, which can be passed to API's that allow addresses to be
   expressed by virtual far pointer. Virtual far pointers are used by
   certain routines (ProcCallFixedOrMovable) to signal that the resource
   has to be locked/loaded before the pointer can be used.

   if	_FXIP
	SEGMENT_CS	equ	
   else
	SEGMENT_CS	equ	
   endif