home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / C6_BUGS.ZIP / C6_20097.BUG < prev    next >
Text File  |  1990-09-11  |  1KB  |  53 lines

  1. Q65309 In-Line Assembler Locks Up C 6.00
  2. Microsoft C Compiler (C)
  3. 6.00   | 6.00
  4. MS-DOS | OS/2
  5.  
  6. Summary:
  7.  
  8. The code below will "lock up" C 6.00 regardless of optimizations.
  9.  
  10. Using the quick compiler (/qc) will allow the program to compile.
  11.  
  12. Sample Code
  13. -----------
  14.  
  15. #define LCPPORT 0
  16. #define COMREQ 0x14
  17. #define FOREVER for(;;)
  18.  
  19. extern void _far _cdecl delay(int ticks);
  20.  
  21. void clrlcp(void)
  22. {
  23. int ticks = 4;
  24.    FOREVER
  25.       {
  26.       _asm
  27.          {
  28.          push [ticks]
  29.          call delay
  30.          add sp,2
  31.          mov dx,LCPPORT
  32.          mov ah,7
  33.          int COMREQ
  34.          cmp al,0
  35.          jz done
  36.          mov dx,LCPPORT
  37.          mov ah,6
  38.          int COMREQ
  39.          }
  40.       ticks = 4;
  41.       }
  42.    done: return;
  43. }
  44.  
  45. Microsoft has confirmed this to be a problem in C version 6.00. We are
  46. researching this problem and will post new information here as it
  47. becomes available.
  48.  
  49. Keywords:  buglist6.00
  50.  
  51. COPYRIGHT Microsoft Corporation, 1990.
  52. Updated  90/09/01 08:26
  53.