Path: utzoo!mnetor!uunet!mcvax!enea!erix!erialfa!kjelle From: kjelle@erialfa.UUCP (Kjell Eriksson) Newsgroups: comp.sys.ibm.pc Subject: Windows function prolog. Message-ID: <183@erialfa.UUCP> Date: 17 Feb 88 11:05:45 GMT Reply-To: kjelle@erialfa.UUCP (Kjell Eriksson) Organization: Ericsson Information Systems AB, Kista, Stockholm, SWEDEN Lines: 23 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