Closed drawkula closed 5 years ago
The CP/M plat translates \n into \r\n, because that's what most CP/M systems need. It looks like runcpm is treating the \r as a carriage return, so you're seeing two newlines per \n. Also remember that puts() itself appends a newline.
HiTech-C behaves differently in the same emulator on the same terminal:
C1>type hchs.c
#include <stdio.h>
main()
{
puts("Hello, CP/M!");
puts("Hello, StdIO!");
}
C1>c hchs.c
HI-TECH C COMPILER (CP/M-80) V3.09
Copyright (C) 1984-87 HI-TECH SOFTWARE
C1>hchs
Hello, CP/M!
Hello, StdIO!
C1>█
So I'm still too confused to close this issue... ;-)
Hmm, interesting. Could you attach your hchs.com file? (I want to see what it does in my emulator.)
Er, oops. Apparently it was translating \n into \n\n rather than \r\n. Will fix. Thanks for the report!
\o/ Thanks!
I was just trying to go back some commits because I was sure it behaved differently not too far ago... you were faster...
Outside of CP/M:
In RunCPM:
This are more linefeeds than I expected.