From: Justin Talbot Newsgroups: comp.os.msdos.djgpp Subject: printf() and shl Questions Date: Sat, 28 Jun 1997 15:30:26 -0700 Organization: NCR Corporation, San Diego, CA Lines: 22 Message-ID: <33B59082.F71@sandiegoca.ncr.com> Reply-To: stevetalbot AT sandiegoca DOT ncr DOT com NNTP-Posting-Host: ppp117.sandiegoca.ncr.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Two problems: First if I compile and run a simple program: void main(void) { printf("Hello world"); getch(); } The computer waits for me to press a key, then prints "Hello world", then ends. The compiler esentially switches the two function calls. This also happens if I place two getch()s after the printf() statement, except it waits for two key presses before printing "Hello world." Am I doing something very wrong? Is this a known problem with the compiler? Or is this something wrong with my copy? Second, is there a way to use the Intel ASM command 'shl eax,16' in AT&T syntax? Any help would be appreciated. Justin Talbot