delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/08/20:28:58

Sender: nate AT cartsys DOT com
Message-ID: <36BF8FA5.39E860E6@cartsys.com>
Date: Mon, 08 Feb 1999 17:30:13 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.0.36 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Small problem with instruction sorting
References: <slrn7bteai DOT elk DOT metalb AT bart DOT us DOT es>
Reply-To: djgpp AT delorie DOT com

Jaime Tejedor Gomez wrote:
> 
>  Hi all
> 
>  I've got the following program:
> 
> #include <stdio.h>
> #include <stdlib.h>
> main()
> {
> printf("HELLO WORLD. PRESS KEY");
> while(!bioskey(1));
> exit(0);
> }
> 
>  My question is:
> 
>  How can I prevent DJGPP from reordering instruction's ejecution to make it
> print the message before waiting for the key? Sorry if that's a dumb
> question, but I've searched in FAQ, info and Rhide help and found nothing
> about it. TIA.

The printf isn't being executed after the bioskey, it's just that printf
is buffering the output.  See FAQ section 9.4.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019