Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Thread Closed: Thread will re-open when original poster replies

???
04/15/07 21:16
Read: times


 
#137300 - SDCC version works also
Responding to: ???'s previous message
Hello,

I ran the below program on SDCC and it gave P1 = 20 upon completion. The size of the binary program was 105 bytes.

Regards,

Charles Bannister


#include <AT89x52.h>

void main(void){
	float a=5.34; 
	// float a=1.1; 

	if(a>1.2) 
	  P1=20; 		// P1 = 0001 0100 binary
	else 
	  P1=10;  		// P1 = 0000 1010 binary

	for(;;);		// twiddle thumbs forever
}


:03000000020003F8
:03005C0002005F40
:05005F0012006480FEA8
:0300640075901480
:0200670080FE19
:06003200E478FFF6D8FDA2
:080010007900E94400601B7A4D
:050018000090006D786E
:03001D000075A0CB
:0A00200000E493F2A308B800020503
:08002A00A0D9F4DAF275A0FF81
:080038007800E84400600A7939
:030040000075A0A8
:0600430000E4F309D8FC03
:080049007800E84400600C7926
:0B00510000900000E4F0A3D8FCD9FAF6
:03000300758107FD
:0A000600120069E582600302005F4A
:04006900758200227A
:00000001FF



List of 12 messages in thread
TopicAuthorDate
if else statements in keil c51            01/01/70 00:00      
   Things to check            01/01/70 00:00      
      example            01/01/70 00:00      
   And it might help to use hex            01/01/70 00:00      
      floating point            01/01/70 00:00      
         Not true            01/01/70 00:00      
            further...            01/01/70 00:00      
   I suggest you read this..            01/01/70 00:00      
   Test Seems To Work            01/01/70 00:00      
      SDCC version works also            01/01/70 00:00      
         Testing the typo...            01/01/70 00:00      
   its a lot easier to use fixed point            01/01/70 00:00      

Back to Subject List