Author Topic: Curosity Question: Software in Windows  (Read 2335 times)

0 Members and 1 Guest are viewing this topic.

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Curosity Question: Software in Windows
« on: July 27, 2011, 03:15:35 pm »
As we all know, Windows programs are compiled into Intel/AMD opcodes.  I'm assuming that the program run from a specific RAM address, does anyone know which one?  Or perhaps all calls, jumps and returns are relative?
« Last Edit: July 27, 2011, 03:16:01 pm by Hot_Dog »

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Curosity Question: Software in Windows
« Reply #1 on: July 27, 2011, 03:16:37 pm »
As we all know, Windows programs are compiled into Intel machine language.  I'm assuming that the program run from a specific RAM address, does anyone know which one?  Or perhaps all calls, jumps and returns are relative?
I believe programs run in their own address space, using virtual memory. I think they're loaded at 0x00000000 or somewhere close.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Curosity Question: Software in Windows
« Reply #2 on: July 27, 2011, 03:17:54 pm »
As we all know, Windows programs are compiled into Intel machine language.  I'm assuming that the program run from a specific RAM address, does anyone know which one?  Or perhaps all calls, jumps and returns are relative?
I believe programs run in their own address space, using virtual memory. I think they're loaded at 0x00000000 or somewhere close.

What about early DOS programs, assuming Virtual Memory didn't exist?

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Curosity Question: Software in Windows
« Reply #3 on: July 27, 2011, 03:32:26 pm »
In modern windows, programs tell windows where they'd like to be placed in memory. If that can't happen, then windows goes through and changes the instructions so that the program will run properly at a different address.

As for DOS, I think it used a system similar to TI-OS to load programs, but I'm not sure.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ