Thread: would this work?

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    140

    would this work?

    load a small program into memory, point a function pointer at it at run it as a function?
    Acos is good

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    They're called DLLs in windows programming, shared libraries in unix, and I think overlays in DOS

    What did you have in mind.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    140

    dos

    Imthinking dos. so could I load it into a big array and point a pointer at the start location of the array and then execute it like a function, or would I have to do some weird freaky stuff?
    Acos is good

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > or would I have to do some weird freaky stuff?
    Perhaps.

    Some compilers (the better DOS ones at least) allowed you to create overlays - but this was always a highly compiler specific thing, so you would need to do some reading (look for writing large programs and overlays).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strcmp returning 1...
    By Axel in forum C Programming
    Replies: 12
    Last Post: 09-08-2006, 07:48 PM
  2. getline() don't want to work anymore...
    By mikahell in forum C++ Programming
    Replies: 7
    Last Post: 07-31-2006, 10:50 AM
  3. Why don't the tutorials on this site work on my computer?
    By jsrig88 in forum C++ Programming
    Replies: 3
    Last Post: 05-15-2006, 10:39 PM
  4. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM
  5. DLL __cdecl doesnt seem to work?
    By Xei in forum C++ Programming
    Replies: 6
    Last Post: 08-21-2002, 04:36 PM