Results 1 to 4 of 4

Thread: simple program question

  1. #1

    Join Date
    Mar 2001
    Location
    My sofa, unless I am in Bed
    Posts
    3,889

    simple program question

    How does a program work?

    I mean in simple terms like:
    How does it go through .DLL's and stuff?
    What steps do they take to run?

    You know Basic program stuff,
    I ain't got a signature anymore, someone stole it and I want it back.

  2. #2
    ****** HalfLifer's Avatar
    Join Date
    Jul 2000
    Location
    Detroit, Michigan Internet: Comcast Narrowband
    Posts
    7,086
    Visual Basic, you make things thru forms and modules, and you compile it to an .exe.

    Im in programming class right now BTW
    Work: DQ
    Comp: AXP 1600+, MSI K7T266a Pro2 RU, 512MB PC2100, GF3 Ti200 128MB

  3. #3
    The Earth's Companion Freezing Moon's Avatar
    Join Date
    Oct 2001
    Location
    Orbiting the Earth Number of moons frozen: 6
    Posts
    371
    The question is simple, the answer more elaborate...

    First of all, you need to know about the nature of computer languages. There are several different levels. For example, the actual binary code that the CPU works with is the lowest level. Then you have assembler, a programming language that basically consists of the operations that the CPU can do, a very low level programming language. For example to do the calculation a+b=c in Assembler, many more steps are required in assembler than in basic:
    - load the value of the variable "a" (or to be more specific, the memory address of "a") into a CPU register. A CPU register is like a minimal workspace within the CPU.
    - load the value of the variable "b" into a CPU register
    - add the registers
    - store the value of the the register with the result into the memory address of the variable "c".
    Then you have C, C++, Pascal, Basic, Visual C++, Visual Basic, and so on, which are higher level programming languages. One command of these (like Visual Basic's open window function) can consist out of hundreds, if not thousands of assembler functions.

    Of course not every programmer will write their own code to open a window. That's where DLLs come in. DLL stands for Dynamic Link Library, the code of one or more functions that is shared among programs, like all of Windows' functions. Programmers don't need to write their own "Open File..." Dialogue Boxes, the DLL's already contain their code, which programmers can link to from their own programs. The concept of libraries is not unique to windows, in DOS the programming language "Turbo Pascal" also has the feature of using libraries, which you can either download or program yourself. Again, pieces of code that can be used by more than one program.

    Needless to say, before a program will run it needs to be compiled, or translated into CPU-understandable commands.

    So how does a program work? When you start a program, the code is loaded into the memory. The CPU then starts loading and executing the code from position 0 (the memory address where the begin of the program is stored) and works its way through the program, starting other programs and calling functions from dlls as it gathers the commands to do so along the way.

    Need a more elaborate answer?
    Cheers,
    Ronald
    At one with fear / Careless if you fall
    Beneath the earth / Your heart may feel the call
    Can't let your mind be tainted / By the praying men
    Divinity burns in thunder / Over again
    My Dying Bride - A Cruel Taste Of Winter

    Hi, I'm a sig virus. Please add me to the end of your sig and help me take over the world.

  4. #4
    BE HAPPY ! ! ! ! ! poptom's Avatar
    Join Date
    Feb 2001
    Location
    Santa Monica, Southern California
    Posts
    4,632
    Freezing Moon:
    That's putting a lot in a nutshell. Thanks for posting ( on behalf of us non-software types).

    JLR:
    Good of you to ask.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •