www.delorie.com/archives/browse.cgi | search |
From: | Justin Talbot <stevetalbot AT sandiegoca DOT ncr DOT com> |
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 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |