Hello everybody. One of these days I decided to try Watcom, but I can not understand how to compile correctly to get the minimal executable. In Microsoft VS 6.0, I used "cl C_exp.c / TC / MD / Ox / link / entry: main / subsystem: console" to compile this code:
Code:
#pragma comment (linker, "/ignore:4060,4078,4089,4096,4108")
#pragma comment (linker, "/merge:.rdata=.data")
#pragma comment (linker, "/merge:.text=.data")
#pragma comment (linker, "/merge:.reloc=.data")
#pragma comment (linker, "/align:0x8")
#pragma comment (linker, "/filealign:0x8")
#pragma optimize("gsy", on)

#include <stdio.h>

int main(void)
{
    int number, right_digit;
    printf("enter num\n");
    scanf("%i", &number);

    do
    {
        right_digit = number % 10;
        
        printf("%i", right_digit);
        if (right_digit < 0) number = -number;
        number /= 10;
        
    } while(number != 0);
    printf("\n");
getchar();

return 0;
}
size .exe == 712 bytes
And for watcom "wcl386 -bcl = nt -br -d0 option alignment = 16 С_exp.c" but without the #pragma directives in the code.