Thread: Program that loads the .exe?

  1. #1
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708

    Program that loads the .exe?

    Does anyone here know the name of the Windows and Unix programs that load executable instructions?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    It's called a 'kernel'. The core of the operating system. It basicly disects the .exe file and runs through it's operation line by line, jumping where appropriate, returning when needed. I could be wrong, but I don't believe there is a single applacation that "loads" the executables.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    i look at the kernel is a thing which sets up all the natural boundaries inside the cpu so that programs which go out of bounds land safely. the programs are still running close to or at the cpu. the exe file is disected, but only so the code is properly seated in the cpu before beginning its journey.

    system calls are usually intercepted by the cpu no matter whether there's a kernel there or not. it's the kernel's job to provide a map to the cpu (the interrupt descriptor table, i think) which tells the cpu where to jmp if a special situation happens. if the kernel weren't there, which might happen if you're writing an operating system, these special situations would just crash the computer instead of being handled by the kernel's software.

    to answer your question, you might try the system command. it's as close as you can get to what you're asking.

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    The system that loads an exe, maps the sections, resolves imports/exports....etc is usually refered to as the "loader" on windows OSes...It's not documented to well as I can see though...everything I have read about it has come from people learning from trial and error

    It makes sure everything is set....gets the execution startpoint for the exe...and lets the system do its stuff

  5. #5
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Technically it's called the dispatcher, I think. I know the kernal manages/schedules the process, but most systems use a short term scheduler called the dispatcher, who's only job it is to push new processes onto the queue. The reason it is a separate program is that whereas the kernal may take some time to calculate the processor slice for the new processes, etc, the loader is a very small program and thus processes don't have to wait as long to be recognized by the system.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  2. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 11:17 PM
  3. Can someome help me with a program please?
    By WinterInChicago in forum C++ Programming
    Replies: 3
    Last Post: 09-21-2006, 10:58 PM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM