Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!pilchuck!dataio!bright From: bright@Data-IO.COM (Walter Bright) Newsgroups: comp.windows.ms Subject: Windows prolog/epilog Message-ID: <1992@dataio.Data-IO.COM> Date: 22 May 89 21:07:58 GMT Reply-To: bright@dataio.Data-IO.COM (Walter Bright) Organization: Data I/O Corporation; Redmond, WA Lines: 22 References: In examining the Windows prolog and epilog code for functions, it is: prolog: mov AX,DS ;????? nop ;????? inc BP ;????? push BP ;save previous mov BP,SP ;setup frame pointer for locals push DS mov DS,AX sub SP,xx ;make room for locals epilog: sub BP,2 ;account for the PUSH DS mov SP,BP ;remove locals pop DS pop BP dec BP ;???? ret Can anybody explain what's going on with the DS manipulation, the NOP and the inc and dec of BP? I suspect that the MOV AX,DS NOP is replaced at runtime with a MOV AX,VALUE, but I can't figure the INC BP.