Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sdd.hp.com!spool2.mu.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!news.funet.fi!fuug!tuura!risto From: risto@tuura.UUCP (Risto Lankinen) Newsgroups: comp.windows.ms.programmer Subject: MS-C 286-code in Windows' real mode Message-ID: <915@tuura.UUCP> Date: 9 Jan 91 10:02:33 GMT Distribution: comp Organization: Nokia Data Systems Oy Lines: 29 Hi! There's a function GetWinFlags(), which tells the 'size' of the system's CPU to the calling program. I have made a program that calls this function in order to politely tell the user to go out and buy bigger computer, were the program run in an 8086/88 . What happens instead, is that the 8086/88 hangs up the moment that my program is run. The reason for this is known, and is that the arguments to the function MessageBox() (following the failed test after the GWF() ) are pushed using the 286 opcode 'PUSH ' . The question is, how can I use the -G2 switch, but still be able to mark a portion of the program such, that it would be compiled to 8086/88 ? I would make the change right after those two calls. The 80286 code is so much more compact I wouldn't wish to sacrifice using it, but I also know that in a multi-tasking system, the user's irritation against one task is directly proportional to the cube of the number of simultaneously running other tasks, which it offends or kills. I guess I'd be happy with some sort of #pragma, but haven't found any that would solve this problem so far (I'm using MS-C 6.0). Terveisin: Risto Lankinen -- Risto Lankinen / product specialist *************************************** Nokia Data Systems, Technology Dept * 2 2 * THIS SPACE INTENTIONALLY LEFT BLANK * 2 -1 is PRIME! Now working on 2 +1 * replies: risto@yj.data.nokia.fi ***************************************