I downloaded the Xinu source code for x86 from https://xinu.cs.purdue.edu/files/Xinu-code-Galileo.tar.gz .
Looking at the implementation for printf
(lib/printf.c
lib/doprnt.c
), as far as I can tell it simply doesn't support length modifiers. That means that, for example, this:
long int n = 42;
printf("%ld\n", n);
wouldn't work. I suggest trying that on your system.
This is not a conforming C implementation (and it's probably not intended to be).
It does appear to support most of the standard conversion specifiers ("%d"
, "%u"
, "%x"
, "%f"
, etc.).
If you want to print a long double
value, I think the best you can do is either convert it to double
and use "%f"
(which could lose range and/or precision) or write your own code to convert a long double
value to a string. (Or run you code on a different system).
Disclaimer: I haven't tried this, I've only examined the source code, and only for the x86 version of the system.