Dynamic Linking in DOS... important!

This is a discussion on Dynamic Linking in DOS... important! within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I have tried a few things, and I just can't get a fast way to make "drivers", or simply seprit ...

  1. #1
    Registered User minime6696's Avatar
    Join Date
    Aug 2001
    Posts
    267

    Exclamation Dynamic Linking in DOS... important!

    I have tried a few things, and I just can't get a fast way to make "drivers", or simply seprit files for seprit 'jobs'.

    The first attempt that worked was makking an exe that on execution would take paramiters as to what proc and what args, but it was too slow and consumed too much memory.

    I suppose I could do a "constant file reader" thing... but there must be a better way!

    How is HIMEM.SYS and all of that stuff that seems to be dynamic binary work in DOS?

    SPH

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    I wouldn't call HIMEM.SYS dynamic. It is a TSR, just like EMM386.
    For dynamic loading of code you would have to use actual DLLs - it is possible in DOS and can be done through DJGPP.

    To implement your own you would load your code with the appropriate call to DOS. Don't call DOS EXEC because that will run the code - you just want to load it. Check RBIL for the correct register values when you do the DOS int.

    After you load the code, you will have access to the functions in it simply by altering your data segment and so forth. However, I think DLLs have a header in them that tells you at what offsets the functions lie within the code stream. That way you can just jump to the function or even only load that function instead of the whole DLL into memory.

    For more info on doing DLLs within DJGPP, check the FAQ or their website at www.delorie.com - I'm sure you know the URL, but just in case.

    I don't know the file format or header format for a Microsoft Windows DLL or if they did at one time have a DOS DLL format. Just don't know.

    Check Randall Hyde's AoA for more info on using shared memory, semaphores, and dynamic linking. You could do it yourself, or you could do some research on MS DLLs and how they work and load. Would be very interesting.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creepy DOS and BIOS functions (need help!!!)
    By James00 in forum C Programming
    Replies: 9
    Last Post: 05-05-2003, 01:40 AM
  2. how many old school DOS programmers are left?
    By Waldo2k2 in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 02-01-2003, 05:14 PM
  3. File systems?? (Winxp -> DOS)
    By Shadow in forum Tech Board
    Replies: 4
    Last Post: 01-06-2003, 09:08 PM
  4. Dynamic Toolbars
    By nvoigt in forum Windows Programming
    Replies: 1
    Last Post: 01-11-2002, 10:21 AM
  5. Shut off DOS screen automatically to Windows
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 11-08-2001, 07:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21