[comp.sys.ibm.pc] Windows function prolog.

kjelle@erialfa.UUCP (Kjell Eriksson) (02/17/88)

Can anyone tell me what the following function prolog does?
It's from MSC 4.0 with the Windows switch (-Gw) on.
It is suposed to switch to a data segment private to the function.
But where does the new segment come from?

The comments are mine.

	push	ds
	pop	ax	; ax = ds ? Can't do "mov ax,ds"??
	xchg	ax,ax	; ????????
	inc	bp	; ????????
	push	bp	; Setting up a new frame
	mov	bp,sp	;	"	"
	push	ds	; save the data segment
	mov	ds,ax	; replace it with a new one


Kjell E.
-- 
Kjell Eriksson			Phone: + 46 8 7937844 Telefax: 7509851
Ericsson Information Systems AB	Telex: 15968 ericki s
S-163 98  Stockholm		UUCP:  ...!mcvax!enea!erix!erialfa!kjelle
SWEDEN				       kjelle@erialfa.UUCP