home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 178 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: misery.millcomm.com!not-for-mail
  2. From: llucius@millcomm.com (Yambo)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Is this a SAS/C bug or have I coded it wrong?
  5. Date: 4 Jan 1996 06:16:37 GMT
  6. Organization: the 9672-R83
  7. Message-ID: <4cfrc5$gsc@misery.millcomm.com>
  8. NNTP-Posting-Host: mill2.millcomm.com
  9. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  10.  
  11. Is this a SAS/C bug or am I getting more blind???
  12.  
  13. =========================================================================
  14. The following code:
  15. =========================================================================
  16.  
  17.    tmpbuf[10];
  18.  
  19.    int
  20.    test( void )
  21.    {
  22.  
  23.       if ( tmpbuf[0] & 0x1f == 1 )
  24.          return 1;
  25.  
  26.       return 0;
  27.    }
  28.  
  29. =========================================================================
  30. Produces:
  31. =========================================================================
  32.                  SECTION      text,CODE
  33.    __code:
  34.    test:
  35.    ___test__1:
  36.                  MOVEQ.L        #$0,D0                   ;7000 
  37.    ___test__2:
  38.                  RTS                                     ;4e75 
  39.    __const:
  40.    __strings:
  41.                  XDEF           test
  42.    
  43.                  SECTION        __MERGED,BSS
  44.    __MERGEDBSS
  45.    tmpbuf:
  46.                  DS.B           40
  47.                  XDEF           tmpbuf
  48.                  END
  49. =========================================================================
  50. Is this right?  Where'd the "IF" go?  Do I have it coded wrong?
  51.  
  52. TIA
  53.  
  54. -- 
  55. __ Y_ a_ m_ b_ o_ | The leanest, meanest, fightinest sweet tater on Earth!
  56.    oo o  oo o  o  | 
  57.     o       o   o | llucius@millcomm.com
  58.  o oo    o     o  | 
  59. -- -- -- -- -- -- | http://www.millcomm.com/~llucius/index.html (coming soon)
  60.  
  61.