Certain Inline Assembly Code May Hang C 6.0 Compiler

ID Number: Q65309

6.00 | 6.00

MS-DOS | OS/2

buglist6.00 fixlist6.00a

Summary:

The Microsoft C Compiler version 6.0 will hang when the sample program

below is compiled default or any other optimization for any memory

model:

Using the quick compile (/qc) option will allow the program to

compile.

Microsoft has confirmed this to be a problem in C version 6.0. This

problem was corrected in C version 6.0a.

Sample Code

-----------

/* Compile options needed: none

*/

#define LCPPORT 0

#define COMREQ 0x14

#define FOREVER for(;;)

extern void _far _cdecl delay(int ticks);

void clrlcp(void)

{

int ticks = 4;

FOREVER

{

_asm

{

push [ticks]

call delay

add sp,2

mov dx,LCPPORT

mov ah,7

int COMREQ

cmp al,0

jz done

mov dx,LCPPORT

mov ah,6

int COMREQ

}

ticks = 4;

}

done: return;

}