4 ms·
ASCII was often 7-bits on these machines, since you could efficiently pack 5 characters in one word. But C used 9-bits for chars, for better compatibility betw
by jhallenworld 3y ago
ASCII was often 7-bits on these machines, since you could efficiently pack 5 characters in one word.
But C used 9-bits for chars, for better compatibility between word and char pointers.
- gumby 3y agoThat’s why FTP has character and binary modes, which doesn’t make a difference for 8-bit machines.
- lokedhs 3y agoIt does make a difference on some operating systems. Specifically DOS (and by extension, Windows, at least sometimes. As usual with Microsoft it gets complicated). When enabling text mode transfers in these systems, newlines gets translated from LF to CRLF on the DOS side.
- deleted 3y ago[deleted]
- canucker2016 3y ago...and on pre-OSX Macs that had CR-only line endings (LF -> CR).
- kristianp 3y ago> But C used 9-bits for char I expect you meant 8 bits for char!
- addaon 3y agoNope, C on 36 bit machines traditionally used 9-bit chars, packed four per word. C tends to dislike (read disallow) representations where chars, as the primitive type, do not completely tile memory; it makes things like memcpy() fuzzy, as there are bits defined at the word level of the memory layout that are not included in any char, and thus not clear what copying semantics should be.