KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q47233: QuickC Hangs When Running .COM if "SET LINK=/CO"

Article: Q47233
Product(s): See article
Version(s): 2.01
Operating System(s): MS-DOS
Keyword(s): ENDUSER | buglist2.01 S_QuickC | mspl13_masm
Last Modified: 10-OCT-1989

The QuickC (QC) Version 2.01 environment hangs if you perform the
following steps:

1. Set the link environment variable at the DOS prompt with the /CO
   option (i.e., "d:\> set link=/CO").

2. Enter the QuickAssembler (QA) environment with an assembly file in
   .COM format.

3. Assemble and link the source code.

4. Run the program in the environment; at this point you're now hung.

   Run this program at the DOS prompt, and the program executes
   properly without hanging.

To resolve this problem, you must remove the link environment variable,
delete the .COM file, and then reassemble/link the assembly source.

Microsoft has confirmed this to be a problem with Version 2.01 of
QuickC/QuickAssembler. We are researching this problem and will post
new information as it becomes available.

Note: It is not necessary to set the link environment variable
with the /CO CodeView option since this facility is offered within
the QuickC shell. This can be set by selecting the following:

   OPTIONS.Make.Linker Flags.CodeView Information

The following source code demonstrates this problem:

;Program: HANG.COM
;Purpose: Demonstrates hanging problem in QuickC 2.01.
.MODEL  TINY
.DATA

msg     DB      "Hello, world.", 13, 10, "$"

.CODE
                org 100h
entry:                                       ; Program entry point
HELLO proc near
                nop
                mov     ah, 9h               ; Request DOS Function 9
                mov     dx, OFFSET msg       ; Load DX with offset of string

                int     21h                  ; Display String

                mov     ax, 4C00h
                int     21h

HELLO endp
END entry

The hang occurs before the first instruction is executed. QC switches
to the output screen, displays the "HANG.COM" title, and hangs.

The .COM file is polluted when you assemble with the link=/CO
environment variable set from DOS. This can be demonstrated by the
fact that if you hang your machine as noted above, reboot (without
link=/CO env var), and then run HANG.COM from within QA (without
reassembling), you again successfully hang your computer.

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.