lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Sat, Sep 12, 2020 at 1:39 PM Niccolo Medici <niccolomedici@gmail.com> wrote:
On 9/11/20, Viacheslav Usov <via.usov@gmail.com> wrote:
> On Fri, Sep 11, 2020 at 5:02 PM Egor Skriptunoff
> <egor.skriptunoff@gmail.com> wrote:
>
>> Can this LUA.EXE load external modules?
>> [...]
>
> [...]
> MS-DOS has no such notion

Right. In the DOS days, if we wanted to provide an extension to some
app, we'd write it as a TSR ("terminate and stay resident") and hook
our code to some interrupt handler. The app would call our extension
thus:

  ax = 23   ; some function number.
  bx = ...    ; argument1
  cx = ....   ; argument2
  int 52      ; call our code

That's one way. Another way was an overlay scheme where the main app would load some code from disk on demand (possibly overwriting other loaded code/data) and jump to it. Conceptually similar to a DLL, but used more for handling programs that wouldn't all fit in memory at once. Nothing would have stopped you from using the same technique to support plugins, though; I just don't know offhand of anyone who actually did that because I wasn't a PC user at the time it was relevant.

/s/ Adam