Well, after having a problem with IA-16 gcc (which seems to requires DJGPP gcc 
installed and working), I have search for an other free C compiler for FreeDOS.



I have found Smaller C:

https://github.com/alexfru/SmallerC/blob/master/v0100/doc/smlrc.md

I note: Smaller C is not an optimizing compiler, but it does the job better 
than the
typical small C implementation.



I installed it in a new minimal FD-1.3-rc3 image (more like injected it in QEMU 
qcow2 image, by using:

https://gist.github.com/shamil/62935d9b456a6f9877b5 ), and was able to compile 
test.c:



#include <stdio.h>

void main(){

  printf("Smaller C is fine!\n"); // Oh well, I change a bit the string here

}



directly from the ...\SMALLERC\V0100\BIND directory with:

smlrcc test.c -o test.exe

resulting in 20k test.exe by just installing nasm and make sure it is in PATH 
(Apparently come with a linker for ELF format to DOS 16 or 32 bits format).

The compiler executables are about 700k, but this does not include libs and 
includes.



You should probably be aware of this issue:

https://github.com/alexfru/SmallerC/issues/26  (Virus/trojan false positives: 
SMLRC has many false positives on Windows  #26)



License seems BSD: https://github.com/alexfru/SmallerC/blob/master/license.txt



I think I'd like to have it in FreeDOS 1.3.
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to