Win16 Memory Management

(os2museum.com)

38 points | by supermatou 2 days ago

1 comments

  • jdw64 1 hour ago
    Sometimes I think that if it were the old days, I probably wouldn't have been able to program. I remember that these days we program on top of 64bit virtual addresses, but how did developers do it back then
    • hnlmorg 1 hour ago
      16 bit programs used 16 bit addresses, generally speaking.

      Even with 32bit systems where you’d want more than 4GB RAM, application software still had 32 bit addresses (and thus 4GB memory limit).

      I think it was a lot more common for 8bit systems to allow for 16 bit addressing though.

      It’s been a while though. So hopefully I’m not misremembering things.

      • barrkel 23 minutes ago
        You had to deal with two flavors of pointer, near and far. Far pointers came with segment selector, for accessing more than 64k. Your choice of memory model influenced the defaults. You might use near pointers for internal references in a module, and far pointers for external references.
        • senfiaj 7 minutes ago
          I guess it was awkward to use languages that had higher level than assembly in order to write 16-bit programs that required more than 64KiB of memory. And also not quite portable, since they were all tied to x86 CPU. Those were messy times I guess. A somewhat similar story was 32-bit PAE, where the the CPU could address more than 4GiB physical memory, but software was still 32-bit and virtual addresses were capped to 4GiB. Linus was right that you must have more virtual memory (preferably 20+ times more) than physical, otherwise you have to jump through hoops.
    • rvba 29 minutes ago
      You had to figure out so much on your own back then - and reinvent the wheel.

      For me it is fascinating how today I can learn a foreign language, or how to code by interacting with the LLM.

    • kev009 1 hour ago
      Attention spans were longer.
      • GordonS 46 minutes ago
        I've been wondering about this lately. As a kid, I spent hour upon hour learning about computing: typing in Basic code from a magazine into a Commodore 64, playing with music on an Atari STe, learning my way around a DOS command line, dabbling with 3D modelling... just so much stuff that my own kids would never have the patience for.

        I wonder if it's just that kids today (gods that makes me sound old!) are constantly surrounded by entertaining things to do - gaming, TV/films, music, social media.

        • trumpdong 9 minutes ago
          I think it's an adaptation. Instead of living in a world with limited valuable information we're now living at the end of a firehose of never-ending near-useless information which has to be filtered at high speed.
        • jdw64 39 minutes ago
          I think that's actually a pretty accurate observation. I'm not a cognitive science expert, so I don't know the details, but there have been articles about 'popcorn brain' due to sustained attention issues, right? Personally, I use LLMs for coding quite often (in my environment, I'm often forced to use them). Compared to the past, when I use an LLM, the answers come immediately, so it seems harder to focus deeply than before. The generation younger than me, which is more focused on Shorts, probably has it even worse
        • Braini 42 minutes ago
          Its the latter - and I notice that on myself. There are just much more things reachable at any point in time compared to our youth it takes real effort to focus.
    • markus_zhang 32 minutes ago
      I think they learned by reading books such as Undocumented Windows or Windows Internals (not to be confused with Windows NT internals), and Microsoft documents.

      In fact, I’d argue it was more fun than programming Javascript these days.