News for hackers. Stuff that matters.
Re:C library system-call wrappers, or the lack thereof by skissane on Wednesday November 14, 2018 @12:47AM (#18447792)
When you write C code on MS-DOS, you usually don't directly call INT 21h. Instead you call fopen(),printf(), etc, which are library calls which call INT 21h in their implementation. As well as standard C functions, there are also C functions for MS-DOS specific services, e.g. chdrive(), findfirst(), etc.

Even when you want to call some INT 21h service which doesn't have a C function, it is more common to use interrupt functions like int86() or intdos() than to use inline assembly. (Or something like __dpmi_int from 32-bit code, such as DJGPP)

So, I don't think MS-DOS is as different from Linux/Unix as you think. High-level language code on MS-DOS (whether in C or Pascal or BASIC or whatever) usually doesn't directly invoke INT 21h, it goes through higher-level libraries / wrapper functions. Only software written in assembly tends to invoke INT 21h directly.

Re:C library system-call wrappers, or the lack thereof by pdkl95 on Wednesday November 14, 2018 @11:17AM (#18450988)
> Only software written in assembly tends to invoke INT 21h directly.

Or anybody that wasn't satisfied with the high-level libraries. We just looked up the functionality[2] we needed in Ralf Brown's list[1].

[1] http://www.ctyme.com/rbrown.htm (INT 21h http://www.ctyme.com/intr/int-21.htm )

[2] http://www.ctyme.com/intr/rb-0250.htm