4 ms·
Mac OS used Pascal strings rather than C's null-terminated strings (Inside Macintosh volume 1, p90 -- Using assembly language / Calling conventions -- "Pointer
by amiga386 2y ago
Mac OS used Pascal strings rather than C's null-terminated strings (Inside Macintosh volume 1, p90 -- Using assembly language / Calling conventions -- "Pointer to string (first byte pointed to is length byte)" https://vintageapple.org/inside_o/pdf/Inside_Macintosh_Volume_I_1985.pdf https://vintageapple.org/inside_o/pdf/Inside_Macintosh_Volum...
They were an absolute pain to switch between when writing C code for Mac OS, and are evidence of the Mac OS designers having Pascal on the brain when designing the OS, not just their choice of example language in the documentation.
> as far as I know no major software houses seriously worked in Pascal on the Mac
Adobe Photoshop for the Macintosh was written in Pascal:
https://computerhistory.org/blog/adobe-photoshop-source-code/ https://computerhistory.org/blog/adobe-photoshop-source-code...
- bsenftner 2y agoYeah, I remember. The string issue was easily fixed by simply placing a null at the end of one's strings and maintaining a Pascal string pointer for OS traps and using the C string pointer for everything expecting C strings. I still have a work-in-progress mimeographed and hand written copy of Inside Macintosh that was used by the original 3rd party developers, back when a good 2/3rds of the OS was still being completed.