• agent_flounder@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    8 months ago

    I’m not familiar enough with 8088 to know… And it doesn’t seem to come up in a search… How the heck did they do (presumably) pre-emptive task scheduling on that chip? Anyone know?

    You’d need some kind of timer interrupt that has very high priority to be able to do something like that I would think.

    • d3Xt3r@lemmy.nz
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      8 months ago

      You’re on the right track with the timer interrupt assumption!

      One of the key techniques involved the use of the Intel 8253/8254 Programmable Interval Timer (PIT), present in IBM PCs/compatibles at the time. DESQView would reprogram this timer to generate interrupts regularly, and more frequently, than its default setting used by the operating system for clock ticks.

      When this timer interrupt fired, DESQView’s interrupt handler would kick in, save the current state of the CPU (registers etc), and then switch the context to another process by loading its saved state. By juggling the CPU time between different programs this way, DESQView could give the illusion of running multiple programs simultaneously on hardware that was originally designed for a single task at a time.

      DESQView used other tricks too, like monitoring keyboard and mouse interrupts, to make multitasking smoother. Pressing the Alt key by itself brought up the DESQview menu, and pressing Shift+Alt allowed you to record custom macros. A more interesting thing was how DESQView managed to intercept Ctrl+Alt+Del - pressing it would only terminate and close the window you’re in, instead of rebooting the whole box, which, at the time felt like black magic because normally nothing intercepted Ctrl+Alt+Del - you expected it to just work and reboot the box without question.

      cc: @raduzaharia@lemmy.sdf.org

      • agent_flounder@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        8 months ago

        Very cool! I appreciate the detailed explanation. Sounds like the coders behind it really knew their stuff.

      • agent_flounder@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        8 months ago

        Thanks! I had forgotten about segment registers. Makes more sense now than it did when I first learned about them ages ago.

    • Radu Zaharia@lemmy.sdf.orgOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      86Box can emulate the 8088 and WinWorld has the first version of DESQView so I might just try it. As for how they did it…I wouldn’t know.