6/7/2026 at 12:32:11 PM
I've been recently working with Classic Mac OS programming[0] and just that memory model (also using dealing with the lack of virtual memory using opaque handles to memory that need to be locked when used) is painful enough[1] - having to deal with segment addressing on top of that does not sound like fun. Thank god for the Motorola 68000![0]Made an AppleTalk chat client/server https://github.com/kalleboo/GlobalTalk-Chat
[1]The equivalent to HeapWalker I used was Metroweks ZoneRanger which was bundled with their compiler. It has a nice visualization of how fragmented the memory is https://bitbang.social/@kalleboo/116302075194704555
by kalleboo
6/7/2026 at 1:12:48 PM
It wasn't really the processor architecture. Segmented addressing was actually fairly easy if the processor was used only in the way that protected mode was envisioned as working. As the headlined article observes, a lot of this stuff simply wasn't necessary in OS/2 1.x, even though that too had DLLs, callback window procedures, and the multiple tiny/small/medium/large/compact/huge memory models.The differences were (a) that DOS+Windows was designed so that the same programs could run in both real mode, with overlaying, and 286 protected mode, with segmented virtual memory; and (b) that to really save on RAM DOS+Windows had ideas such as the data segments for DLLs being globally shared across all processes. These added all of the complications mentioned in the headlined article and more besides. It was the operating system, not the processor architecture.
by JdeBP
6/7/2026 at 1:34:45 PM
I understood it as Windows developers had to manually deal with segment limitations since Windows supported running on pre-286 CPUs without protected mode (Wikipedia says Windows 1-3 all supported the 8088). OS/2 just made the 286 a minimum requirement so they could rely on a CPU with more modern features.The 68k didn't come with an MMU like the 286 so MacOS couldn't rely on virtual memory like OS/2 did but at least the flat memory space meant you didn't have to juggle 64k segments
by kalleboo
6/7/2026 at 5:30:43 PM
But like real-mode Windows, the Macintosh OS was designed with small amounts of RAM. 32K limits pop up in various APIs. Handle memory allocation.Not as much of a strait jacket as Windows segmented-memory programming, but compared to Unix, it did feel constricting.
by canucker2016
6/7/2026 at 1:49:52 PM
Yes, outwith the idea of Family API programs (which couldn't use Presentation Manager and whatnot anyway) OS/2 1.x did target the 286 as a minimum. But that doesn't mean that DOS+Windows didn't use the features.It did. It was bi-modal. There were at one point switches to the WIN command to tell it whether to come up in real mode or 286 protected mode. In the latter it definitely did use the features of protected mode.
It was the bi-modal nature that was the problem. Essentially, they had to design a whole layer that simulated when in real mode all of the load-on-demand stuff that the processor architecture supplied for free in 286 protected mode, and make it so that the thing would all work either way with no changes to applications.
by JdeBP
6/7/2026 at 3:51:50 PM
> There were at one point switches to the WIN command to tell it whether to come up in real mode or 286 protected mode. In the latter it definitely did use the features of protected mode.Windows 3.0’s WIN.COM supported:
/R for real mode (8086)
/S for standard mode (16-bit protected mode)
/E for 386 Enhanced Mode (32-bit virtual machine manager (VMM), running Windows in VM1, and DOS apps in VM2+)
by skissane
6/8/2026 at 7:41:22 PM
I actually found programming on the Mac a lot more painful due to the +/-32K max displacement for BRA/BSR, in MPW you had to manually shuffle blocks of code around to get them into the 32K jump range while in Windows the tools took care of it for you.by pseudohadamard
6/9/2026 at 5:55:43 AM
Early editions of Inside Macintosh implied that code segments couldn't exceed 32 KB, so you'd never run into that situation. (It's not clear whether this was an enforced limitation or just a recommendation.) Instead, developers were expected to divide their applications into multiple CODE segments, using jump table entries in the A5 world to branch between segments.Later in the operating system's lifecycle, applications typically used a single code segment and a custom loader to apply relocations, allowing them to use JSR within that segment.
by duskwuff