That said, as far as at least Free Pascal goes, there isn't actually even a specific function called `writeln` with a real body that you can go and look at somewhere.
It's a magic language-level intrinsic that gets broken down into calls to various other intrinsics by the compiler based on what's passed to it.
https://www.freepascal.org/docs-html/ref/refsu69.html
That said, as far as at least Free Pascal goes, there isn't actually even a specific function called `writeln` with a real body that you can go and look at somewhere.
It's a magic language-level intrinsic that gets broken down into calls to various other intrinsics by the compiler based on what's passed to it.