Everybody agrees that the days of the RS232 serial port are pastNot everybody - we regularly install AV equipment which communicates over RS232. OK, it may be past in the PC world, but is still very much still around.
Everybody agrees that the days of the RS232 serial port are past,
I see at https://www.freepascal.org/docs-html/rtl/baseunix/fpioctl.html and https://man7.org/linux/man-pages/man4/tty_ioctl.4.html the argument is int. So this is not the limitation.
is the limitation for 0..4095 by system ? Can the Hardware/inputbuffer have more than 4095 Bytes ?!
No I can't.
MarkMLl
Yes, the last time I tried to communicate with a specific USB device in Linux, it was definitely non-trivial.
If I had time to do a bit of maintenance (or more specifically, the required testing on multiple OSes) on serial.pp I'd change it to (a) lock the port by default since that's Windows behaviour and is generally what's wanted and (b) add that "what's buffered?" function if non-Linux unix variants supported it.
But even in Windows, at the core you see the same model, where most (but not everything) is a file-like entity in the (virtual) directory tree. But that is only really used by the kernel and hidden as much as possible from users and programmers.
function SerAvailable(handle: TSerialHandle): integer; ... if fpIoctl(handle, FIONREAD, @result) <> 0 then