Skip to content

MSC 5.1 - CL.EXE does not work due to missing DOS API ah=46h #1

Description

@LowLevelMahn

it works on dosbox but i like kvikdos more for its speed and beeing smaller

Error from compilation:

./kvikdos/kvikdos msc5.1/BIN/CL.EXE sieve.C

Microsoft (R) C Optimizing Compiler Version 5.10
Copyright (c) Microsoft Corp 1984, 1985, 1986, 1987, 1988. All rights reserved.

fatal: unsupported int 0x21 ah:46 cs:0110 ip:4b4d
fatal: regs: cs:0054 ip:0022 ax:4601 bx:0001 cx:0002 dx:1764 si:0000 di:304e sp:3006 bp:300c flags:00007097 ds:076f es:076f fs:0064 gs:0064 ss:076f

this API is missing: https://dos-help.soulsphere.org/alang.hlp/x_at_L82e7.html

if you want to fix that problem the MSC 5.1 compiler was released to the public with the MS-DOS 4.0 release

https://github.com/microsoft/MS-DOS/tree/main
https://github.com/microsoft/MS-DOS/tree/main/v4.0/src/TOOLS/CL.EXE
https://github.com/microsoft/MS-DOS/tree/main/v4.0/src/TOOLS/LINK.EXE
https://github.com/microsoft/MS-DOS/tree/main/v4.0/src/TOOLS/MASM.EXE

here a small zip file with a tiny dosbox config which builds a simple C and a ASM example
sample.zip
(MASM.EXE and LINK.EXE seems to work without problems i just added them here for convinience)

run with dosbox -conf msc51.conf
the config is based on the MS-DOS 4.0 release executables in the Microsoft MS-DOS git repo

[autoexec]
mount c .
mount d ~/kvikdos_test/MS-DOS/v4.0/src
c:
  
SET PATH=%PATH%;D:\TOOLS
SET LIB=D:\TOOLS\BLD\LIB
SET INCLUDE=D:\TOOLS\BLD\INC

CL.EXE SIEVE.C
CL.EXE /c SIEVE.C
LINK.EXE SIEVE.obj,,,,

MASM.EXE hello.asm,,,,
LINK.EXE hello.obj,,,,

pause

exit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions