Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!uunet!mcsun!inria!geocub!goudal From: goudal@geocub.greco-prog.fr (Frederic Goudal) Newsgroups: comp.windows.ms Subject: Microsoft C 5.1 compiler and -Gw Keywords: Compiler, assembler windows 2.1 Message-ID: <188@geocub.greco-prog.fr> Date: 4 Jul 90 12:45:34 GMT Organization: University of Bordeaux I - FRANCE Lines: 40 I am developping some code for windows 2.1 (waiting for the 3.0 SDK in France) using the 5.1 Microsoft C (waiting for the 6.0 in France !!!) I need to worry about the producted code, so I compile with the following options : -c -AL -Gw -u -W2 -Zpe -Gs -Fa When I compile a function witch looks like void toto(a,b) int a,b; { long c; ... } I obtain the following code for the begining and the end of the function: begining : 1 push ds 2 pop ax why not mov ax,ds ??? 3 nop why ??????? 4 inc bp why ?????? 5 push bp 6 mov bp,sp 7 push ds 8 mov ds,ax instructions a and b must have put the value of ds in ax 9 sub sp,6 I need only 4 bytes why 6??? For the end of the function there are the instructions: sub bp,2 mov sp,bp why not sub sp,(the good value 4) ?? Thanks in advance for the answers by e-mail at : goudal@geocub.greco-prog.fr -- goudal@geocub.greco_prog.fr "Why can't we reach the sun?" oral-mail : babbs Pink Floyd